From d9804a00d1d2164f5c25d743d18bd4f6a8776f31 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Wed, 6 May 2020 00:01:37 +0200 Subject: 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. --- backup/udev/rules.d/99-max-autobackup.rules | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 backup/udev/rules.d/99-max-autobackup.rules (limited to 'backup/udev') 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 @@ +ACTION=="add", ENV{ID_PART_ENTRY_NUMBER}=="[0-9]", ENV{SYSTEMD_WANTS}="max-backup@$env{ID_SERIAL}\\x2dpart$env{ID_PART_ENTRY_NUMBER}.service" +LABEL="External disk drive backup" -- cgit v1.2.3