Jump to content
Sadikhov IT Certification forums
Sign in to follow this  
madunix

mysql backup restore

Recommended Posts

how would you backup and restore mysql on Linux server

 

 

am thinking to do the following

 

mysqlhotcopy --allowold --flushlog -u <username> --password=<password> <dbname> /var/backups/mysql/

 

or

 

/usr/bin/mysqldump -u#### -p#### --all-databases -a > /var/backups/mysql/$(date +%Y%m%d).sql

tar cf - /var/backups/mysql/$(date +%Y%m%d).sql | gzip -c > /misc/backups/MySQL/$(date +%Y%m%d).tar.gz

 

Any recommendation ,,,,,,,,

 

Thx

Edited by madunix

Share this post


Link to post
Share on other sites

My way is very old

because u can see there is a directory

/usr/mysql/data

then copy "ALL" Folders and file to another directory

it can simply back all stuffs

then if u want to restore

just simple copy whole stuffs back to the folders.

It is my way, very stupid but it is working

 

:D

Share this post


Link to post
Share on other sites
how would you backup and restore mysql on Linux server

 

 

am thinking to do the following

 

mysqlhotcopy --allowold --flushlog -u <username> --password=<password> <dbname> /var/backups/mysql/

 

or

 

/usr/bin/mysqldump -u#### -p#### --all-databases -a > /var/backups/mysql/$(date +%Y%m%d).sql

tar cf - /var/backups/mysql/$(date +%Y%m%d).sql | gzip -c > /misc/backups/MySQL/$(date +%Y%m%d).tar.gz

 

Any recommendation ,,,,,,,,

 

Thx

 

use the mysqldump method or zrm

http://www.zmanda.com/backup-mysql.html

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×