Link to home
Start Free TrialLog in
Avatar of astar666
astar666Flag for United States of America

asked on

pg_restore in postgresql for restoring users

I am testing a backup of a postgres database.  It was backed up using a Fc option and I am using pg_restore to restore the database.  The original database is on a web site and I am restoring to a local database for test purposes.  I use a command like pg_restore -d fsn postgresql-fsn-7* to do the restore. Spot checking, the relations and data is restored, but the users are not.  How do I get the users to restore? Here is the tail of the error messages:

pg_restore: [archiver (db)] could not execute query: ERROR:  user "changegroupupdate" does not exist
    Command was: GRANT SELECT,UPDATE,DELETE ON TABLE groups TO changegroupupdate;
pg_restore: [archiver (db)] Error from TOC entry 49; 0 32623 ACL activities rootpg_restore: [archiver (db)] could not execute query: ERROR:  user "addactivitylog" does not exist
    Command was: GRANT INSERT,SELECT ON TABLE activities TO addactivitylog;
pg_restore: [archiver (db)] Error from TOC entry 55; 0 32623 ACL activities_activityid_seq root
pg_restore: [archiver (db)] could not execute query: ERROR:  user "addactivitylog" does not exist
    Command was: GRANT ALL ON TABLE activities_activityid_seq TO addactivitylog;pg_restore: [archiver (db)] Error from TOC entry 51; 0 32629 ACL activityservice root
pg_restore: [archiver (db)] could not execute query: ERROR:  user "addactivitylog" does not exist
    Command was: GRANT INSERT ON TABLE activityservice TO addactivitylog;
WARNING: errors ignored on restore: 294
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial