diff --git a/scripts/vol-backup b/scripts/vol-backup index 766e404..63bdb29 100755 --- a/scripts/vol-backup +++ b/scripts/vol-backup @@ -27,17 +27,17 @@ if [ -d "volumes" ]; then # Compress all volumes excerpt mysql and postgres BACKUP=${PWD##*/}.tar.zst - tar --exclude='mysql' --exclude='postgres' --zstd -cf /tmp/$BACKUP -C volumes . + tar --exclude='mysql' --exclude='postgres' --zstd -cf /srv/$BACKUP -C volumes . # Put it into the storage box (pubkey needed) STORAGE_BOX=u442569@u442569.your-storagebox.de TODAY=$(date +%F) ssh -p23 $STORAGE_BOX "mkdir -p $TODAY" - scp -P 23 /tmp/$BACKUP $STORAGE_BOX:/home/$TODAY + scp -P 23 /srv/$BACKUP $STORAGE_BOX:/home/$TODAY # Clean if [ -f "volumes/$DUMP_NAME" ]; then - rm volumes/$DUMP_NAME + rm -r volumes/$DUMP_NAME fi - rm /tmp/$BACKUP + rm /srv/$BACKUP fi