]> arthur.barton.de Git - backup-script.git/commitdiff
Use relative symlinks for ZFS snapshots
authorAlexander Barton <alex@barton.de>
Thu, 1 Oct 2015 12:43:47 +0000 (14:43 +0200)
committerAlexander Barton <alex@barton.de>
Thu, 1 Oct 2015 12:43:50 +0000 (14:43 +0200)
This eases renaming of systems etc.

bin/backup-script

index 544960d9fedb2f4f207e17c4b496d16da0ce4ee0..185a62f970db7f830d34f4955d239cb1ec72275e 100755 (executable)
@@ -156,7 +156,7 @@ CloneSubvolume() {
                zfs snapshot "$snapshot" || return 1
                link_name="$(echo "$snapshot" | cut -d@ -f2-)"
                ln -s \
-                       "$volume/.zfs/snapshot/$link_name" \
+                       "current/.zfs/snapshot/$link_name" \
                        "$(dirname "$volume")/$link_name"
                ;;
          *)