Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: conditional backup in postgres

by sflitman (Hermit)
on Jul 16, 2010 at 08:53 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found