RE: [GENERAL] backup/maintenance scripts? - Mailing list pgsql-general

From Nicolas Huillard
Subject RE: [GENERAL] backup/maintenance scripts?
Date
Msg-id 01BF68F2.16CD7080@agen.int.ghs
Whole thread Raw
List pgsql-general
I use this one, after having asked on the list for this kind of stuff. It only does vacuum, because backup may be a lot
morespecific for each one. 
It works on RedHat :

========================================
[root@fleurance cron.daily]# cat /etc/cron.daily/postgresql
#!/bin/sh

su postgres -c 'psql -t -c "select datname from pg_database order by datname;" template1 | xargs -n 1 psql -q -c
"vacuumanalyze;"' 
[root@fleurance cron.daily]#
========================================


RedHat has the gentle facility to run every script in /etc/cron.daily, each day, according to this crontab :

========================================
[root@fleurance /etc]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
[root@fleurance /etc]#
========================================


Yours,

Nicolas huillard

-----Message d'origine-----
De:    Bruce Bantos [SMTP:anon@mgfairfax.rr.com]
Date:    jeudi 27 janvier 2000 17:35
À:    pgsql-general@postgreSQL.org
Objet:    [GENERAL] backup/maintenance scripts?

I asked a similar question yesterday about scheduling backups and vacuum,
but I thought I would make a more direct request:

Does anyone have an example of a postgreSQL scheduled maintenance script
(cron job, other) that they would care to share with the list? An example of
a script that performs vacuums, creates backups, etc would be great. Perhaps
we could add a section on routine maintenance in the docs and include a good
script example.

Thanks,

Bruce


************


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [SQL] RE: [GENERAL] Problem with SELECT on large negative INT4
Next
From: mwilson@the-wire.com (Mel Wilson)
Date:
Subject: Re: [GENERAL] Trouble: subquery doesn't terminate