LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-21-2010, 06:18 AM   #1
bilalcochin
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Rep: Reputation: 0
How to restore pgdumpall data


Hello,

I regularly take pgdumpall from production database and restore the staging database.
Production database size is 4.5 GB.
After restoring the staging database size is incremented.

The following command is used to restore pgdumpall file.

psql -U postgres -f dbdumpall

My aim is to sync up production database and staging database.

Any solution?

Thanks
 
Old 02-21-2010, 12:05 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You'll be wanting to look at something like maybe DBI-link
or a solution like Slony. With pgdumpall you can't do anything
that resembles incremental backups, and if you have any form
of constraints on the target database the import will fail.

You could conceivably use a user-defined function that skips
insert when the target row exists, but I'd expect that to take
a rather long time to complete given the size of your DB.


Cheers,
Tink
 
Old 02-22-2010, 03:37 AM   #3
bilalcochin
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Hi Tinkster,

Thanks for the reply.
How to set up a slony in production servers without down time?

Thanks
 
Old 02-22-2010, 10:43 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I'd recommend reading their documentation, but I think it can't
be done w/o any downtime at all ... in a mission-critical
environment this wouldn't be very good.

The next best approach would be to see whether you can export
data on criteria like the age of a record or something like
that - of course you haven't given us no indication as to what
the nature of the data is, the complexity of the data and
relationships between tables.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restore data from LVM Mirror eldo Linux - Server 1 11-17-2009 05:13 PM
Mandrake puked on me. Can't restore data drysac Mandriva 2 12-29-2004 07:00 PM
how to restore all my data anilux Linux - General 6 08-23-2004 05:30 AM
MYSQL data restore pattar Linux - Software 1 02-17-2003 08:55 PM
disk data restore zeky Linux - General 0 08-05-2002 07:08 AM


All times are GMT -5. The time now is 06:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration