public inbox for [email protected]
help / color / mirror / Atom feedRe: About backups
4+ messages / 2 participants
[nested] [flat]
* Re: About backups
@ 2026-01-26 17:52 [email protected]
2026-01-26 18:04 ` Re: About backups Christophe Pettus <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: [email protected] @ 2026-01-26 17:52 UTC (permalink / raw)
To: [email protected]
I'm having a problem with this. I'm repurposing an old application written in Visual Basic 6 that did allow backups through signed stored procedures.
This is a requirement for financial applications; the user can perform a backup whenever they want, but they can't access the database.
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 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 <[email protected]> wrote:
On Mon, Jan 26, 2026 at 11:11 AM Adrian Klaver <[email protected]> wrote:
On 1/26/26 08:01, [email protected] 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 <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobster!
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: About backups
2026-01-26 17:52 Re: About backups [email protected]
@ 2026-01-26 18:04 ` Christophe Pettus <[email protected]>
2026-01-26 18:30 ` Re: About backups [email protected]
0 siblings, 1 reply; 4+ messages in thread
From: Christophe Pettus @ 2026-01-26 18:04 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]
> On Jan 26, 2026, at 09:52, [email protected] wrote:
>
> I'm having a problem with this. I'm repurposing an old application written in Visual Basic 6 that did allow backups through signed stored procedures.
> This is a requirement for financial applications; the user can perform a backup whenever they want, but they can't access the database.
> 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 use pg_dump in the application, or at least I don't know how to do it.
There is currently no supported way of backing up a PostgreSQL database via an SQL command. You could, in theory, use the COPY command to dump each individual table, but that's probably not what you are looking for (since it would also require a fairly sophisticated restore process).
pg_dump can run in the application container, and connect to the database in the database container, just like the application does. There's no requirement that pg_dump run on the database host. That's probably the best direction in this case.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: About backups
2026-01-26 17:52 Re: About backups [email protected]
2026-01-26 18:04 ` Re: About backups Christophe Pettus <[email protected]>
@ 2026-01-26 18:30 ` [email protected]
2026-01-26 18:40 ` Re: About backups Christophe Pettus <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: [email protected] @ 2026-01-26 18:30 UTC (permalink / raw)
To: [email protected]
Can I copy pg_dump directly into the container?
Or is there an installer just for the PostgreSQL utilities?
On Monday, January 26, 2026 at 01:04:17 PM GMT-5, Christophe Pettus <[email protected]> wrote:
> On Jan 26, 2026, at 09:52, [email protected] wrote:
>
> I'm having a problem with this. I'm repurposing an old application written in Visual Basic 6 that did allow backups through signed stored procedures.
> This is a requirement for financial applications; the user can perform a backup whenever they want, but they can't access the database.
> 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 use pg_dump in the application, or at least I don't know how to do it.
There is currently no supported way of backing up a PostgreSQL database via an SQL command. You could, in theory, use the COPY command to dump each individual table, but that's probably not what you are looking for (since it would also require a fairly sophisticated restore process).
pg_dump can run in the application container, and connect to the database in the database container, just like the application does. There's no requirement that pg_dump run on the database host. That's probably the best direction in this case.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: About backups
2026-01-26 17:52 Re: About backups [email protected]
2026-01-26 18:04 ` Re: About backups Christophe Pettus <[email protected]>
2026-01-26 18:30 ` Re: About backups [email protected]
@ 2026-01-26 18:40 ` Christophe Pettus <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Christophe Pettus @ 2026-01-26 18:40 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]
> On Jan 26, 2026, at 10:30, [email protected] wrote:
>
> Can I copy pg_dump directly into the container?
>
> Or is there an installer just for the PostgreSQL utilities?
The postgresql-client-18 (or whichever version you are using) has the client utilities but not the server.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2026-01-26 18:40 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-01-26 17:52 Re: About backups [email protected]
2026-01-26 18:04 ` Christophe Pettus <[email protected]>
2026-01-26 18:30 ` [email protected]
2026-01-26 18:40 ` Christophe Pettus <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox