Restoring a database from backup
Backups of Postgres databases are created using the pg_dump
command that can output a variety of formats. By default, backups are created as plain text SQL scripts, but a compressed custom PostgreSQL format is more efficient. Webmin helps you to create backups in both of these formats as well as in the TAR
format.
The method of restoring your database will depend on the file format chosen during backup. If you chose the plain SQL text format, then simply running your backup script will restore the database. Take a look at the recipe, Execute custom SQL commands, for more information.
If you chose the custom archive or TAR
file format, you should use the procedure described in this recipe.
How to do it...
Follow these steps to restore a database from backup:
Navigate to Servers | PostgreSQL Database Server.
Click the icon that represents the database you would like to restore.
Click the Restore button.
Choose Restore from Uploaded file, click Browse, and choose the...