Re: File system snapshots for multiple file systems - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: File system snapshots for multiple file systems
Date
Msg-id 47FB2423.8000103@enterprisedb.com
Whole thread Raw
In response to Re: File system snapshots for multiple file systems  (tomas@tuxteam.de)
Responses Re: File system snapshots for multiple file systems  (tomas@tuxteam.de)
Re: File system snapshots for multiple file systems  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
tomas@tuxteam.de wrote:
> Checkpoinitng is definitely coolest. If your file system doesn't do
> that, rsync is a good poor man's replacement:
> 
>   first rsync (takes long)
>               (or work from an older backup)
>   pg_start_backup(...)
>   rsync (should be much faster)
>   rsync WAL
>   pg_stop_backup()
> 
> I regularly rsync moderately active 500GB filesystems on fairly feeble
> hardware in about 5-10 minutes (for daily backups).

That will *not* get you a consistent, safe backup. If a PostgreSQL 
checkpoint happens while you're rsyncing the WAL, the data files won't 
(necessarily) contain updates that were made between the rsync of the 
data finished and the checkpoint.

To do that, you'd need to set up continuous archiving, and do a PITR 
restore.

What I was complaining/suggesting is that we should make what you did to 
actually work, because it's a lot simpler. And as Jonah pointed out, 
we'd need to inhibit checkpoints between pg_start_backup() and 
pg_stop_backup() to make it work.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [PATCHES] Integer datetime by default
Next
From: Magnus Hagander
Date:
Subject: Re: Feature freeze status