Answered by the Webhosting Experts

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

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 my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

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