Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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.

http://www.postgresql.org/docs/current/static/app-pgdump.html

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.

HTH,
SSF


Comment on Re: conditional backup in postgres
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2014-07-11 12:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (224 votes), past polls