Lets say my database have 4 tables A,B,C and D..Now I want while restoring data of table A and B remains unchanged and data of C and D should changed. I am using below command to restore the dump. pg_restore --verbose --no-acl --no-owner -h localhost -d db_name latest.dump
command for taking dump pg_dump -Fc database_name > ~/Downloads/latest-stage.dump
here I am using clean flag because If I dont use it then It will generate error related to indexing and key constraints.
NOTE : Basically I am moving my data from one server to another server but I want data of few table should not change.
Aucun commentaire:
Enregistrer un commentaire