Thanks for this very simple and beautiful line !
You could simplify it by only having :
02 0 * * * echo "vacuum verbose;" | psql faq
Frankly, I'd prefer a script that automatically adapt to any added database in the
whole system : as an administrator, I don't want to edit my/postgres crontab each time
a new DB is added to Postgres...
Nicolas
-----Message d'origine-----
De: ZioBudda [SMTP:[EMAIL PROTECTED]]
Date: jeudi 16 décembre 1999 15:09
À: Nicolas Huillard
Cc: '[EMAIL PROTECTED]'
Objet: Re: [ADMIN] Vacuum script
On Thu, 16 Dec 1999, Nicolas Huillard wrote:
> Hello,
>
> Does anybody already wrote a cron script that periodically (with cron) vacuum all
>(or part of all) database on a single server ?
> I'm sure everyone has this kind of stuff :
> $ pg_vacuum [-h hostname] [-u] [options] [dbname]
>
> Can someone share his script, or can I find it on the CVS (please tell me where,
>because I've never used that)
Hi, I have this line in my crontab:
02 0 * * * /usr/bin/psql faq < /home/michel/bin/vacuum
and /home/michel/bin/vacuum is:
vacuum verbose;
Ok, this is not the best, but it works,
Errare è umano, ma per fare veramente casino ci vuole la password di root.
--
Michel <ZioBudda> Morelli [EMAIL PROTECTED]
http://ziobudda.enter.it
Italian Linux FAQ http://ziobudda.enter.it/FAQ/
Italian Linux Press http://ziobudda.enter.it/ILP/
************