public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bruce Momjian <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: Nick Cleaton <[email protected]>
Cc: PostgreSQL General <[email protected]>
Subject: Re: Backups with filesystem snapshots
Date: Tue, 12 Aug 2025 13:58:43 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKAnmmLnSxW6ER0AXn9GxfL=84RWcei_7q2bPwieNyM+SS6mTQ@mail.gmail.com>
References: <CAFgz3ksJNVprBWLX4x=MdfJrG+uZSgUHTYGF35T=dJryJjz8zw@mail.gmail.com>
	<CAKAnmmLnSxW6ER0AXn9GxfL=84RWcei_7q2bPwieNyM+SS6mTQ@mail.gmail.com>

On Mon, Aug 11, 2025 at 12:41:12PM -0400, Greg Sabino Mullane wrote:
> On Mon, Aug 11, 2025 at 9:01 AM Nick Cleaton <[email protected]> wrote:
> 
>     If I take an instantaneous filesystem-level snapshot of the postgres
>     data directory underneath a running postgres server, is that a safe
>     backup without doing any pg_start_backup/pg_stop_backup ?
> 
> 
> Safe, yes[*], but not particularly recommended except for special cases, like
> spinning up a fast QA cluster. For backups, use a Postgres-aware battle tested
> system like pgBackRest that offers more flexibility and more safeguards.
> 
> * Assuming your hardware/OS drivers are being honest with you about fsync
> 
> 
>     starting up from that snapshot should look the same as recovering from an
>     unclean postgres shutdown
>     due to a kernel panic.
> 
> 
> Yes, for all practical purposes it would be identical. Technically more similar
> to pulling the plug on the server. :)

Also, be careful that any tablespaces are also in the same snapshot.

-- 
  Bruce Momjian  <[email protected]>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Backups with filesystem snapshots
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox