Target for dumping database content to file

This commit is contained in:
Imbus 2024-03-14 14:10:25 +01:00
parent dd4809d631
commit 0824a344e3
2 changed files with 4 additions and 0 deletions

1
.gitignore vendored
View file

@ -6,6 +6,7 @@
*.dylib
bin
database.txt
db.sqlite3
*.png

View file

@ -54,6 +54,9 @@ migrate:
db.sqlite3:
make migrate
dbdump:
sqlite3 $(DB_FILE) .dump > database.txt
backup:
mkdir -p backups
sqlite3 $(DB_FILE) .dump | gzip -9 > ./backups/BACKUP_$(DB_FILE)_$(shell date +"%Y-%m-%d_%H:%M:%S").sql.gz