youRFate@feddit.detoSelfhosted@lemmy.world•How do y'all backup docker databases with backup programs like Borg/Restic?English
4·
6 months agoWith restic you can pipe to stdin, so I use mysqldump and pipe it to restic:
mysqldump --defaults-file=/root/backup_scripts/.my.cnf --databases db-name | restic backup --stdin --stdin-filename db-name.sql
The .my.cnf looks like this:
[mysqldump]
user=db-user
password="databasepassword"
I use FreeBSD 😅