Re: FW: [ADMIN] Setting up of PITR system.

2006-05-01 Thread Rajesh Kumar Mallah
Hi List, please find below a 1. A script that takes remote base backups of a postgresql database. it assumes a password less communication between the backup server and the database server. After taking a base backup it removes that un neccesary WAL log files from the archive folder. The script

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-13 Thread Rajesh Kumar Mallah
On 4/13/06, Grega Bremec <[EMAIL PROTECTED]> wrote:> -BEGIN PGP SIGNED MESSAGE-> Hash: RIPEMD160> > Rajesh Kumar Mallah wrote:> > Is cluttering of the wal archive area in cases where that backup > > had to be re-started for whatever reasons is the *only* concern ?> > Well, yes, to be honest

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-13 Thread Grega Bremec
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Rajesh Kumar Mallah wrote: > Is cluttering of the wal archive area in cases where that backup > had to be re-started for whatever reasons is the *only* concern ? Well, yes, to be honest. But it may in consequence cause problems of another kind, w

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-11 Thread Bruce Momjian
n the proper LVM disk group for the snapshot > volume. > > Greg > > > > From: [EMAIL PROTECTED] on behalf of Tom Lane > Sent: Mon 4/10/2006 7:19 PM > To: Bruce Momjian > Cc: [EMAIL PROTECTED]; 'Rajesh Kumar Mallah'; pgsq

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-11 Thread Christian Kratzer
Hi, On Tue, 11 Apr 2006, Spiegelberg, Greg wrote: You should implement filesystem or volume level snapshots. LVM, Veritas and the like all have the functionality and it gets the database out of "backup" mode quickly. from what I understand there is no need to keep the time between pg_start_ba

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-11 Thread Spiegelberg, Greg
Title: Re: FW: [ADMIN] Setting up of PITR system. You should implement filesystem or volume level snapshots.  LVM, Veritas and the like all have the functionality and it gets the database out of "backup" mode quickly.   http://www.tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.htm

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-10 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> It definitely is a pain in the neck that GNU tar complains about files >> changing underneath it --- I've looked for a way to disable that, or at >> least reduce it to a warning instead of an error condition, but gtar >> doesn't seem to have such a switch

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-10 Thread Bruce Momjian
Tom Lane wrote: > It definitely is a pain in the neck that GNU tar complains about files > changing underneath it --- I've looked for a way to disable that, or at > least reduce it to a warning instead of an error condition, but gtar > doesn't seem to have such a switch. You should try alternative

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-08 Thread Rajesh Kumar Mallah
> Rajesh Kumar Mallah wrote: > |>| Do you see any problem in the current approach ? > |>| i have seen it working fine till now. > |> > |>I do, to be honest. The WAL location counter accounts for 4294967295 > |>positions and while I'm certain that's WAY more than the average number > |>of transacti

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-08 Thread Grega Bremec
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Rajesh Kumar Mallah wrote: |>| Do you see any problem in the current approach ? |>| i have seen it working fine till now. |> |>I do, to be honest. The WAL location counter accounts for 4294967295 |>positions and while I'm certain that's WAY more

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-03 Thread Rajesh Kumar Mallah
> | Do you see any problem in the current approach ? > | i have seen it working fine till now. > > I do, to be honest. The WAL location counter accounts for 4294967295 > positions and while I'm certain that's WAY more than the average number > of transactions that go into a WAL, quite a number of

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-02 Thread Grega Bremec
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Rajesh Kumar Mallah wrote: | it takes a while (i dont know how much) for the .backup file to get | archived and appear in the wal archive area. thats why i prefer to | use the wal log filename (0001000A0068) instead of | something lik

Re: [ADMIN] Setting up of PITR system.

2006-04-02 Thread Rajesh Kumar Mallah
On 4/3/06, Brendan Duddridge <[EMAIL PROTECTED]> wrote: > Whenever you get a finalized script including all the enhancements > you've been talking about, > I would really love to have a copy as I'm sure lots of people here > would. I think this is > something that should be included in the standard

Re: [ADMIN] Setting up of PITR system.

2006-04-02 Thread Brendan Duddridge
Whenever you get a finalized script including all the enhancements you've been talking about, I would really love to have a copy as I'm sure lots of people here would. I think this is something that should be included in the standard distribution. Can I make a couple of suggestions? 1. Inclu

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-02 Thread Alvaro Herrera
Rajesh Kumar Mallah wrote: > Another area i was thinking to improve this script was to > make it dig out all the tablespace folders to be archived by looking > into PGDATADIR/pg_tblspc . This shall make the script more generic. > > pg_tblspc as contents like below: > > $ ls -l > total 0 > lrwxr

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-02 Thread Rajesh Kumar Mallah
On 4/2/06, Grega Bremec <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: RIPEMD160 > > Rajesh Kumar Mallah wrote: > | > | Instead of taking a round about method i am using the content of the > | file, (This was also suggested by Andy at somepoint) > > After reading the docs a

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-02 Thread Grega Bremec
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Rajesh Kumar Mallah wrote: | | Instead of taking a round about method i am using the content of the | file, (This was also suggested by Andy at somepoint) After reading the docs again, that's what I would do as well, indeed. :) | lately i feel

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-01 Thread Rajesh Kumar Mallah
On 4/1/06, Grega Bremec <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: RIPEMD160 > > Rajesh Kumar Mallah wrote: > | Dear Grega , > | > | Thanks for the useful tips and error spotting, > | i am incorporating some of them and testing > | the script in my server . I have conce

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-01 Thread Grega Bremec
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Grega Bremec wrote: | ~ find ${WAL_ARCHIVE} -type f | sort -g | while read archive; do | ~if [ ! "${archive}" = "${REF_FILE}" ]; then Actually, this test is only possible since ${REF_FILE} was expanded using the ${WAL_FILE} mask and will co

Re: FW: [ADMIN] Setting up of PITR system.

