cleanup deployment
This commit is contained in:
parent
41be255144
commit
c863e5fe21
3 changed files with 8 additions and 17 deletions
6
backup.sh
Normal file
6
backup.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
time=$(date +"%Y-%m-%dT%H:%M:%S%z")
|
||||
dir=backup
|
||||
[ -d "${dir}" ] || mkdir -p "${dir}"
|
||||
docker compose run --rm -u postgres inventree-db sh -c 'PGPASSWORD=$POSTGRES_PASSWORD pg_dump -h inventree-db -p 5432 -U $POSTGRES_USER inventree' > "${dir}/${time}.sql"
|
||||
# to restore: pg_restore -d newdb db.dump
|
Loading…
Add table
Add a link
Reference in a new issue