Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://849944]
[RonW]: RPerl is only a curiosity to me. I can see where some one who primarily codes in Perl might find RPerl useful, but to me, given the choice between RPerl's restrictions and C, I'd choose C
[LanX]: Rperl had better chances as alternative for inline::cpp
[LanX]: thus optimizing inner loops
[LanX]: .... well

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2017-05-22 20:47 GMT
Find Nodes?
    Voting Booth?