2006-04-01 Thread Andy Shellam
06 7:19 pm To: Jim C. Nasby; Tom Lane Cc: [EMAIL PROTECTED]; Rajesh Kumar Mallah; pgsql-admin@postgresql.org Subject: Re: FW: [ADMIN] Setting up of PITR system. We have high volume inserts happening with wal files being generated very rapidly. Will the fact that the files change as the tar happen

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-31 Thread Grega Bremec
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Rajesh Kumar Mallah wrote: | Dear Grega , | | Thanks for the useful tips and error spotting, | i am incorporating some of them and testing | the script in my server . I have concerns regarding | some of your optimisations that makes the script le

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-31 Thread Rajesh Kumar Mallah
To: Tom Lane > Cc: [EMAIL PROTECTED]; 'Rajesh Kumar Mallah'; > pgsql-admin@postgresql.org > Subject: Re: FW: [ADMIN] Setting up of PITR system. > > On Wed, Mar 29, 2006 at 09:46:30AM -0500, Tom Lane wrote: > > It definitely is a pain in the neck that GNU tar complains

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-31 Thread Rajesh Kumar Mallah
On 3/30/06, Grega Bremec <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: RIPEMD160 > > Rajesh Kumar Mallah wrote: > | > | OK i am posting my full script [ its not heavy programming i guess :) ] > | shall be grateful if you/someone could review it . (its well > commented i t

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-31 Thread Sriram Dandapani
:[EMAIL PROTECTED] On Behalf Of Jim C. Nasby Sent: Friday, March 31, 2006 10:11 AM To: Tom Lane Cc: [EMAIL PROTECTED]; 'Rajesh Kumar Mallah'; pgsql-admin@postgresql.org Subject: Re: FW: [ADMIN] Setting up of PITR system. On Wed, Mar 29, 2006 at 09:46:30AM -0500, Tom Lane wrote: > It de

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-31 Thread Jim C. Nasby
On Wed, Mar 29, 2006 at 09:46:30AM -0500, Tom Lane wrote: > It definitely is a pain in the neck that GNU tar complains about files > changing underneath it --- I've looked for a way to disable that, or at > least reduce it to a warning instead of an error condition, but gtar > doesn't seem to have

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-31 Thread Jim C. Nasby
On Wed, Mar 29, 2006 at 06:15:59PM +0530, Rajesh Kumar Mallah wrote: > > Also you wouldn't particular need any heavy programming ? I'm sure a simple > > shell script could be written in bash to pick out the correct files. > > OK i am posting my full script [ its not heavy programming i guess :) ]

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-30 Thread Grega Bremec
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Rajesh Kumar Mallah wrote: | | OK i am posting my full script [ its not heavy programming i guess :) ] | shall be grateful if you/someone could review it . (its well commented i think) | script also carries sample data. | | it does following | 1

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-29 Thread Tom Lane
"Andy Shellam" <[EMAIL PROTECTED]> writes: > If pg_start_backup is used correctly, no data pages will be written to disk > until pg_stop_backup is called, so this shouldn't be an issue That's incorrect, the database will continue to operate normally. The only thing pg_start_backup really does is

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-29 Thread Rajesh Kumar Mallah
;>>>> I used rsync like many others , it seems to work fine for me. Regds mallah. > > Andy > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Rajesh Kumar Mallah > Sent: Tuesday, 28 March, 2006 5:27 PM > To: Tom Lan

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-29 Thread Rajesh Kumar Mallah
On 3/28/06, Andy Shellam <[EMAIL PROTECTED]> wrote: > > > > we want to remove archived WAL log files which are no longer needed > so that the size of wal_archive folder is under control. > > The DOCs say that filenames numerically less than the WAL record that > pg_stop_backup() > suggests can b

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-29 Thread Andy Shellam
Cc: [EMAIL PROTECTED]; pgsql-admin@postgresql.org Subject: Re: FW: [ADMIN] Setting up of PITR system. --- secondly , i was asking about the tool for copying the database directory not the one for archiving the logs. when i use tar , it gives warning that the file changed while it was reading the file

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-28 Thread Rajesh Kumar Mallah
Hi, Thanks everyone for the reply, is it reasonable/advisable to start with the output of pg_stop_backup() in a shell script to find the WAL file being discussed, ie the FILE which can be used as a reference for removing the older files ? secondly , i was asking about the tool for copying the da

Re: FW: [ADMIN] Setting up of PITR system.

2006-03-28 Thread Tom Lane
"Andy Shellam" <[EMAIL PROTECTED]> writes: > The DOCs say that filenames numerically less than the WAL record that > pg_stop_backup() suggests can be removed. Will an alphabetical sorting > be different from numerically sorted filename ? If you're worried about that, try "LANG=C ls ..." to make su

FW: [ADMIN] Setting up of PITR system.

2006-03-28 Thread Andy Shellam
we want to remove archived WAL log files which are no longer needed so that the size of wal_archive folder is under control. The DOCs say that filenames numerically less than the WAL record that pg_stop_backup() suggests can be removed. Will an alphabetical sorting be different from numeri

[ADMIN] Setting up of PITR system.

2006-03-28 Thread Rajesh Kumar Mallah
Hi, Sorry last posting was accidently sent , incomplete,plese ignore. We are trying to setup PITR system based on documentation http://www.postgresql.org/docs/8.1/interactive/backup-online.html We have 3 questions regarding 1. Selection of archived WAL records that can be safely removed. 2. Kno

[ADMIN] Setting up of PITR system.

2006-03-28 Thread Rajesh Kumar Mallah
Hi, We are trying to setup PITR system based on documentation http://www.postgresql.org/docs/8.1/interactive/backup-online.html We have 3 questions regarding 1. Selection of archived WAL records that can be safely removed. 2. Knowing the relevant WAL record just after pg_stop_backup() 3. Recomme