Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ulVar-001oiu-Qz for pgsql-general@arkaria.postgresql.org; Mon, 11 Aug 2025 16:41:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ulVap-002GCO-Sl for pgsql-general@arkaria.postgresql.org; Mon, 11 Aug 2025 16:41:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ulVap-002GCG-Hu for pgsql-general@lists.postgresql.org; Mon, 11 Aug 2025 16:41:51 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ulVan-0003OU-19 for pgsql-general@lists.postgresql.org; Mon, 11 Aug 2025 16:41:51 +0000 Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3e406ca2d22so24615595ab.1 for ; Mon, 11 Aug 2025 09:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754930508; x=1755535308; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=h5egFDgEhPLyO3HNygW/G7voMeSZv36790axgF2Qsps=; b=S7cTp8GGbyhlHr/Vb9nzHI09e/+ez/H+K4tNWUpJIA3GXYEiK0YQz01ybnQ8QigI/5 fw/qwg0q4eTlde5Ch8jQOao/MGUlRGhCTn1LZbx44YE0zGjlM0OReW/7mgezbZQoId3F o0v4cTcCmg57SB6b7Fzx+HL+OxNykY+JL2AQp1oSHF15csxiTBHtULrnJmoIhTnjllyL z9WiCib2HpgwvPaJwCPpJDupHnoWco5kq6k9Mvw68PQXT/vYUy09rC4Q/Je8Xoy5j/AF cWNXypHZQTQCXIICO6n4hjIFEYgt2ivguROtRBtdgjEhHbZ5TmyEtkAoEzPmC+vASotH T0mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754930508; x=1755535308; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=h5egFDgEhPLyO3HNygW/G7voMeSZv36790axgF2Qsps=; b=PhLdLMMFs0UyLnW47O2/yOFaBMddb63fELP8pdIEgW0edrqY0g2HUVWTVjxMU5/PBv RBdeM+vt20LBIWt4ZYY9Dej9tUXqO9dzkTCdXJfpOTzkY5NUGrDOVHCyz/1ZVX/Lu+Vs 8IROU1XPZhKloP2omvq8EqWmXQHhVP49odDWmSvwIshcJ5kYJHHdmtDploOft5V9931k lh6VLFc4/KOHXebiFjBGk45IAGRFZkRESdRrFULSyKS5RayN5dc34iH4cL3x3huZ0E3Z OPMSh1G2lNwQ6sBsNcm0HPOECRi6mDWXrl2ZvNZ7SAWeQxFfXxwpIUyA4YAGx5NizoFW aktQ== X-Gm-Message-State: AOJu0YyuWLTb3NTXlUazYRKZ/cq6VbKmrMR1rYL2RpBQphbQCHjQKUc3 eTKM2lR3osWXw62Gq0DEJPXGPvbSdocL9BBfP3z/Nz4vvXBMqcC/YqBY5p9BdL1yVVThwiP8Ida qWbPxjHAcI+os4zRzb19t9Kpb/xi6Rh5M8w== X-Gm-Gg: ASbGncvdZ4kqZFX2xchG4QtD/QNYxqGDc9UymKGA1goMIfre9YsWZkafChngHUvtexR S92bgvXjDCncPKpGITmUnVVDy/xXJmymeBJYdlhodwkXKHHdYgwA6oqGfLAuQ6iz1PSBXi1chIX Txx9rPd1+HxiUOY0h3MBn2CF6HcP9D6gh8uJOhIWNO+sRZpfbckGdosyzNhoVCtL1PJ9Pp7el0X LSk39kLO6ntn8LuyAnO6v5rmzFKlIwTvn/ljSI3jA== X-Google-Smtp-Source: AGHT+IFLgQNluDpzfR0pSO7gGjbVWDzOudg6j2xUGi5P+F26T9bIegFyncVwGY43SAolSbxQ9gkhXIOJgE+wtlW2IuM= X-Received: by 2002:a05:6e02:2195:b0:3e5:52a3:daf8 with SMTP id e9e14a558f8ab-3e552a3e69cmr46722825ab.5.1754930507732; Mon, 11 Aug 2025 09:41:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Mon, 11 Aug 2025 12:41:12 -0400 X-Gm-Features: Ac12FXzGt3OrQwMzz81VmmaTuWz3C91ZH13BTe4jhtjgTUvPHqoEJM0VdkqfMso Message-ID: Subject: Re: Backups with filesystem snapshots To: Nick Cleaton Cc: PostgreSQL General Content-Type: multipart/alternative; boundary="00000000000084dd64063c19991b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000084dd64063c19991b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 11, 2025 at 9:01=E2=80=AFAM Nick Cleaton wro= te: > 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. :) Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Support --00000000000084dd64063c19991b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Aug 11, 2025 at 9:01=E2=80=AFAM N= ick Cleaton <nick@cleaton.net>= ; 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 ?
<= div>
Safe, yes[*], but not particularly=C2=A0recommended exce= pt for special cases, like spinning up a fast QA cluster. For backups, use = a Postgres-aware battle tested system like pgBackRest that offers more flex= ibility and more safeguards.

* Assuming your hardw= are/OS drivers are being honest with you about fsync

starting up from that snaps= hot should look the same as recovering from an unclean postgres shutdown due to a kernel panic.

Yes, for all pra= ctical purposes it would be identical. Technically more similar to pulling = the plug on the server. :)

Cheers,
Greg

--
Enterp= rise Postgres Software Products & Tech Support

--00000000000084dd64063c19991b--