Created
May 22, 2022 17:35
-
-
Save sdesalas/b16defd5f087b5da3dd68d78ac900367 to your computer and use it in GitHub Desktop.
Db backup scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for DB in $(mysql -u root -p<password> -h <IP of DB> -e 'show databases' -s --skip-column-names); do | |
| mysqldump -u root -p<password> -h<IP of DB> $DB > "$DB.sql"; | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like to
mysqldump | gzip --rsyncable | restic --stdinworks great, deduplicated snapshot directly into a cloud bucket