2ndQuadrant is now part of EDB

Bringing together some of the world's top PostgreSQL experts.

2ndQuadrant | PostgreSQL
Mission Critical Databases
  • Contact us
  • EN
    • FR
    • IT
    • ES
    • DE
    • PT
  • Support & Services
  • Products
  • Downloads
    • Installers
      • Postgres Installer
      • 2UDA – Unified Data Analytics
    • Whitepapers
      • Business Case for PostgreSQL Support
      • Security Best Practices for PostgreSQL
    • Case Studies
      • Performance Tuning
        • BenchPrep
        • tastyworks
      • Distributed Clusters
        • ClickUp
        • European Space Agency (ESA)
        • Telefónica del Sur
        • Animal Logic
      • Database Administration
        • Agilis Systems
      • Professional Training
        • Met Office
        • London & Partners
      • Database Upgrades
        • Alfred Wegener Institute (AWI)
      • Database Migration
        • International Game Technology (IGT)
        • Healthcare Software Solutions (HSS)
        • Navionics
  • Postgres Learning Center
    • Webinars
      • Upcoming Webinars
      • Webinar Library
    • Whitepapers
      • Business Case for PostgreSQL Support
      • Security Best Practices for PostgreSQL
    • Blog
    • Training
      • Course Catalogue
    • Case Studies
      • Performance Tuning
        • BenchPrep
        • tastyworks
      • Distributed Clusters
        • ClickUp
        • European Space Agency (ESA)
        • Telefónica del Sur
        • Animal Logic
      • Database Administration
        • Agilis Systems
      • Professional Training
        • Met Office
        • London & Partners
      • Database Upgrades
        • Alfred Wegener Institute (AWI)
      • Database Migration
        • International Game Technology (IGT)
        • Healthcare Software Solutions (HSS)
        • Navionics
    • Books
      • PostgreSQL 11 Administration Cookbook
      • PostgreSQL 10 Administration Cookbook
      • PostgreSQL High Availability Cookbook – 2nd Edition
      • PostgreSQL 9 Administration Cookbook – 3rd Edition
      • PostgreSQL Server Programming Cookbook – 2nd Edition
      • PostgreSQL 9 Cookbook – Chinese Edition
    • Videos
    • Events
    • PostgreSQL
      • PostgreSQL – History
      • Who uses PostgreSQL?
      • PostgreSQL FAQ
      • PostgreSQL vs MySQL
      • The Business Case for PostgreSQL
      • Security Information
      • Documentation
  • About Us
    • About 2ndQuadrant
    • 2ndQuadrant’s Passion for PostgreSQL
    • News
    • Careers
    • Team Profile
  • Blog
  • Menu Menu
You are here: Home1 / Blog2 / Greenplum3 / Using gpmigrator in Greenplum 4.1.1
Carlo Ascani

Using gpmigrator in Greenplum 4.1.1

October 17, 2011/0 Comments/in Greenplum /by Carlo Ascani

In this article, I am going to upgrade a Greenplum cluster from version 4.0 to 4.1 using `gpmigrator`.
`gpmigrator` is an utility shipped with Greenplum Community Edition whose purpose is to perform a live upgrade of an existing database.


Requirements
——————
In order for you to follow this article, you need a Greenplum 4.0 cluster up and running.
I assume it has been installed in the standard path: `/usr/local/greenplum-db-4.0.4.0`.
You must not have mirrors in your cluster, otherwise `gpmigrator` *will fail*.
If you have to upgrade a cluster with mirrors, see `gpmigrator_mirror` instead.
`gpmigrator` 4.1 upgrades a 4.0 cluster to 4.1 *strictly*, do not try to upgrade a prior version.
If you really want to upgrade from 3.3.x to 4.1, please do it in two separate steps: first upgrade to 4.0, then to 4.1.
The preparation ritual
—————————
Details are important.
To upgrade Greenplum and be happy with it, you must perform some preparation steps:
* Install Greenplum 4.1 (I assume you will install it in default path `/usr/local/greenplum-db-4.1.4.1`)
* If you have any custom module, copy it from the actual Greenplum location (`/usr/local/greenplum-db-4.0.4.0/lib`) to the new version location (`/usr/local/greenplum-db-4.1.4.1/lib`)
* Do the same with any PostgreSQL module, if present. Copy it from `/usr/local/greenplum-db-4.0.4.0/lib/postgresql` to `/usr/local/greenplum-db-4.1.4.1/lib/postgresql`
* There must not be any failed segments in your current Greenplum system (you can recover any failed segment using `gprecoverseg` – please refer to the AdminGuide version 4.0 to find detailed information on such a task)
* Make a backup of your cluster! This is not necessary but *highly* recommended, in case any problem should occur
* Remove the standby master from your system configuration (`gpinitstandby -r`)
* Do a clean shutdown of your current system (`gpstop`)
_Yes, `gpmigrator` needs a downtime of the server, so please be careful to take the required precautions about clients connecting to it._
* Update gpadmin’s `.bashrc` or `.bash_profile` to source the new greeenplum path file:

