#1 Calibre-web backup script
This commit is contained in:
parent
67e89ea2d1
commit
b9bf1840c4
1 changed files with 17 additions and 0 deletions
17
backups/create_calibre-web_backup.sh
Executable file
17
backups/create_calibre-web_backup.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Backup script for Calibre-web in a kubernetes cluster
|
||||||
|
|
||||||
|
BACKUP_DEST="/mnt/PRIVATE_DOCS/BACKUPS/calibre-web"
|
||||||
|
|
||||||
|
# Retrieve container name
|
||||||
|
base_container=$( docker ps --format "{{.Names}}" | grep tkioskje-calibre-web_tkioskje-calibre-web )
|
||||||
|
|
||||||
|
# Abort entire script if any command fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Database backup
|
||||||
|
>&2 echo "Backing up database"
|
||||||
|
database_file="/app/calibre-web/app.db"
|
||||||
|
docker cp "${base_container}":"${database_file}" "${BACKUP_DEST}"
|
||||||
|
|
||||||
|
>&2 echo "Done"
|
Loading…
Reference in a new issue