Manage PostgreSQL Remotely: Backup/Restore Dumps Easily

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Jelastic PaaS gives you an opportunity to work with your databases remotely via Public IP. Here’s a how-to for PostgreSQL users. It will help you to connect to your database, backup and restore dumps from your computer without having to login to our dashboard.

A little reminder: public IPs are available only for paid users.

Create an environment

1. Go to jelastic.com and sign up if you haven’t done so yet, or log in with your Jelastic credentials by clicking the Sign In link on the page.

2. While in the dashboard, click the Create environment button at the top left:

postgresql remote backup

3. In the Environment Topology dialog, pick your application server (for example, Tomcat 6) and PostgreSQL as the database you want to use. Switch on Public IPv4 for PostgreSQL. Then type your environment name, for example, remotepostgres.

postgresql backup

It can take about a minute for your environment to be created.

postgresql dump

4. Click info button for PostgreSQL and you’ll see your Public IP at the end of the dropdown list.

remote connect postgresql

Remote connection to PostgreSQL

1. Create a new connection using any desktop client for PostgreSQL (we’ll use SQL Manager for PostgreSQL as an example).

connect postgresql

2. Specify the host name (your Public IP), port number (5432), username and password (when you’ve created the environment, Jelastic sent you an email with credentials to the database). Then click Next.

postgres connect

3. Then register your database: enter the database name, alias, client encoding and other specific options. Click on the Finish button.

postgresql database
As you can see the connection is successfully established.

establish postgres connection

Dump export from PostgreSQL

1. Click on Services -> Backup database.

postgres backups

2. Select host to backup: type your Public IP, username and password, sent by Jelastic.

postgres backup configs

3. Specify server objects to backup.

postgresql backup object

4. Specify output file format and your dump file name.

postgres dump

5. Set backup options for database objects.

postgres backup object

6. Set backup options.

postgresql backup options

7. Set backup creation options.

postgresql backup create

8. Then click Run to backup the database.

perform postgresql backup

Now you can open your dump file and ensure that an export was successful (…SQL Manager for PostgreSQLMetadatapostgres on 216.22.34.15mydump1.sql ).

Dump import to PostgreSQL

1. Click on Services -> Restore database.

restore postgres

2. Select the host to restore database on: type your Public IP, user name and password sent by Jelastic.

restore postgresql

3. Select the source file for restoring.

postgres restore file

4. Select the encoding for script conversion.

postgres restore encoding

5. Select restoring type.

postgresql restore type

6. Specify restoring options.

postgresql restore options

7. Click Run to restore your database.

8. Go back to Jelastic dashboard and open PostgreSQL in a browser. Using the credentials sent by Jelastic, sign in to admin page. Select example and you’ll see your imported dump.

postgres import dump

That’s all! Stay tuned to our blog to keep in touch with our news!

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Leave a Reply

Subscribe to get the latest updates