taskwarrior-backup.sh (301B)
1 #!/bin/bash 2 3 set -e 4 5 # run with chronic to avoid spam 6 7 mkdir -p "$1" 8 cd "$1" # required to have the right paths in the archive 9 10 # avoid "file changed as we read it" errors from tar 11 cp -R task_current task_backup 12 FILE="dump-`date +%s`" 13 tar cf ${FILE}.tar task_backup 14 xz ${FILE}.tar 15 rm -Rf task_backup 16