Re: hot backup with zfs ?

From: Joseph Kregloh <jkregloh(at)sproutloud(dot)com>
To: Laurent Laborde <kerdezixe(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: hot backup with zfs ?
Date: 2015-08-20 14:57:47
Message-ID: CAAW2xfc_U4OjdSBEQur7TR5Q+tJ1=ZV36mdth2Y1BETe-qmuWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 20, 2015 at 9:50 AM, Laurent Laborde <kerdezixe(at)gmail(dot)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.

> Thx :)
>
> PS : the WAL will still be archived the usual way.
>
> --
> Laurent "ker2x" Laborde
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2015-08-20 19:22:50 Dangers of mislabelled immutable functions
Previous Message Yves Dorfsman 2015-08-20 14:03:07 Re: hot backup with zfs ?