Skip to main content
Skip to main content
🚧 Work in Progress

Export or import PostgreSQL data

Use Adminer to export or import data​

Adminer ↗ is an open source full-featured database management tool written in PHP.

  1. Install Adminer to Zerops
  2. Use Adminer standard export or import functions

Use phpMyAdmin to export or import data​

phpMyAdmin ↗ is a free software tool written in PHP, intended to handle the administration of PostgreSQL over the Web.

  1. Install phpMyAdmin to Zerops
  2. Use phpMyAdmin standard export or import functions

Use a database management tool on your workstation to export or import data​

Do you already use a database management tool that supports PostgreSQL on your workstation? Connect it securely to PostgreSQL from your local workspace via Zerops VPN.

Zerops VPN client is included into zCLI, the Zerops command-line tool. To start the VPN connection, read how to connect to PostgreSQL remotely.

Caution

Do not use SSL/TLS protocols when connecting to PostgreSQL over VPN. Zerops PostgreSQL is not configured to support these protocols. The security is assured by the VPN.

Once the connection to PostgreSQL is established, use the standard export or import functions of your favourite management tool.

Use psql CLI to export or import data​

If you are using the psql ↗ command-line client to manage your PostgreSQL on your local workspace, you can connect it securely to PostgreSQL via Zerops VPN.

Zerops VPN client is included into zCLI, the Zerops command-line tool. To start the VPN connection, read how to connect to PostgreSQL remotely.

Once the VPN session is established, you have the secured connection to the project's private network in Zerops. You can access all project services locally by using their hostname. The only difference is that no environment variables are available when connected through VPN. To connect to PostgreSQL in Zerops you have to copy the access details manually from Zerops GUI.

Use psql ↗ command to connect to PostgreSQL in Zerops:

psql -h [hostname] -U [user] -p [password] -d [database_name]
Caution

Do not use SSL/TLS protocols when connecting to PostgreSQL over VPN. Zerops PostgreSQL is not configured to support these protocols. The security is assured by the VPN.

To export your database data and structure, use the pg_dump ↗ command.

pg_dump [database_name] > dumpfilename.sql

To import your database data and structure, use the mysql command.

mysql [database_name] < dumpfilename.sql