Re: Shell Script for Vacuum

From: raghu ram <raghuchennuru(at)gmail(dot)com>
To: Manish Kediyal <kediyal(dot)manish(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Shell Script for Vacuum
Date: 2013-07-29 08:04:33
Message-ID: CALnrrJTiWbu9dWeTKPn-=zYgBoP7U-sjuc4o8+Yxxnc1gRmC2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Jul 29, 2013 at 1:07 PM, Manish Kediyal <kediyal(dot)manish(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Manish Kediyal 2013-07-29 08:08:11 Re: Shell Script for Vacuum
Previous Message Manish Kediyal 2013-07-29 07:37:15 Re: Shell Script for Vacuum