Create incremental backups in a git-annex repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 395B

  1. #!/usr/bin/env bash
  2. set -e
  3. btrfs subvolume snapshot -r / "/snapshot/$1" >/dev/null
  4. dar -Q -q -c "$HOSTNAME.$1" ${2:+-A "$HOSTNAME.$2"} -R "/snapshot/$1" -z5 --nodump --empty-dir --no-warn --alter=secu --sparse-file-min-size=0
  5. btrfs subvolume delete "/snapshot/$1" >/dev/null
  6. dar -Q -q -t "$HOSTNAME.$1"
  7. par2 create -n1 "$HOSTNAME.$1.1.dar" >/dev/null
  8. par2 verify "$HOSTNAME.$1.1.dar" >/dev/null