minus-squareyouRFate@feddit.detoSelfhosted@lemmy.world•How do y'all backup docker databases with backup programs like Borg/Restic?linkfedilinkEnglisharrow-up4·edit-25 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" linkfedilink
With 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"