Closed agstephens closed 3 years ago
On prima-dm as root:
prima-dm
root
scl enable rh-postgresql96 bash pg_dump -U primavera -f /usr/local/db-backups/testdb.sql primavera_prod gzip /usr/local/db-backups/testdb.sql
Create target dir on prima-dm1:
prima-dm1
mkdir /usr/local/db-backups
On old server:
scp /usr/local/db-backups/testdb.sql.gz prima-dm1.jasmin.ac.uk:/usr/local/db-backups/
On new server prima-dm1:
sudo su postgres psql primavera_prod primavera_prod=# alter role primavera with password '<NEW_PASSWORD>'; ALTER ROLE
Then load it:
cat /usr/local/db-backups/testdb.sql.gz | gunzip | psql -U primavera primavera_prod
Depends on #344
Has been run on the new system.
Dump the old DB and copy the new server
On
prima-dm
asroot
:Create target dir on
prima-dm1
:Loading into new DB
On old server:
On new server
prima-dm1
:Then load it: