commit 0a13f909c01ad81dd1399fadcaf172c083a5cd16 parent 313d2598171a8f6dcc400bfa16e8c2193ea53164 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Mon, 30 May 2022 23:04:20 +0200 taskwarrior-backup Diffstat:
taskwarrior-backup.sh | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/taskwarrior-backup.sh b/taskwarrior-backup.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +# run with chronic to avoid spam + +mkdir -p "$1" +cd "$1" # required to have the right paths in the archive + +# avoid "file changed as we read it" errors from tar +cp -R task_current task_backup +FILE="dump-`date +%s`" +tar cf ${FILE}.tar task_backup +xz ${FILE}.tar +rm -Rf task_backup +