Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Location
    Knoxville, TN
    Posts
    4

    Unanswered: Problem restoring a single table pg_dump file using pg_restore

    I am having problems restoring a dump file for a single table. The command I used to export the data from the table using pg_dump is below.

    pg_dump -h <hostname> -p <port number> -U ftr -F t -a -v -f "<filename with full path>.tar" -t 'ftr.users' <database name which is not the postgres database>

    The restore command I am using is below:

    pg_restore -h <hostname> -p <port number> -U ftr -W -F t -a -v -t 'ftr.users' <filename with full path> -d <database name>

    I am trying to restore this to a different database from the database that I exported the data from. This database is on the same server with a different port number and different database cluster.

    The table has a BYTEA data type but I have tried exporting/importing a table without a BYTEA data type with the same results.

    The way the pg_restore command reacts is as follows:

    1) Prompts for password
    2) I enter password
    3) Command returns immediately to the command prompt.
    4) I check to see if the data is in the table and it is not.

    Any help would be greatly appreciated.

    Thanks,

    Sandra Arnold

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Sandra, is ftr an admin superuser (from the -U ftr clause) ??? Superuser privileges are needed in order to restore...

    As an alternate approach, if you save the file in plain text mode, (script) you can feed the script to psql, or, depending upon the amount of data, load it into pgAdmin & execute it there.
    Last edited by loquin; 03-05-09 at 16:17.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •