From: | Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com> |
---|---|
To: | Lucas <root(at)sud0(dot)nz> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: ZFS filesystem - supported ? |
Date: | 2021-10-24 04:13:29 |
Message-ID: | 77b0fb54-64f5-833d-19ba-2c731af1f700@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 10/23/21 23:12, Lucas wrote:
> I don't know where you have your database deployed, but in my case is
> in AWS EC2 instances. The way I handle backups is at the block storage
> level, performing EBS snapshots.
Yes, Amazon uses SAN equipment that supports snapshots.
> This has proven to work very well for me. I had to restore a few
> backups already and it always worked. The bad part is that I need to
> stop the database before performing the Snapshot, for data integrity,
> so that means that I have a hot-standby server only for these snapshots.
> Lucas
Actually, you don't need to stop the database. You need to execute
pg_start_backup() before taking a snapshot and then pg_stop_backup()
when the snapshot is done. You will need to recover the database when
you finish the restore but you will not lose any data. I know that
pg_begin_backup() and pg_stop_backup() are deprecated but since
PostgreSQL doesn't have any API for storage or file system snapshots,
that's the only thing that can help you use storage snapshots as
backups. To my knowledge,the only database that does have API for
storage snapshots is DB2. The API is called "Advanced Copy Services" or
ACS. It's documented here:
https://www.ibm.com/docs/en/db2/11.1?topic=recovery-db2-advanced-copy-services-acs
For Postgres, the old begin/stop backup functions should be sufficient.
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com
From | Date | Subject | |
---|---|---|---|
Next Message | Laura Smith | 2021-10-24 13:39:36 | Re: ZFS filesystem - supported ? |
Previous Message | Lucas | 2021-10-24 03:12:16 | Re: ZFS filesystem - supported ? |