Return to Snippet

Revision: 14586
at October 11, 2009 13:09 by stiobhart


Updated Code
-- dump mySQL database to file:
VAR=$(date +�%y-%m-%d�); mysqldump -v -uUSERNAME -pPASSWORD -hlocalhost DATABASENAME > /BACKUPDIR/$VAR-DATABASENAME.sql ;

-- dump mySQL database to file and then move it:
VAR=$(date +�%y-%m-%d�); mysqldump -v -uUSERNAME -pPASSWORD -hlocalhost DATABASENAME > /BACKUPDIR/$VAR-DATABASENAME.sql ; mv /BACKUPDIR/DATABASENAME.sql  /OTHERBACKUPDIR/$VAR-DATABASENAME.sql ;

Revision: 14585
at June 7, 2009 11:23 by stiobhart


Initial Code
-- dump mySQL database to file:
VAR=$(date +“%y-%m-%d“); mysqldump -v -uUSERNAME -pPASSWORD -hlocalhost FORUMNAME > /BACKUPDIR/$VAR-FORUMNAME.sql ;

-- dump mySQL database to file and then move it:
VAR=$(date +“%y-%m-%d“); mysqldump -v -uUSERNAME -pPASSWORD -hlocalhost FORUMNAME > /BACKUPDIR/$VAR-FORUMNAME.sql ; mv /BACKUPDIR/FORUMNAME.sql  /OTHERBACKUPDIR/$VAR-FORUMNAME.sql ;

Initial URL

                                

Initial Description
CLI commands for backing up mySQL database

Initial Title
mySQL - database backup commands

Initial Tags
mysql, database, command, backup

Initial Language
MySQL