Re: Create Linux Script for PostgreSQL database backup

From: Sanjay Arora <skpobox(at)gawab(dot)com>
To: Kaolin Fire <cognosco(at)tentacle(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org, research_2004(at)yahoo(dot)com
Subject: Re: Create Linux Script for PostgreSQL database backup
Date: 2004-09-03 15:28:29
Message-ID: 1094225309.3105.33.camel@Sewak.Asr.Lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, 2004-09-02 at 12:26, Kaolin Fire wrote:

>
> echo "1 3 * * * postgres /usr/local/bin/pg_dumpall >
> ~/backup.sql" >> /etc/crontab
>
> note to remember the two >>'s so you don't obliterate your crontab like
> I just did.
>

Would someone tell of a modification to this script that would:

1. create a file/directory based upon the date & time to create the
backup file in. ;-) [some people are shameless about asking about
pre-cooked food]

2. If a file DB has large objects..to dump it seperately...or does one
have to enumerate each of the databases individually & dump them, in
this case.

3. In case, databases have to be dumped seperately in the above...any
script to find out existing databases, if they have lo and dump
accordingly.

4. Take care that each file size does not exceed OS file limits.

You must always help the shameless & the lazy....for they are Gods own
people ;-)

With best regards.
Sanjay.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Adi Alurkar 2004-09-03 17:03:11 Re: Dump/Restore vs Vacuum Full
Previous Message pginfo 2004-09-03 04:47:46 Selecting HW RAID controller