Add borg-it

This commit is contained in:
Jonas Hörsch 2018-02-19 10:25:03 +01:00
parent eb35d0bbec
commit 0ebab561b6

11
borg-it Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
cd $(dirname $0)
[ -d "bak" ] || ( echo "Creating borg repository 'bak'"; borg init -e none bak )
if [ "$#" != "0" ]; then
backupkey=$1; shift
echo "Backing up current state to bak::$backupkey"
borg create --stats --exclude 'bak' --exclude '.git' --exclude '*/.ipynb_checkpoints' bak::$backupkey . "$@"
fi