User Profile

Collapse

Profile Sidebar

Collapse
clearissues
clearissues
Last Activity: May 15 '08, 01:02 PM
Joined: Apr 23 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • backup and restore are done by "postgres" user. I have just incorporated the pgsq_restore snippet in my python script.

    The python script is invoked as 'root' which does the dump and restore.
    Code snippet:
    Code:
     def dump_db(self):
            if not os.path.exists(self.db_backup_file_path):
                try:
                    os.makedirs(self.db_backup_file_path)
                except:
    ...
    See more | Go to post
    Last edited by eWish; Apr 23 '08, 04:07 PM. Reason: Please use code tags

    Leave a comment:


  • Unable to restore postgres-dump-Version-8.2.4

    Hi All,

    I have a python script which takes dump of postgres and restores the same.

    When i take a dump there is no problem.
    command to take dump:
    Code:
    pg_dump -b -c -C --format=c -d -h <<hostname>> -p 5432 -U postuser -f /tmp/april_23/abc.sql abc
    Restore command:
    Code:
    pg_restore -c --format=c -h <<hostname>> -p 5432 -U postuser -d sfdb /tmp/april_23/abc.sql
    ...
    See more | Go to post
    Last edited by eWish; Apr 23 '08, 04:08 PM. Reason: Please use code tags
No activity results to display
Show More
Working...