Re: Shell Script for Vacuum - Mailing list pgsql-admin

From raghu ram
Subject Re: Shell Script for Vacuum
Date
Msg-id CALnrrJTiWbu9dWeTKPn-=zYgBoP7U-sjuc4o8+Yxxnc1gRmC2Q@mail.gmail.com
Whole thread Raw
In response to Re: Shell Script for Vacuum  (Manish Kediyal <kediyal.manish@gmail.com>)
Responses Re: Shell Script for Vacuum  (Manish Kediyal <kediyal.manish@gmail.com>)
List pgsql-admin

On Mon, Jul 29, 2013 at 1:07 PM, Manish Kediyal <kediyal.manish@gmail.com> wrote:
Thanks Raghu,

Is there a shell script for it, i wanna scheduled that through cron.


You can create below Script for scheduling purpose:

#!/bin/bash
PGHOME=/opt/PostgreSQL/9.2/bin
LOG=/Backup/cron-script-logs
LOGFILE=vacuum_analyze_`date +"%Y-%m-%d-%T"`.log

$PGHOME/vacuumdb -a -z -v >> $LOG/$LOGFILE 2>> $LOG/$LOGFILE 

Thanks & Regards
Raghu Ram

pgsql-admin by date:

Previous
From: Manish Kediyal
Date:
Subject: Re: Shell Script for Vacuum
Next
From: Manish Kediyal
Date:
Subject: Re: Shell Script for Vacuum