Backup target for makefile
This commit is contained in:
parent
6e48c0a088
commit
6c82aa2047
1 changed files with 5 additions and 0 deletions
|
@ -53,5 +53,10 @@ migrate:
|
|||
db.sqlite3:
|
||||
make migrate
|
||||
|
||||
backup:
|
||||
sqlite3 $(DB_FILE) .dump | gzip -9 > BACKUP_$(DB_FILE)_$(shell date +"%Y-%m-%d_%H:%M:%S").sql.gz
|
||||
# Restore with:
|
||||
# gzip -cd BACKUP_$(DB_FILE)_*.sql.gz | sqlite3 $(DB_FILE)
|
||||
|
||||
# Default target
|
||||
default: build
|
||||
|
|
Loading…
Reference in a new issue