$ cat ~gpadmin/.bashrc | grep greenplum-db-4.1
source /usr/local/greenplum-db-4.1.1.1/greenplum_path.sh


The actual upgrade
------------------------
After all this work, we are able to launch the one-command magic that will upgrade Greenplum.
`gpmigrator` has a very simple usage, you can find detailed informations and the available options with:

$ gpmigrator --help

or by reading the `gpmigrator` page in the Greenplum 4.1 AdminGuide, under the section named _"Appendix B: Management Utility Reference"_.
We are ready to launch it. As `gpadmin`, type:

$ /usr/local/greenplum-db-4.1.1.1/bin/gpmigrator /usr/local/greenplum-db-4.0.4.0 /usr/local/greenplum-db-4.1.1.1


if everything works fine, the last bits of information to be displayed will be:

...
20111014:13:55:05:gpmigrator:centos:gpadmin-[INFO]:-Removing temporary directori
20111014:13:55:05:gpmigrator:centos:gpadmin-[INFO]:-----------------------------
20111014:13:55:05:gpmigrator:centos:gpadmin-[INFO]:-Upgrade Successful
20111014:13:55:05:gpmigrator:centos:gpadmin-[INFO]:-----------------------------
20111014:13:55:05:gpmigrator:centos:gpadmin-[INFO]:-Please consult release notes
20111014:13:55:05:gpmigrator:centos:gpadmin-[INFO]:-instructions to complete env
20111014:13:55:05:gpmigrator:centos:gpadmin-[INFO]:-----------------------------


As you can see in the command above, we have specified on the command line the _old_ `$GP_HOME`, and the _new_ one.
`GP_HOME` is the directory where you have installed Greenplum. Change it accordingly to your installation paths.

Tags: gpmigrator, greenplum, postgres, PostgreSQL
Share this entry
  • Share on Facebook
  • Share on Twitter
  • Share on WhatsApp
  • Share on LinkedIn
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Get in touch with us!

Recent Posts

  • Random Data December 3, 2020
  • Webinar: COMMIT Without Fear – The Beauty of CAMO [Follow Up] November 13, 2020
  • Full-text search since PostgreSQL 8.3 November 5, 2020
  • Random numbers November 3, 2020
  • Webinar: Best Practices for Bulk Data Loading in PostgreSQL [Follow Up] November 2, 2020

Featured External Blogs

Tomas Vondra's Blog

Our Bloggers

  • Simon Riggs
  • Alvaro Herrera
  • Andrew Dunstan
  • Craig Ringer
  • Francesco Canovai
  • Gabriele Bartolini
  • Giulio Calacoci
  • Ian Barwick
  • Marco Nenciarini
  • Mark Wong
  • Pavan Deolasee
  • Petr Jelinek
  • Shaun Thomas
  • Tomas Vondra
  • Umair Shahid

PostgreSQL Cloud

2QLovesPG 2UDA 9.6 backup Barman BDR Business Continuity community conference database DBA development devops disaster recovery greenplum Hot Standby JSON JSONB logical replication monitoring OmniDB open source Orange performance PG12 pgbarman pglogical PG Phriday postgres Postgres-BDR postgres-xl PostgreSQL PostgreSQL 9.6 PostgreSQL10 PostgreSQL11 PostgreSQL 11 PostgreSQL 11 New Features postgresql repmgr Recovery replication security sql wal webinar webinars

Support & Services

24/7 Production Support

Developer Support

Remote DBA for PostgreSQL

PostgreSQL Database Monitoring

PostgreSQL Health Check

PostgreSQL Performance Tuning

Database Security Audit

Upgrade PostgreSQL

PostgreSQL Migration Assessment

Migrate from Oracle to PostgreSQL

Products

HA Postgres Clusters

Postgres-BDR®

2ndQPostgres

pglogical

repmgr

Barman

Postgres Cloud Manager

SQL Firewall

Postgres-XL

OmniDB

Postgres Installer

2UDA

Postgres Learning Center

Introducing Postgres

Blog

Webinars

Books

Videos

Training

Case Studies

Events

About Us

About 2ndQuadrant

What does 2ndQuadrant Mean?

News

Careers 

Team Profile

© 2ndQuadrant Ltd. All rights reserved. | Privacy Policy
  • Twitter
  • LinkedIn
  • Facebook
  • Youtube
  • Mail
Call for papers for PGDay.IT 2011 has been extended ETL with Kettle and Greenplum – Part Two: importing data
Scroll to top
×