Tuesday, January 18, 2011

Mysql and Postgresql Backup and Restore method

Mysql and Postgresql Backup and Restore method
 
#Backup for Mysql DB
tar jcvf db.tar.bz2 /var/lib/mysql
 
#Restore
tar -C /var/lib/mysql -jxvf db.tar.bz2
 
#backup for Postgresql Database
/usr/bin/pg_dumpall > /home/baskar/backup/db.out
 
#Restore
psql -e -d template1 -f /home/baskar/backup/db.out

1 comment:

  1. Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. PostgreSQL NULL value

    ReplyDelete