No title

Started by Shu Hoabout 16 years ago3 messagesgeneral
Jump to latest
#1Shu Ho
sueh111@hotmail.com

All

do you clean up the server file by removing them
use

find $logfile -mtime +$NUMBER_DAYS_TO_KEEP -type f -print -exec rm -f {} \;

in postgres ?

How to remove the archive log files in postgres ? is the same way as remove backup files and server log files ?

thanks
Amy
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/196390709/direct/01/

#2Reid Thompson
Reid.Thompson@ateb.com
In reply to: Shu Ho (#1)
Re:

On Tue, 2010-02-23 at 13:50 -0500, Shu Ho wrote:

All

do you clean up the server file by removing them
use

find $logfile -mtime +$NUMBER_DAYS_TO_KEEP -type f -print -exec rm -f
{} \;

in postgres ?

How to remove the archive log files in postgres ? is the same way as
remove backup files and server log files ?

thanks
Amy

______________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up
now.

google logrotate
man logrotate

#3Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Shu Ho (#1)
Re:

Shu Ho wrote:

do you clean up the server file by removing them
use

find $logfile -mtime +$NUMBER_DAYS_TO_KEEP -type f -print
-exec rm -f {} \;

in postgres ?

I do it similarly, but I don't use "-exec", I rather pipe the results
of find into something like "xargs rm -f" for better performance.

How to remove the archive log files in postgres ? is the same
way as remove backup files and server log files ?

Yes.

Just make very sure that you don't delete any archived WAL files
that you might still need - say, to resort to an older backup if
your most recent backups failed or the tape got eaten by mice
or whatever.

Yours,
Laurenz Albe