aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md33
-rw-r--r--systemd-zfs-partition-backup/AUR/PKGBUILD6
2 files changed, 38 insertions, 1 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
51. rsync is required and used internally with `--delete` to get rid of already deleted files (with zfs we have snapshots)
62. systemd-automount should be working for the device to back up (=fstab)
73. A zfs dataset will be searched with the name of the partition. If it is there it will be used for the backup.
84. if the partion is encrypted an entry in the `crypttab` will automatically be found by automount.
95. have fun.
10
11
12### crypttab
13
14```
15# /etc/crypttab example
16
17SomeDisk_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
diff --git a/systemd-zfs-partition-backup/AUR/PKGBUILD b/systemd-zfs-partition-backup/AUR/PKGBUILD
index b0fd026..21acfb4 100644
--- a/systemd-zfs-partition-backup/AUR/PKGBUILD
+++ b/systemd-zfs-partition-backup/AUR/PKGBUILD
@@ -11,9 +11,10 @@ depends=(
11 'systemd' 11 'systemd'
12 'kbd' 12 'kbd'
13 'mkinitcpio' 13 'mkinitcpio'
14 'rsync'
14) 15)
15source=("http://git.entwicklerseite.de/zfs-bash-tools/snapshot/zfs-bash-tools-master.tar.gz") 16source=("http://git.entwicklerseite.de/zfs-bash-tools/snapshot/zfs-bash-tools-master.tar.gz")
16sha256sums=('ef17307fcf662f867b98e6b5d883f2eb9fcd1f38205d516d9f85f53787ed58f1') 17sha256sums=('efb8f8f11401ffb8afc4ad228f9c6d6daffcd2451940d922a31b85076623a932')
17 18
18package() { 19package() {
19 install -D zfs-bash-tools-master/${pkgname}.sh \ 20 install -D zfs-bash-tools-master/${pkgname}.sh \
@@ -24,6 +25,9 @@ package() {
24 25
25 install -D -m 644 zfs-bash-tools-master/${pkgname}/udev/rules.d/90-${pkgname}.rules \ 26 install -D -m 644 zfs-bash-tools-master/${pkgname}/udev/rules.d/90-${pkgname}.rules \
26 ../pkg/${pkgname}/etc/udev/rules.d/90-${pkgname}.rules 27 ../pkg/${pkgname}/etc/udev/rules.d/90-${pkgname}.rules
28
29 systemctl daemon-reload
30 udevadm control --reaload
27} 31}
28 32
29# vim: ft=bash 33# vim: ft=bash
..