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:
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.
It can take about a minute for your environment to be created.
4. Click info button for PostgreSQL and you’ll see your Public IP at the end of the dropdown list.
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).
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.
3. Then register your database: enter the database name, alias, client encoding and other specific options. Click on the Finish button.
Dump export from PostgreSQL
1. Click on Services -> Backup database.
2. Select host to backup: type your Public IP, username and password, sent by Jelastic.
3. Specify server objects to backup.
4. Specify output file format and your dump file name.
5. Set backup options for database objects.
6. Set backup options.
7. Set backup creation options.
8. Then click Run to backup the database.
Now you can open your dump file and ensure that an export was successful (…SQL Manager for PostgreSQLMetadatapostgres on 126.96.36.199mydump1.sql ).
Dump import to PostgreSQL
1. Click on Services -> Restore database.
2. Select the host to restore database on: type your Public IP, user name and password sent by Jelastic.
3. Select the source file for restoring.
4. Select the encoding for script conversion.
5. Select restoring type.
6. Specify restoring 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.
That’s all! Stay tuned to our blog to keep in touch with our news!