Re: [ADMIN] Backup of live database

2008-01-16 Thread Tom Arthurs
If you don't start archiving log files, your first backup won't be valid -- well I suppose you could do it the hard way and start the backup and the log archiving at exactly the same time (can't picture how to time that), but the point is you need the current log when you kick off the backup.

Re: [ADMIN] Backup of live database

2008-01-16 Thread Scott Marlowe
On Jan 16, 2008 4:56 PM, Tom Davies <[EMAIL PROTECTED]> wrote: > > On 17/01/2008, at 4:42 AM, Tom Arthurs wrote: > > The important thing is to start archiving the WAL files *prior* to > > the first OS backup, or you will end up with an unusable data base. > > Why does the recovery need WAL files fr

Re: [ADMIN] Backup of live database

2008-01-16 Thread Tom Lane
Tom Davies <[EMAIL PROTECTED]> writes: > On 17/01/2008, at 4:42 AM, Tom Arthurs wrote: >> The important thing is to start archiving the WAL files *prior* to >> the first OS backup, or you will end up with an unusable data base. > Why does the recovery need WAL files from before the backup? It d

Re: [ADMIN] Backup of live database

2008-01-16 Thread Tom Davies
On 17/01/2008, at 4:42 AM, Tom Arthurs wrote: The important thing is to start archiving the WAL files *prior* to the first OS backup, or you will end up with an unusable data base. Why does the recovery need WAL files from before the backup? Tom ---(end of broadcast)

Re: [ADMIN] Backup of live database

2008-01-16 Thread Steve Holdoway
On Wed, 16 Jan 2008 10:19:12 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > Steve Holdoway <[EMAIL PROTECTED]> writes: > > You can be absolutely certain that the tar backup of a file that's changed > > is a complete waste of time. Because it changed while you were copying it. > > That is, no doubt

Re: [ADMIN] Backup of live database

2008-01-16 Thread Tom Arthurs
Hi, Brian We have been doing PITR backups since the feature first became available in postgresql. We first used tar, then, due to the dreadful warning being emitted by tar (which made us doubt that it was actually archiving that particular file) we decided to try CPIO, which actually emits mu

Re: [ADMIN] Backup of live database

2008-01-16 Thread David Wall
Brian Modra wrote: Sorry to be hammering this point, but I want to be totally sure its OK, rather than 5 months down the line attempt to recover, and it fails... Are you absolutely certain that the tar backup of the file that changed, is OK? (And that even if that file is huge, tar has manage

Re: [ADMIN] Backup of live database

2008-01-16 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Am Mittwoch, 16. Januar 2008 schrieb Tom Lane: >> (Thinks for a bit...) Actually I guess there's one extra assumption in >> there, which is that tar must issue its reads in multiples of our page >> size. But that doesn't seem like much of a stretch.

Re: [ADMIN] Backup of live database

2008-01-16 Thread Peter Eisentraut
Am Mittwoch, 16. Januar 2008 schrieb Tom Lane: > (Thinks for a bit...) Actually I guess there's one extra assumption in > there, which is that tar must issue its reads in multiples of our page > size. But that doesn't seem like much of a stretch. There is something about that here: http://www.gn

Re: [ADMIN] Backup of live database

2008-01-16 Thread Tom Lane
Steve Holdoway <[EMAIL PROTECTED]> writes: > You can be absolutely certain that the tar backup of a file that's changed is > a complete waste of time. Because it changed while you were copying it. That is, no doubt, the reasoning that prompted the gnu tar people to make it do what it does, but i

Re: [ADMIN] Backup of live database

2008-01-16 Thread Joshua D. Drake
Brian Modra wrote: Sorry to be hammering this point, but I want to be totally sure its OK, rather than 5 months down the line attempt to recover, and it fails... Are you absolutely certain that the tar backup of the file that changed, is OK? Have you considered testing it? Sincerely, Josh

Re: [ADMIN] Backup of live database

2008-01-16 Thread Steve Holdoway
You can be absolutely certain that the tar backup of a file that's changed is a complete waste of time. Because it changed while you were copying it. Steve. On Wed, 16 Jan 2008 10:24:00 +0200 "Brian Modra" <[EMAIL PROTECTED]> wrote: > Sorry to be hammering this point, but I want to be totally s

Re: [ADMIN] Backup of live database

2008-01-16 Thread Brian Modra
Sorry to be hammering this point, but I want to be totally sure its OK, rather than 5 months down the line attempt to recover, and it fails... Are you absolutely certain that the tar backup of the file that changed, is OK? (And that even if that file is huge, tar has managed to save the file as it

Re: [ADMIN] Backup of live database

2008-01-16 Thread Joshua D. Drake
Brian Modra wrote: The documentation about WAL says that you can start a live backup, as long as you use WAL backup also. I'm concerned about the integrity of the tar file. Can someone help me with that? If you are using point in time recovery: http://www.postgresql.org/docs/8.2/static/contin

Re: [ADMIN] Backup of live database

2008-01-15 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Brian Modra wrote: >> If tar reports that a file was modified while it was being archived, >> does that mean that the file was archived correctly, or is it corrupted >> in the archive? > You can not use tar to backup postgresql if it is running. Y

Re: [ADMIN] Backup of live database

2008-01-15 Thread Brian Modra
The documentation about WAL says that you can start a live backup, as long as you use WAL backup also. I'm concerned about the integrity of the tar file. Can someone help me with that? On 16/01/2008, Joshua D. Drake <[EMAIL PROTECTED]> wrote: > > Brian Modra wrote: > > Hi, > > If tar reports that

Re: [ADMIN] Backup of live database

2008-01-15 Thread Joshua D. Drake
Brian Modra wrote: Hi, If tar reports that a file was modified while it was being archived, does that mean that the file was archived correctly, or is it corrupted in the archive? Does tar take a snapshot of the file so that even if it is modified, at least the archive is safe? You can not u

[ADMIN] Backup of live database

2008-01-15 Thread Brian Modra
Hi, If tar reports that a file was modified while it was being archived, does that mean that the file was archived correctly, or is it corrupted in the archive? Does tar take a snapshot of the file so that even if it is modified, at least the archive is safe? Thanks -- Brian Modra Land line: +2