Plesk

How to import PostgreSQL database dump on Plesk for Linux server?

Question

How to import PostgreSQL database dump on Plesk for Linux server?

Answer

Using command-line utilities

  1. Connect to the server using SSH.

  2. Execute the following command:

    # psql example_db < dump_file


    # pg_restore -U johndoe -d example_db dump_file

    Note: example_db is the name of the database to which the dump is imported; johndoe - the database user; dump_file - the name of the dump file.

Using phpPgAdmin (only in Plesk Onyx 17.5 and earlier)

Warning: phpPgAdmin is deprecated in Plesk 17.8 and later due to security reasons.

  1. Log in to Plesk.

  2. Go to Domains > example.com > Databases and click phpPgAdmin under the name of the required database.

  3. In the phpPgAdmin interface, click on database name > SQL > Browse, select file to upload and click Execute.

Note: Imported backup should contain valid SQL commands.

Exit mobile version