aboutsummaryrefslogtreecommitdiff
path: root/backup/udev
diff options
context:
space:
mode:
authorMax Christian Pohle2020-05-06 00:01:37 +0200
committerMax Christian Pohle2020-05-06 00:01:37 +0200
commitd9804a00d1d2164f5c25d743d18bd4f6a8776f31 (patch)
tree4bb7bab7260251d4739c775a4a4f6632bc44d21f /backup/udev
parent2b59a5c8b5e77e115b6b4ca2463cdfe70b0b51ba (diff)
downloadzfs-bash-tools-d9804a00d1d2164f5c25d743d18bd4f6a8776f31.tar.bz2
zfs-bash-tools-d9804a00d1d2164f5c25d743d18bd4f6a8776f31.zip
Added automatic backup script
This is WIP and should not be used by anybody until I have fixed hard coded paths and stuff like that. The idea of this script is: Once you plug a disk drive in, it will automatically be backed up, but only if a zfs dataset with the name of that drive already exists.
Diffstat (limited to 'backup/udev')
-rw-r--r--backup/udev/rules.d/99-max-autobackup.rules2
1 files changed, 2 insertions, 0 deletions
diff --git a/backup/udev/rules.d/99-max-autobackup.rules b/backup/udev/rules.d/99-max-autobackup.rules
new file mode 100644
index 0000000..e17bba0
--- /dev/null
+++ b/backup/udev/rules.d/99-max-autobackup.rules
@@ -0,0 +1,2 @@
1ACTION=="add", ENV{ID_PART_ENTRY_NUMBER}=="[0-9]", ENV{SYSTEMD_WANTS}="max-backup@$env{ID_SERIAL}\\x2dpart$env{ID_PART_ENTRY_NUMBER}.service"
2LABEL="External disk drive backup"
..