... | ... | @@ -36,7 +36,7 @@ All databases in the system use docker volumes to persist data. |
|
|
|
|
|
#### MySQL
|
|
|
|
|
|
Normally, we take backups by simply copying the datavolume, but in the case of MySQL, we found there is a risk of getting a corrupted backup, probably due to the large number of writes happening at any time. So to get a safe snapshot of the data use mysqldump:
|
|
|
Normally, we take backups by simply copying the datavolume, but in the case of MySQL, we found there is a risk of getting a corrupted backup, probably due to the large number of writes happening at any time. So to get a safe snapshot of the DB use mysqldump:
|
|
|
|
|
|
docker exec -i koha_mysql_slave bash -c 'mysqldump -uroot -p$MYSQL_PASSWORD $MYSQL_DATABASE --single-transaction --master-data=2 --flush-logs --routines --triggers --events --hex-blob' > /data/dumps/`date +%F`/koha_mysqldump_full.sql
|
|
|
|
... | ... | @@ -44,6 +44,23 @@ At OPL we are running the backup against a read-only slave, as not to create add |
|
|
|
|
|
#### Fuseki
|
|
|
|
|
|
Fuseki
|
|
|
|
|
|
Backup with
|
|
|
|
|
|
docker run --rm \
|
|
|
-v kohaprod_fuseki_data:/from \
|
|
|
-v $(pwd):/to \
|
|
|
alpine ash -c "cd /from ; tar -cf /to/fusekidata.tar ."
|
|
|
|
|
|
Restore with
|
|
|
|
|
|
docker stop fuseki
|
|
|
docker run --rm \
|
|
|
-v $(pwd):/from \
|
|
|
-v dockercompose_fuseki_data:/to \
|
|
|
alpine ash -c "cd /to ; tar -xf /from/fusekidata.tar"
|
|
|
|
|
|
#### Others
|
|
|
|
|
|
## Customizations
|
... | ... | |