Save 15% on Instant Deploy Bare-Metal Servers in 26 Global Markets with Coupon Code: EdgeSave

Restore and take Backups of Database from shell

Postgresql

Using following command you can take backup of postgresql database.

# pg_dump -u -C -f backupfile.sql database_name

You can restore pgsql database using following command

# pg_restore -v -C -O -d database_name backupfile.sql.tar

Mysql

Using following command you can take backup of mysql database.

# mysqldump database_name > backup.sql

You can restore mysql database using following command

# mysql database_name

Share on Twitter
Share on Facebook