Skip to content

Instantly share code, notes, and snippets.

@jkatz
Created November 7, 2011 20:17
Show Gist options
  • Save jkatz/1346031 to your computer and use it in GitHub Desktop.
Save jkatz/1346031 to your computer and use it in GitHub Desktop.
When you run pg_upgrade, you must provide the following information:
the data directory for the old cluster (-d OLDDATADIR)
the data directory for the new cluster (-D NEWDATADIR)
the "bin" directory for the old version (-b OLDBINDIR)
the "bin" directory for the new version (-B NEWBINDIR)
For example:
pg_upgrade -d oldCluster/data -D newCluster/data -b oldCluster/bin -B newCluster/bin
or
$ export OLDDATADIR=oldCluster/data
$ export NEWDATADIR=newCluster/data
$ export OLDBINDIR=oldCluster/bin
$ export NEWBINDIR=newCluster/bin
$ pg_upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment