Your Webhosting Questions
Answered by the Webhosting Experts

Restore and take Backups of Database from shell


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


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

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your account or if you are on the go, please reach out from your valid account email to us here at: We are also available to you through our phone and live chat system 24/7/365.