Project

General

Profile

Task #2894

Story #2720: KNB, LTER, PISCO, ESA, SANPARKS roll out

Task #2882: KNB MN upgrade

Detail steps for moving postgres db to new KNB

Added by Ben Leinfelder almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ben Leinfelder
Category:
-
Start date:
2012-06-08
Due date:
% Done:

100%

Milestone:
CCI-1.0.0
Product Version:
*
Story Points:
Sprint:

Description

The script uses pg_dump for the knb database. We should run this after shutting down tomcat to ensure consistency with the filesystem.
For reference, the nightly script on old KNB: /var/lib/postgresql/dumps/pg_nightly_backup.sh

On original server:
sudo -u postgres bash -c "/usr/bin/pg_dump -Fc knb > /var/lib/postgresql/dumps/knb-nightly.dump"
scp /var/lib/postgresql/dumps/knb-nightly.dump leinfelder@mn-ucsb-3.dataone.org:/tmp/knb-nightly.dump

On target KNB:
sudo -u postgres bash -c "/usr/bin/pg_restore --disable-triggers --jobs=12 -d knb /tmp/knb-nightly.dump"

History

#1 Updated by Ben Leinfelder almost 12 years ago

  • Status changed from New to In Progress

#2 Updated by Ben Leinfelder almost 12 years ago

added:
--jobs=12
--disable-triggers
to hopefully speed up the load time. We should have 12 processors on mn-ucsb-2 if the stats are correct and PG says it can utilize threads to load.

#3 Updated by Ben Leinfelder almost 12 years ago

  • % Done changed from 0 to 60

Initial transfer and load is done. pg_restore step still takes 2-7 hours (sorry, I went to bed before it finished so don't have a better estimate)

#4 Updated by Ben Leinfelder almost 12 years ago

  • Status changed from In Progress to Closed

DB is migrated over (preliminarily). Will need to do it again for final production switch.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)