In this scenario, we have multiple projects(A/B/C/D) in backup but want to restore one project (project A) only.
If we have
- a database backup
- an empty instance
we can follow steps
1. backup the whole database
$ sudo -u postgres /usr/bin/pg_dump iriusprod | gzip > /tmp/irius.$(date +%s).sql.gz
2. restore the backup to an empty instance
$ gunzip irius.1581934075.sql.gz
$ sudo -u postgres /bin/bash -c 'echo "DROP DATABASE iriusprod; CREATE DATABASE iriusprod with owner=iriusprod" | /usr/bin/psql'
$ sudo -u postgres /usr/bin/psql iriusprod <irius.1581934075.sql
3. reset password if needed
4. export project A, https://iriusrisk.zendesk.com/knowledge/articles/6883332963473/en-us?brand_id=360002015911
5. import project A
Comments
0 comments
Please sign in to leave a comment.