Table of Contents

Backing up and Restoring a PostgreSQL database

Backing up a PostgreSQL database

To backup a PostgreSQL database, do the following.

  1. Sign in to Virtualmin (see Account logins and important URLs).
  2. Select a domain from the drop-down in the left-hand navigation (your main domain should be already selected when you first login to Virtualmin).
  3. Click Edit Databases. You should now see a list of your current databases on the Edit Databases page.
  4. Select the PostgreSQL database you want to back up from the left-hand column under Database name and click Manage... You should now see the Edit Database page.
  5. Click Backup. You should now see the Backup Database page.
  6. For Backup file path, enter a location on your account where you want the database to be saved and a suitable filename (e.g., /users/home/yourusername/dbbackup). Clicking will allow you to browse to a suitable location on your account.
  7. For Backup file format, select your desired format for the file.
  8. For Tables to backup, select either All tables or choose a specific table to backup.
  9. Now, click Backup Now. You should now see a page confirming a successful backup and your database should be saved in your desired location

And that's it, you've just made a backup of your PostgreSQL database!

Restoring up a PostgreSQL database

To backup a PostgreSQL database, do the following.

  1. Sign in to Virtualmin (see Account logins and important URLs).
  2. Select a domain from the drop-down in the left-hand navigation (your main domain should be already selected when you first login to Virtualmin).
  3. Click Edit Databases. You should now see a list of your current databases on the Edit Databases page.
  4. Select the PostgreSQL database you want to back up from the left-hand column under Database name and click Manage... You should now see the Edit Database page.
  5. Click Restore. You should now see the Restore Database page.
  6. For File on server, enter the path on your account to the PostreSQL file you want to restore (clicking will allow you to browse and select the file) or select Uploaded file and click Choose File to select a file from your local machine.
  7. Now, click Restore. You should now see the Import Data page confirming a successful restoration and your PostgreSQL database.

And that's it, you've just restored your PostgreSQL database!