-
-
Save bdew/7abf2f606aac42982f47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WURMPATH=/path/to/server | |
BACKUP=/path/to/backup | |
FILES=$WURMPATH/sqlite/*.db | |
for f in $FILES | |
do | |
fn=$(basename $f .db) | |
echo -n "Processing $fn ... " | |
echo ".backup $BACKUP/sqlite/$fn.db" | sqlite3 $f && echo " OK" || echo " FAIL" | |
done | |
cp -vf `find $WURMPATH -maxdepth 1 -type f` $BACKUP/ | |
duplicity full --encrypt-key MYKEY $BACKUP gs://wurm-bak/server | |
duplicity remove-older-than 10D --force gs://wurm-bak/server | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment