hot backup with zfs ?

Started by Laurent Labordeover 10 years ago4 messagesgeneral
Jump to latest
#1Laurent Laborde
kerdezixe@gmail.com

Friendly greetings !

I'm wondering if anyone tried the following hot backup process, and if it
works :
pg_start_backup()
zfs snapshop
pg_stop_backup()

copy the snapshot to the backup server.
Thx :)

PS : the WAL will still be archived the usual way.

--
Laurent "ker2x" Laborde

#2Yves Dorfsman
yves@zioup.com
In reply to: Laurent Laborde (#1)
Re: hot backup with zfs ?

On 2015-08-20 07:50, Laurent Laborde wrote:

I'm wondering if anyone tried the following hot backup process, and if it works :
pg_start_backup()
zfs snapshop
pg_stop_backup()

copy the snapshot to the backup server.

I have done this with AWS EBS snapshots, created new volumes from the
snapshots and created a new server with those volumes, and it works well.

I can't see why it'd be different with ZFS.

--
http://yves.zioup.com
gpg: 4096R/32B0F416

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Joseph Kregloh
jkregloh@sproutloud.com
In reply to: Laurent Laborde (#1)
Re: hot backup with zfs ?

On Thu, Aug 20, 2015 at 9:50 AM, Laurent Laborde <kerdezixe@gmail.com>
wrote:

Friendly greetings !

I'm wondering if anyone tried the following hot backup process, and if it
works :
pg_start_backup()
zfs snapshop
pg_stop_backup()

copy the snapshot to the backup server.

That is how I currently handle our backup schema. I do a couple daily ZFS
snapshots as well as Barman. In the event of a rollback being required I
can go back to the latest usable snapshot and copy over the logs to the
point in time I want to recover. Or even just go back to the snapshot point
in time.

ZFS snapshots are useful for other reasons by themselves. Testing for
example or transferring the DB from one machine to another, be it for
replication or to give devs a copy.

Please note to delete snapshots periodically as they do take up data and
increases scrub time. I normally keep 10 days worth of snapshots.

Show quoted text

Thx :)

PS : the WAL will still be archived the usual way.

--
Laurent "ker2x" Laborde

#4Laurent Laborde
kerdezixe@gmail.com
In reply to: Joseph Kregloh (#3)
Re: hot backup with zfs ?

On Thu, Aug 20, 2015 at 4:57 PM, Joseph Kregloh <jkregloh@sproutloud.com>
wrote:

On Thu, Aug 20, 2015 at 9:50 AM, Laurent Laborde <kerdezixe@gmail.com>
wrote:

Friendly greetings !

I'm wondering if anyone tried the following hot backup process, and if it
works :
pg_start_backup()
zfs snapshop
pg_stop_backup()

copy the snapshot to the backup server.

Thx Joseph and Yves :)

--
Laurent "ker2x" Laborde