Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

DB migration steps

Krzysztof Kaczmarczyk edited this page Oct 17, 2019 · 4 revisions

Below steps are needed for the migration of existing DB to a new empty one.

Making a DB dump.

pg_dump --host RDSHOSTNAME --port 5432 --username "USERNAME" --format custom --blobs --verbose --file "ServiceNet.backup" "ServiceNet"

Creating an empty DB.

createdb --host RDSHOSTNAME --username "USERNAME" -W "ServiceNetCopy"

Load previously created DB dump to empty DB.

pg_restore --host RDSHOSTNAME --port 5432 --username "USERNAME" --dbname "ServiceNetCopy" --verbose "ServiceNet.backup"

See the ticket for discussion: https://github.com/benetech/ServiceNet/issues/631