Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    4

    Unanswered: Postgersql database backup and recovery...

    Hi,
    In my application I need to use old database present on postgersql at client site. For that I have created dump using

    pg_dump -o db_name | gzip > db_dump

    command at the client site and then downloaded the dump on local server. But when I am trying to restore, it only restore the empty database tables. I am using following command to restore the database.

    /usr/local/pgsql/bin/psql db_name < db_dump

    Client postgresql ver is 7.1 and I am using 7.4. Also the size of database is about 600 MB.

    Is it depends on the size or version?

    So what shuold be right procedure to restore the database at my server from the remote server?

    Where I am going wrong?

    Thank!

    Regard,

    Gajanan C.

  2. #2
    Join Date
    Mar 2004
    Posts
    110

    pg_restore

    Ever tried using pg_restore and see if that makes any diffrences?

    -Ed

  3. #3
    Join Date
    Apr 2004
    Posts
    4

    Re: pg_restore

    Originally posted by Edje
    Ever tried using pg_restore and see if that makes any diffrences?

    -Ed

    Hi Edje,
    As you told. I have tried the pg_restore with different combination of options as follows :

    user: postgres
    working dir= /usr/local/pgsql/bin
    commandline:
    pg_restore -c -d db_name -U postgres -W /home/casey/temp_dump.gz

    But it displays the message:
    pg_restore:[archiver] input file does not appear to be valid archive.
    and it stops doing.

    What it mean???
    Expecting reply at the earlist.
    Thanks!
    Regard,
    Gajanan

  4. #4
    Join Date
    Mar 2004
    Posts
    110
    Im not a linux kind of guy but i think u are "zipping" the dump file right?

    what if you dump your db.. and try to recreate it on a testdb in your db cluster?
    If that is succesfull, u know the dumpfile is ok.

    Im not aware of any problems between 7.1 and 7.4 version.. but then again, im too new to know any stuff about that.

    Another possibility is that the file hasnt been zipped propperly as you get the error: is not a valid archive.

    Perhaps some problems occured during zipping the file. And now when you try to unzip it.. it generates an error.

    As far as my newbie perspective let me see it, looks like their could be multiple problems..

    Goodluck.

    -Ed

Posting Permissions

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