fixed low /tmp space

This commit is contained in:
julien
2025-12-19 09:39:42 +01:00
parent 33abc42f31
commit e5f6ac163d

View File

@@ -27,17 +27,17 @@ if [ -d "volumes" ]; then
# Compress all volumes excerpt mysql and postgres # Compress all volumes excerpt mysql and postgres
BACKUP=${PWD##*/}.tar.zst 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) # Put it into the storage box (pubkey needed)
STORAGE_BOX=u442569@u442569.your-storagebox.de STORAGE_BOX=u442569@u442569.your-storagebox.de
TODAY=$(date +%F) TODAY=$(date +%F)
ssh -p23 $STORAGE_BOX "mkdir -p $TODAY" 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 # Clean
if [ -f "volumes/$DUMP_NAME" ]; then if [ -f "volumes/$DUMP_NAME" ]; then
rm volumes/$DUMP_NAME rm -r volumes/$DUMP_NAME
fi fi
rm /tmp/$BACKUP rm /srv/$BACKUP
fi fi