-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
2.14.1 GA
-
None
When using PostgreSQL as the internal system database (using `system-postgresql` dc instead of `system-mysql`) and following our product documentation backup/restore, it will cover only when using system-mysql
Need to add the command to dump the `system` database from `system-postgresql` POD:
oc rsh $(oc get pods -l 'deploymentConfig=system-postgresql' -o json | jq -r '.items[0].metadata.name') bash -c 'pg_dump system' | gzip > system-postgresql-system.gz
and the restore commands:
1. Copy the system database dump to the `system-postgresql` pod:
$ oc cp ./system-postgresql-system.gz $(oc get pods -l 'deploymentConfig=system-postgresql' -o json | jq '.items[0].metadata.name' -r):/var/lib/pgsql/
2. Decompress the backup file:
$ oc rsh $(oc get pods -l 'deploymentConfig=system-postgresql' -o json | jq -r '.items[0].metadata.name') bash -c 'gzip -d /var/lib/pgsql/system-postgresql-system.gz'
3. Restore system database backup file:
oc rsh $(oc get pods -l 'deploymentConfig=system-postgresql' -o json | jq -r '.items[0].metadata.name') bash -c 'psql system -f /var/lib/pgsql/system-postgresql-system'