Create make-a-backup.sh
This commit is contained in:
parent
98223a1c4d
commit
43711babe9
6
make-a-backup.sh
Normal file
6
make-a-backup.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd /home/django/project
|
||||||
|
docker exec -it django_1 python3 manage.py dumpdata --all --indent 4 --natural-primary --natural-foreign > /home/django/backups/dumpdata_$(date +"%Y-%m-%d").json
|
||||||
|
find /home/django/backups/* -mtime +30 -delete
|
Loading…
Reference in New Issue
Block a user