add timetracker backup/restore scripts
This commit is contained in:
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
NOW=$(date +"%d-%m-%Y-%H-%M")
|
||||||
|
BACKUPDIR="/home/timetracker/app/games/fixtures/backups"
|
||||||
|
set -euxo pipefail
|
||||||
|
docker compose exec timetracker poetry run python manage.py dumpdata games.game games.edition games.purchase games.device games.platform --output ${BACKUPDIR}/${NOW}.json
|
||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
NOW=$(date +"%d-%m-%Y-%H-%M")
|
||||||
|
BACKUPDIR="/home/timetracker/app/games/fixtures/backups"
|
||||||
|
set -euxo pipefail
|
||||||
|
docker compose exec timetracker poetry run python manage.py dumpdata games.Session --output ${BACKUPDIR}/${NOW}.json
|
||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
BACKUPDIR="backups"
|
||||||
|
[ -z "${1:-}" ] && echo "No file specified, exitting." && exit 1
|
||||||
|
set -euxo pipefail
|
||||||
|
docker compose exec timetracker poetry run python manage.py loaddata ${BACKUPDIR}/${1}
|
||||||
Reference in New Issue
Block a user