Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2010
    Posts
    4

    Unanswered: Backup Postgres database remotely

    Hi All,

    I am new to postgresql. I have pgadmin installed on my windows machine locally using which i m connecting to the client server and accessing the database. I want to take the backup of client database. but it seems hard the database is very large. and when i select any database and hit backup for that database it does not give me any error message but it hangs at that point. To fix this i have to restart the pgadmin.

    am i missing on something? please help.

    Thanks in advance.
    Regards,
    Manasi.

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    I assume pgAdmin is simply waiting for pg_dump to finish.

    Just try to run pg_dump from the commandline and check the output for any errors.

    But when the DB is large (btw: what is "large" in your terms?) then - depending on the network - it might indeed some time to backup it.

    I would also strongly suggest you put pg_dump into a batch/shell script and run that through a scheduler on a regular basis.

  3. #3
    Join Date
    Nov 2010
    Posts
    4
    Thank you for your reply.

    Large means I have a database which has number of records in each table. Also as i said.... it might because of network...but i want to understand when pgadmin is executing this backup process i m getting why the admin tool is getting hangged and say "Not Responding". right now i just tried to backup 1 table which has around 300000 rows in it. it is been more than 15 mins now my pgadmin says "not responding".

  4. #4
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    15 minutes for 300000 is way too - much unless you have a very slow network.
    (and besides 300000 is definitely not "large" )

    Does it work (or how long does it take) when you run pg_dump directly from the commandline?

  5. #5
    Join Date
    Nov 2010
    Posts
    4
    When I am taking backup of a table using pgdump command i m getting following error:-

    pg_dump.exe --host 1.10.20.1 --port 5432 --username postsql --file "C:\User\Database\Desktop\myfiles_20101129.bac kup" --table public.mytbl "mydb"

    pg_dump: [archiver] could not open output file "C:\User\Database\Desktop\myfiles_20101129.backup" : No such file or directory

  6. #6
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Well, apparently the directory "C:\User\Database\Desktop" does not exist

  7. #7
    Join Date
    Nov 2010
    Posts
    4
    The path C:/Users/Database/Desktop is my local machine path.
    Is it something I have to provide path of the server........from where i m taking the backup?

  8. #8
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    And you did run pg_dump locally on your desktop?

Tags for this Thread

Posting Permissions

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