diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..a1f7950 --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,33 @@ | |||
1 | # systemd-zfs-partition-backup.sh | ||
2 | |||
3 | ## How to: | ||
4 | |||
5 | 1. rsync is required and used internally with `--delete` to get rid of already deleted files (with zfs we have snapshots) | ||
6 | 2. systemd-automount should be working for the device to back up (=fstab) | ||
7 | 3. A zfs dataset will be searched with the name of the partition. If it is there it will be used for the backup. | ||
8 | 4. if the partion is encrypted an entry in the `crypttab` will automatically be found by automount. | ||
9 | 5. have fun. | ||
10 | |||
11 | |||
12 | ### crypttab | ||
13 | |||
14 | ``` | ||
15 | # /etc/crypttab example | ||
16 | |||
17 | SomeDisk_SDSSDH0000G_123456789-part2 /dev/disk/by-id/SomeDisk_SDSSDH0000G_123456789-part2 /etc/.crypt/SomeDisk_SDSSDH0000G_123456789-part2.key noauto,x-systemd.device-timeout=5s | ||
18 | ``` | ||
19 | |||
20 | ### fstab | ||
21 | |||
22 | ``` | ||
23 | # /etc/fstab example | ||
24 | |||
25 | # Note that the connector name has been removed from the mountpoint. | ||
26 | # The automount unit will be named after that and so must the zfs dataset | ||
27 | /dev/disk/by-id/ata-SomeDisk_SDSSDH0000G_123456789-part1 /media/SomeDisk_SDSSDH0000G_123456789-part1 auto defaults,noauto,ro,x-systemd.automount,x-mount.mkdir,x-systemd.idle-timeout=1min,x-systemd.device-timeout=5s 0 0 | ||
28 | |||
29 | # The following name takes the name we gave our disk in the crypttab (first column). | ||
30 | # Such devices are then available via /dev/mapper/: | ||
31 | /dev/mapper/SomeDisk_SDSSDH0000G_123456789-part2 /media/SomeDisk_SDSSDH0000G_123456789-part2 auto defaults,noauto,ro,x-systemd.automount,x-mount.mkdir,x-systemd.idle-timeout=1min,x-systemd.device-timeout=5s 0 0 | ||
32 | ``` | ||
33 | |||