Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: conditional backup in postgres

by sflitman (Hermit)
on Jul 16, 2010 at 08:53 UTC ( #849944=note: print w/ replies, xml ) Need Help??

in reply to conditional backup in postgres

I work a lot in postgres and I find pg_dump to be a useful command, since I can call it in a cronjob.

I don't think it accepts the Where clause.

An alternative would be to run a command like this:

psql mydb -c "select * from C_order where period=2009 and org<>'A'"
And then you'll have output you could save. Look up the psql command's options, it will probably let you make the output more useful for your backup policy.


Comment on Re: conditional backup in postgres
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://849944]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-31 23:32 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (282 votes), past polls