How to migrate your PostgreSQL database from OpenShift

06.01.2016 22:53:53

Login to your OpenShift cartridge and backup your database:
rhc ssh -a APP_NAME
cd app-root/data
pg_dump --no-owner APP_NAME > dump.sql
pwd
(to get the absolute dir name)
exit

on your computer:
cmd
rhc scp APP_NAME download c:\Users\YOUR_NAME\Desktop ABSOLUTE_DIR_NAME/dump.sql
createdb -U postgres APP_NAME
psql -U postgres APP_NAME < dump.sql



© Jiri Pinkas | this project on GitHub | related: JavaVids | Maven Central Repository Search | Java školení | Top SQL Blogs | monitored using: sitemonitoring

Top Java Blogs is a Java blog aggregator (with English-written blogs only) focused on Java SE, Java EE, Spring Framework and Hibernate.