Back Up & Restore a PostgreSQL Database
Backing up a PostgreSQL database means exporting it to a file; restoring or moving it means importing that file back. Both are done in phpPgAdmin in cPanel – handy before a big change, or when moving a site to JetHost. This guide covers export and import, step by step. phpPgAdmin is included with every JetHost web hosting plan.
Open phpPgAdmin
Log in to cPanel and, in the Databases section, click phpPgAdmin. Your databases appear in the left sidebar – click the one you want to work with. For more on getting around the tool, see accessing phpPgAdmin.
Export (back up) a database
- Select your database in the left sidebar.
- Click the Export option at the top.
- Choose Data and Structure, and set the format to SQL.
- Select Download, then click Export.
A .sql file downloads to your computer. It holds the whole database – both the structure and the data – so keep it somewhere safe.
Import (restore or move) a database
Importing loads a .sql file back into a database. First make sure the target database exists – if not, create one first. Then:
- Select the target database in the left sidebar.
- Click the SQL option at the top.
- Click Choose File and select your
.sqlfile from your computer. - Click Execute and wait for the confirmation.
Moving a site to JetHost? After importing, update your application’s config with the new database name, user, and password so it points to the imported copy. It’s also worth exporting on a regular schedule, not just before changes, so you always have a recent backup.
JetHost Experts Tip
Importing a large .sql file through the browser can hit an upload limit. If your file is big, open a ticket and we’ll import it for you from the command line with psql – no size limit that way.
Importing into a database that already has data
Importing doesn’t wipe the target database first – it runs the commands in your file on top of what’s already there. If the database already contains the same tables, you may see “already exists” or duplicate-key errors. For a clean restore, import into a freshly created, empty database, or make sure your export includes the statements to drop and recreate each table. When in doubt, create a brand-new database for the import and point your application at that once it’s loaded. This keeps your original data untouched until you’ve confirmed the restore worked.
Need more help?
Backup or restore not going smoothly? Open a ticket through Client Area → Support and our team will help – we can also migrate your whole site for free.


