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.96) (envelope-from ) id 1vkREj-00FBXi-1L for pgsql-general@arkaria.postgresql.org; Mon, 26 Jan 2026 18:22:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkREg-00A2kD-22 for pgsql-general@arkaria.postgresql.org; Mon, 26 Jan 2026 18:22:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkREg-00A2k5-0W for pgsql-general@lists.postgresql.org; Mon, 26 Jan 2026 18:22:50 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vkREd-002R4B-2q for pgsql-general@lists.postgresql.org; Mon, 26 Jan 2026 18:22:49 +0000 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-bc29d64b39dso1724387a12.3 for ; Mon, 26 Jan 2026 10:22:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769451767; cv=none; d=google.com; s=arc-20240605; b=BUYzO0taW+svsvnHeQZfo7VlENz1+UIo5De3fYGdpZ8bbWztoL/fnMmDJ2nsTuu/KG KiD109+8pPlxfy0Caxc/0qSBEAbpTweeWg/lhVgucH+yn6uQoQrL8W3KB4F3xqvDaKSm +eaibkcLD2mlU6bAz6W/UtfpjMHlO57sOLyHtqYobd3I785kfp3GfIHpPVT/VJTnUm0Y u9ctm1FRmZeZ+1kBL+iHmmruuPn+L2Nf2RXpzEnKh8TAlJVh88DM0jN7U2cvRhBGKCYf dmACrSjerN16fRmZmINbzvzDvylWWM1nkAqtu29nuiY1X2cRQPSJK0msQ5G7Ju5mqF7x oksw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=5POG7LUYwGGFZDjAc4Ne2JDxTVbzmLGNLZf5SAjKR2U=; fh=2DoGC78b0mi8uZ4UY+9ocPF86GSVzeaJWqou/x907js=; b=VtvfFE36WaLh32m+4WMufHuExK4DmZepwchtfUE+QYeIv/vm8MVSBPPThJ9IT8hsMf tg+ykSINa6rzFZDoD2jbjUtVbZ3pkhmJqItGoV/biV+Akom+h9EQupBr/fZnLFh2tl9F Aw7YNy+3IIM98jCufEmIouq3XBjIwhX/YWLdA1CdSvzvu4eoBCu0swjXfbVE0CLOnK+A ug3gLp+UAMCs/B0lxAWPzRKO6cRJtGYLehilTOD0WTX3qlcmVa5BFmEYAlnShin6Wpu3 r2lSo45vFOw1uPnqZUhnVon1uEVUQkXR6xjEBIV7BhpTJicfW7jMxv2nzRHw5z+7JfeN RU2Q==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769451767; x=1770056567; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=5POG7LUYwGGFZDjAc4Ne2JDxTVbzmLGNLZf5SAjKR2U=; b=dZk9UIrJxaDe34qfw1FbB7RRuYDt0PgqF+FgwNTKPnaqbZbSCKByxAIXI4W/tZpPDW KwOUZQoE+ZUpCHhM5EPdglLT8tdIY3FuJergLzkpKSHWGrZuyx9WPrmgPhmZ/nwGBULi BcOkr8lJXSuU6BaMhNHVmIMFDeUFC/4iKkmN8Rc3ZsB0gAu6fWZU8cLtcsw4/vMgsgu6 fGoIjgWHpNWhqDHLTCqQTdSeL8jTbXVv0MtTt/SiHdTM5v8OTv/Bzr9lPZm/Y+1xhrkn /nsA2tBvNFCzTQQg6qBtTUwVA5qOc4d0zHwqSE0anoAWgxCFtTzGNmuGZJ+P+3uC54pI BVOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769451767; x=1770056567; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5POG7LUYwGGFZDjAc4Ne2JDxTVbzmLGNLZf5SAjKR2U=; b=Jw1cXZno9vbfIrlDSq8B/il8qfbdO2k0o4kNT9sELmXtAPA+5bxR+49OjMO8N2NGfc 5TlJNvk3MD8ugn/zmXKUjJj4LKHh7o0x4U+iMcFhIwp91faTVZDXe4YODMsEpVPmT4rx jTkFAnISt1Jm478knVtJ/EsG3Gz4etbqvscqp9C+EjmmCmQYyzxRH09oayJjBAujkbZx aL20NQfSWHApwEpUYjy05CzQ/qMMgvz3uJZlJ05di17xdIpvn18vW34cXxSaIxOUuUht BIRcXO7MDN6M5D5uhp7kXZJfLA/rcERrXZNfTOnrzrMcIVWkArdvZn+RaS+rvabz0xRY lOkg== X-Gm-Message-State: AOJu0Yz+rTscdxSWIDQG1gJO3VM5hnTV26Ji6RBiCy6P13DfbiMOX4UI nDcePqNr3e4y6W5ns7YniOiC1DOoNn3pmGJt3S+QmtBd6QCEmxKtORib6qz5KrnxLclKDcdxEAO SNzilK4oZnP03afHX7elaUsyJ9sAHv61c52XO X-Gm-Gg: AZuq6aKaYsXqlGmwbHnJpYR4tqGHPhca7J06Dj9EN+PRr2t+Lh02dsIRGyMsfbx0jhf M8lIipHiJcHyVgk/xiuKoM3J9CTe9XIm7K+zIiiYb1N60Shz5LGE7XpoxefjJqVNfYB/Sj4aF2k H+6eTnk8ELXeS8+PgeA+O4HGkXFn5pFxLo0heyIZJ9JFcIPfY8xlAVznCQCbVvRWp5NsOsRhuGE b3QNQrtdZEZZ+AEYmg/TX2ciGnCuFhMq+IaH+ws/wYd4fWlHDn/gjt1vJ37jHldFQnSwKJy X-Received: by 2002:a17:90b:3b45:b0:34c:6124:3616 with SMTP id 98e67ed59e1d1-353c417521amr4798323a91.27.1769451767237; Mon, 26 Jan 2026 10:22:47 -0800 (PST) MIME-Version: 1.0 References: <1730736265.4259921.1769443263077.ref@mail.yahoo.com> <1730736265.4259921.1769443263077@mail.yahoo.com> <868938296.4311067.1769449951678@mail.yahoo.com> In-Reply-To: <868938296.4311067.1769449951678@mail.yahoo.com> From: Ron Johnson Date: Mon, 26 Jan 2026 13:22:36 -0500 X-Gm-Features: AZwV_QjU_xj__Ut98ZGpzH4WMgxaT-zb6xD62VtDNirJY80AyZIvLygltA12Lrs Message-ID: Subject: Re: About backups To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000088f5006494e983f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000088f5006494e983f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 26, 2026 at 12:52=E2=80=AFPM wrote: > I'm having a problem with this. I'm repurposing an old application writte= n > in Visual Basic 6 that did allow backups through signed stored procedures= . You must change your expectations and way of thinking. *Postgresql is not SQL Server*, and thus cannot be managed the same way as SQL Server. That is a fact of life which you must accept. > This is a requirement for financial applications; the user can perform a > backup whenever they want, but they can't access the database. > "ssh to a Linux account dedicated to pgbackrest" within the application is my first thought. Note, though, that pgbackrest does not have BACKUP DATABASE's COPY_ONLY feature. If you need that, pg_dump is your only option. > The new application is web-based, deployed in containers, and the databas= e > server container is not the same as the application's, so I can't use > pg_dump in the application, or at least I don't know how to do it. > > On Monday, January 26, 2026 at 12:31:48 PM GMT-5, Ron Johnson < > ronljohnsonjr@gmail.com> wrote: > > On Mon, Jan 26, 2026 at 11:11 AM Adrian Klaver > wrote: > On 1/26/26 08:01, felix.quintgz@yahoo.com wrote: > > > Is there a way to implement the SQL Server command 'BACKUP DATABASE'? > Not from within the Postgres instance. > You will need to use: > > https://www.postgresql.org/docs/current/app-pgdump.html > Felix, pg_dump is a logical export tuned for speed and multithreading. > Almost certainly not what you want. > pgbackrest is the equivalent of BACKUP DATABASE and BACKUP LOG. It's an > external program (stuffing everything in the database engine is not The > Unix Way) which typically you run from cron. Redrirect stdout and stderr = to > a log file with a timestamp in the name. (That, at least, is what I've > been doing for 8 years. It works perfectly.) > pgbackrest also has an "info" option which gives you details of all the > backups currently in the repository. > > > > Is there a way to see the restores performed on a database? > > > Is there an equivalent table to msdb.dbo.restorehistory in SQL Server? > > > Is there a way to implement an equivalent if one doesn't exist? > > From what I understand there are various ways of doing this in SQL > > Server, which way are you interested in? > -- > Death to , and butter sauce.Don't boil me, I'm still alive. > lobster! > > > --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000088f5006494e983f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jan 26, 2026 at 12:52=E2=80=AFPM <felix.quintgz@yahoo.com> wrote:<= /div>
I'm having a problem with this. I'm re= purposing an old application written in Visual Basic 6 that did allow backu= ps through signed stored procedures.

Y= ou must change your=C2=A0expectations and=C2=A0way of thinking.=C2=A0 Po= stgresql is not SQL Server, and thus cannot be managed=C2=A0the same=C2= =A0way as SQL Server.=C2=A0 That is a fact of life which you must accept.
=C2=A0
This is a requirement for financial applications; the user can= perform a backup whenever they want, but they can't access the databas= e.

"ssh to a Linux account dedicat= ed to pgbackrest" within the application is my first thought.=C2=A0 No= te, though, that pgbackrest does not have BACKUP DATABASE's COPY_ONLY f= eature.=C2=A0 If you need that, pg_dump is your only=C2=A0option.
=C2=A0
The new application is web-based, deployed in containers, and the database = server container is not the same as the application's, so I can't u= se pg_dump in the application, or at least I don't know how to do it.
=C2=A0On Monday, January 26, 2026 at 12:31:48 PM GMT-5, Ron Johnson <ronljohnsonjr@gma= il.com> wrote:

On Mon, Jan 26, 2026 at 11:11 AM Adrian Klaver <adrian.klaver@aklaver.com> wr= ote:
On 1/26/26 08:01, felix.quintgz@yahoo.com wrote:

> Is there a way to implement the SQL Server command 'BACKUP DATABAS= E'?
Not from within the Postgres instance.
You will need to use:

https://www.postgresql.org/docs/current/app-p= gdump.html
Felix,=C2=A0pg_dump is a logical export tuned for speed and multithreading.= =C2=A0 Almost certainly not what you want.
pgbackrest is the equivalent of BACKUP DATABASE and BACKUP LOG.=C2=A0 It= 9;s an external program (stuffing everything in the database engine is not = The Unix Way) which typically you run from cron.=C2=A0Redrirect=C2=A0stdout= and stderr to a log file with a timestamp in the name.=C2=A0 (That, at lea= st, is what I've been doing for 8 years.=C2=A0 It works perfectly.)
pgbackrest also has an "info" option which gives you details of a= ll the backups currently in the repository.=C2=A0>

> Is there a way to see the restores performed on a database?

> Is there an equivalent table to msdb.dbo.restorehistory in SQL Server?=

> Is there a way to implement an equivalent if one doesn't exist?
=C2=A0From what I understand there are various ways of doing this in SQL
Server, which way are you interested in?
--
Death to <Redacted>, and butter sauce.Don't boil me, I'm stil= l alive.
<Redacted> lobster!




--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobs= ter!
--000000000000088f5006494e983f--