Backup and Restore scripts
This commit is contained in:
parent
ac6a8515b7
commit
c0b0ce8874
3 changed files with 24 additions and 0 deletions
7
bin/backupDB
Executable file
7
bin/backupDB
Executable 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"
|
Loading…
Add table
Add a link
Reference in a new issue