Skip to content

Commit

Permalink
delete sql files after backup
Browse files Browse the repository at this point in the history
  • Loading branch information
JEK58 committed Jul 30, 2024
1 parent c62fcd2 commit 59d0d0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backup/tasks/daily/backup
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ BACKUP_FILE="/var/opt/$(date +"%Y-%m-%d_%H-%M-%S").sql"
pg_dump -h db -U postgres postgres >> $BACKUP_FILE
echo "...done. Uploading backup..."
rclone copy $BACKUP_FILE r2:sql-backup
echo "...done"
echo "...done"
rm $BACKUP_FILE
echo "Backup file deleted"

0 comments on commit 59d0d0c

Please sign in to comment.