scp in place of ssh

This commit is contained in:
julien 2025-01-19 15:15:46 +01:00
parent a311fe0faf
commit b664813b52

View File

@ -35,6 +35,8 @@ if [ -d "volumes/postgres" ]; then
nerdctl exec -e $CONTAINER_NAME pg_dump -U $DB_USER $DB_NAME > volumes/$DUMP_NAME nerdctl exec -e $CONTAINER_NAME pg_dump -U $DB_USER $DB_NAME > volumes/$DUMP_NAME
fi fi
# Compress all volumes excerpt mysql and postgres into the staorage box (pubkey needed) # Compress all volumes excerpt mysql and postgres into the storage box (pubkey needed)
BACKUP=${PWD##*/}.tar.zst BACKUP=${PWD##*/}.tar.zst
ssh u442569@u442569.your-storagebox.de tar --zstd --exclude='volumes/mysql' --exclude='volumes/postgres' -cf - volumes > $BACKUP tar --zstd -cf $BACKUP -C volumes /tmp
scp /tmp/$BACKUP u442569@u442569.your-storagebox.de
rm /tmp/$BACKUP