matomo-org/docker

Backup

Closed this issue · 1 comments

We're using the docker-compose setup (nginx example from this repo). Could anyone suggest the best way to backup the DB?

Executing mysqldump inside the running container and redirecting stdout to a file worked for me:

docker exec -it 'INSERT HERE ID OF DOCKER CONTAINER' /usr/bin/mysqldump --extended-insert --no-autocommit --quick --single-transaction matomo -umatomo -p'INSERT HERE DB PASSWORD' > matomo_backup_database.sql