Add timestamps to calibreweb dbs #1

This commit is contained in:
Tibo De Peuter 2023-06-15 22:25:10 +02:00
parent b9bf1840c4
commit 41de09bb97

View file

@ -2,6 +2,9 @@
# Backup script for Calibre-web in a kubernetes cluster # Backup script for Calibre-web in a kubernetes cluster
BACKUP_DEST="/mnt/PRIVATE_DOCS/BACKUPS/calibre-web" 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 # Retrieve container name
base_container=$( docker ps --format "{{.Names}}" | grep tkioskje-calibre-web_tkioskje-calibre-web ) base_container=$( docker ps --format "{{.Names}}" | grep tkioskje-calibre-web_tkioskje-calibre-web )
@ -11,7 +14,6 @@ set -e
# Database backup # Database backup
>&2 echo "Backing up database" >&2 echo "Backing up database"
database_file="/app/calibre-web/app.db" docker cp "${base_container}":"${DATABASE_FILE}" "${BACKUP_DEST}/${backup_filename}"
docker cp "${base_container}":"${database_file}" "${BACKUP_DEST}"
>&2 echo "Done" >&2 echo "Done"