Backup and Restore scripts

This commit is contained in:
gw3000 2023-07-30 13:31:13 +02:00
parent ac6a8515b7
commit c0b0ce8874
3 changed files with 24 additions and 0 deletions

7
bin/backupDB Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
# CREATE DATABASE DUMP OF DB_FBF.
docker exec django_fbf-db-1 /bin/bash -c "/usr/local/bin/pg_dump -U fbf -d db_fbf > /backup/fbf-backup.sql"
# cOPY AND COMPRESS DUMP FILE.
docker exec django_fbf-db-1 /bin/bash -c "cd /backup && /bin/tar -czvf fbf-backup__$(date '+%Y-%m-%d').tar.gz fbf-backup.sql"