MySQL Backup: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

    5 April 2022

    • curprev 09:2609:26, 5 April 2022Eric talk contribs 509 bytes +509 Created page with " #!/bin/bash USERNAME="root" PW="pass" BACKUPDIR=/crew/data/backup DBDIR=/crew/data/backup/DB MYSQLDIR=/var/lib/mysql rm $DBDIR/*.sql `mv $BACKUPDIR/sql.tar.gz $BACKUPDIR/sql.tar.gz.1` `mv $BACKUPDIR/sql.md5 $BACKUPDIR/sql.md5.1` for DB in $MYSQLDIR/*; do DB=`basename $DB` mysqldump -c -e -a -B $DB -u $USERNAME -p$PW > $DBDIR/$DB.sql echo "$DB is dumped..." done tar -zvcf $BACKUPDIR/sql.tar.gz $DBDIR 1> /dev/null rm $DBDIR/*.sql `/usr/bin/md5sum $BACKUPDI..."