Add timestamps to calibreweb dbs #1
This commit is contained in:
parent
b9bf1840c4
commit
41de09bb97
1 changed files with 4 additions and 2 deletions
|
@ -2,6 +2,9 @@
|
|||
# Backup script for Calibre-web in a kubernetes cluster
|
||||
|
||||
BACKUP_DEST="/mnt/PRIVATE_DOCS/BACKUPS/calibre-web"
|
||||
DATABASE_FILE="/config/app.db"
|
||||
|
||||
backup_filename="calibre-web-app_$(date +'%Y%m%d').db"
|
||||
|
||||
# Retrieve container name
|
||||
base_container=$( docker ps --format "{{.Names}}" | grep tkioskje-calibre-web_tkioskje-calibre-web )
|
||||
|
@ -11,7 +14,6 @@ set -e
|
|||
|
||||
# Database backup
|
||||
>&2 echo "Backing up database"
|
||||
database_file="/app/calibre-web/app.db"
|
||||
docker cp "${base_container}":"${database_file}" "${BACKUP_DEST}"
|
||||
docker cp "${base_container}":"${DATABASE_FILE}" "${BACKUP_DEST}/${backup_filename}"
|
||||
|
||||
>&2 echo "Done"
|
||||
|
|
Loading…
Reference in a new issue