

Pgqadm.py /opt/skytools-2.1.12/share/doc/skytools/conf/pgqadm.ini status Note: “-d” option is to run the londiste/PgQ daemons in background. Londiste.py /opt/skytools-2.1.12/share/doc/skytools/conf/londiste.ini replay -d Pgqadm.py /opt/skytools-2.1.12/share/doc/skytools/conf/pgqadm.ini ticker -d
AWS POSTGRESQL 12 INSTALL
Pgqadm.py /opt/skytools-2.1.12/share/doc/skytools/conf/pgqadm.ini install So, first ensure connectivity using telnet from the server on host and port. Londiste.py /opt/skytools-2.1.12/share/doc/skytools/conf/londiste.ini subscriber install Note: Error may occur if the current server you are working on has no access to the provider DB host or subscriber host. Londiste.py /opt/skytools-2.1.12/share/doc/skytools/conf/londiste.ini provider install the destination DB, whether it is accessible or not. We need londiste.ini file to validate the provider DB & the suscriber DB i.e. Install londiste.ini and install provider DB & subscriber DB( go to /opt/skytools-2.1.12/bin/) Now, install the ini file and for that cd into /opt/skytools-2.1.12/share/doc/skytools/conf/ directoryĪlso, just before that go to /opt/skytools-2.1.12/lib/python2.6/site-packages/skytools and increase the timeout in the file psycopgwrapper.py so that connection does not break if the host machine’s DB takes time to reply. I Have kept 2 sets of log & pid files different data in both. One log & pid file will be in /opt/skytools-2.1.12/share/doc/skytools/confįor Londiste.ini & the other set in /var/lib/postgresql/ /log & /pid folders. It checks what has changed in the master in that interval of time and replicates onto the RDS Instance. I have kept the maint_delay_min to 5 minutes. Now, lets edit pgqadm.ini in the same directory:
-1612445327857.jpg)

Make sure postgres user has access to the directory. Then enter log file locations of your choice. In subscriber(destination) line: Enter same set of details for subscriber_db.
AWS POSTGRESQL 12 PASSWORD
I have not entered the username and password for this DB server since the credentials are in the PostgreSQL conf file. Host= (hostname of EC2 PostgreSQL server) In provider(source) line: Enter provider_db details: Londiste.ini should look something like below: So, for ease of use we will edit the example file itself and use it. Londiste provides us with some default docs and files. Edit the londiste.ini & pgqadm.ini Files in the below directory cd /opt/skytools-2.1.12/share/doc/skytools/conf” Set the LD_LIBRARY_PATH & PYTHONPATH and start the two newly created clusters.Įxport PYTHONPATH=/opt/skytools-2.1.12/lib/python2.6/site-packages/Įxport LD_LIBRARY_PATH=/usr/lib/postgresql/9.1/lib/:/usr/lib:/opt/perlbrew/perls/perl-ĥ.14.2/lib/5.14.2/x86_64-linux-gnu/CORE: ĥ. Give the postgres user (the user which automatically gets created when you install postgreSQL)Ĭhown -R postgres:postgres /opt/skytools-2.1.12Ĭhown -R postgres:postgres /usr/lib/postgresql/9.1/

Python setup.py build_ext –pg-config /usr/lib/postgresql/9.1/bin/pg_config Python setup.py install –prefix=/usr/local Install psycopg2 by running the following commands: (/usr/lib/postgresql/9.1/bin/pg_config is the directory of postgreSQL config file and you can locate the file by using locate bash command)Ģ. configure –prefix=/opt/skytools-2.1.12 –with pgconfig=/usr/lib/postgresql/9.1/bin/pg_config Install Skytools by running the following commands:
AWS POSTGRESQL 12 DOWNLOAD
The packages you would need to download are: The postgreSQL version is 9.1 in my case. PrerequisitesĪll steps are basically for Ubuntu but just with minimal changes it will work on any other OS. Once the production DB is in sync with AWS RDS DB we make the DB host change in our application. We will achieve this by connecting the production PosgreSQL to the AWS RDS PostgreSQL which is production live and then starting the replication. The thing to remember here is you don’t get a bash shell for AWS RDS. So, you can follow these steps to migrate running PostgreSQL. I read about Londiste – A tool that makes that happen easily. I had to migrate my PostgreSQL running on an EC2 server to RDS PostgreSQL for production environment with NO to minimal downtime & NO data loss which occurs when we usually make a dump, restore it and change the DB host. From on-premise to cloud or on-premise to on-premise or cloud to on-premise. The steps discussed in the blog can be used for any kind of migration of PostgreSQL. It is the second most popular Structured Query Language after MySQL.
