docker icon indicating copy to clipboard operation
docker copied to clipboard

Backup

Open michaelr524 opened this issue 3 years ago • 1 comments

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

michaelr524 avatar Aug 02 '22 09:08 michaelr524

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

michaelr524 avatar Aug 04 '22 10:08 michaelr524