Re: Unable to Restor Table Named "User" - Mailing list pgadmin-support
From | Melvin Davidson |
---|---|
Subject | Re: Unable to Restor Table Named "User" |
Date | |
Msg-id | 1682921214.4044434.1434398045765.JavaMail.yahoo@mail.yahoo.com Whole thread Raw |
In response to | Re: Unable to Restor Table Named "User" ("Soule, Cathi (HQP)" <cathi.soule@roberthalf.com>) |
List | pgadmin-support |
Cathi,
If the restore command is reporting no errors "Process returned exit code 0.", but the table exists and has no data, then it is quite probable that
A. The backup was made when there was no data in the table
OR
B. The backup of the user table was made with the
-s or -schema-only flag, which means do not back up data.
I suggest you make a copy of the user backup file and then look through the copy to make sure that data exists there.
FYI, pg_dump does not an create error file, ALL errors are logged to the PostgreSQL error file, which is specified by log_directory and log_filename in postgresql.conf.
Melvin Davidson
Cell 720-320-0155
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com
From: "Soule, Cathi (HQP)" <cathi.soule@roberthalf.com>
To: Melvin Davidson <melvin6925@yahoo.com>; "pgadmin-support@postgresql.org" <pgadmin-support@postgresql.org>
Sent: Monday, June 15, 2015 3:29 PM
Subject: RE: [pgadmin-support] Unable to Restor Table Named "User"
Hi Melvin, Still not working for me – sorry I am new to Postgres and not a unix person--- Any help you can provide is much appreciated.
--The data is not being restored for table ‘user’. It appears that the ‘process returned exit code 0’ msg is for the first step only (connecting to database). Listed below are msgs from 1 of the other 30 backup/restores that were successful – note that there are 2 additional steps (in green) on the successful restore that are not generated for the unsuccessful restore--
--No error file was located.
-- Config settings—
#log_min_messages = warning
#log_min_error_statement = error
--This statement did not produce any results – not can I find an error file
pg_restore -t user -d "u91uqv3kafdja7" "E:\20150611 Mig32QA user5.backup"
SAMPLE SUCCESSFUL RESTORE--
C:/Program Files/PostgreSQL/9.4/bin\pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "d27qs7oej1f23" --no-password --data-only --table skill__c --schema salesforce_mig32 --verbose "E:\20150611 Mig32QA skill.backup"
pg_restore: connecting to database for restore
pg_restore: processing data for table "skill__c"
pg_restore: setting owner and privileges for TABLE DATA skill__c
Process returned exit code 0.
UNSUCCESSFUL RESTORE TO A TABLE NAMED USER
C:/Program Files/PostgreSQL/9.4/bin\pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "d27qs7oej1f23" --no-password --data-only --table \"user\" --schema salesforce_mig32 --verbose "E:\20150611 Mig32QA user4.backup"
pg_restore: connecting to database for restore
Process returned exit code 0.
From: Melvin Davidson [mailto:melvin6925@yahoo.com]
Sent: Monday, June 15, 2015 10:50 AM
To: Soule, Cathi (HQP); pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Unable to Restor Table Named "User"
Sent: Monday, June 15, 2015 10:50 AM
To: Soule, Cathi (HQP); pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Unable to Restor Table Named "User"
"Process returned exit code 0." Indicates No errors occurred during the restore, so I do not understand
what exactly your problem is. Are there any errors in the PostgreSQL error log file with regards to your "user" table?
What is the setting for
log_min_messages & log_min_error_statement in postgresql.conf?
Try restoring by specifying just the user table.
what exactly your problem is. Are there any errors in the PostgreSQL error log file with regards to your "user" table?
What is the setting for
log_min_messages & log_min_error_statement in postgresql.conf?
Try restoring by specifying just the user table.
IOW:
pg_restore -t user -d yourdb your_dump_file
pg_restore -t user -d yourdb your_dump_file
Then see if any errors are returned.
From: "Soule, Cathi (HQP)" <cathi.soule@roberthalf.com>
To: "pgadmin-support@postgresql.org" <pgadmin-support@postgresql.org>
Sent: Monday, June 15, 2015 1:34 PM
Subject: [pgadmin-support] Unable to Restor Table Named "User"
To: "pgadmin-support@postgresql.org" <pgadmin-support@postgresql.org>
Sent: Monday, June 15, 2015 1:34 PM
Subject: [pgadmin-support] Unable to Restor Table Named "User"
Hello,
We are not able to restore a table using pgAdmin from object browser. We have been successful using backup / restore functions with 30 other tables. However, we are not able to restore one table named ‘user’. Here are details: Thank you!
- pgAdmin version 1.20.0
- Windows 7, 64-bit
Messages returned is as follows. Note that a successful restore had 2 additional msgs (pg_restore: processing data for table "skillc" pg_restore: setting owner and privileges for TABLE DATA skillc). Defaults were used on backup and restore. Does anyone know how to resolve? Thank you for any help!
MESSAGES RETURNED FROM UNSUCCESSFUL RESTORE--
C:/Program Files/PostgreSQL/9.4/bin\pg_restore.exe --host localhost --port
5432 --username "postgres" --dbname "d27qs7oej1f23" --no-password --data-only --table \"user\" --schema xyz1 --verbose "E:\20150611 Mig32QA user4.backup"
pg_restore: connecting to database for restore Process returned exit code 0.
Cathi Soule
pgadmin-support by date: