News for hackers. Stuff that matters.
Re:OpenAI: Scaling PostgreSQL to the Next Level by evantbyrne on Friday May 23, 2025 @09:22AM (#44072653)
How do you prefer to collect backups when self-hosting postgres?
Re:OpenAI: Scaling PostgreSQL to the Next Level by zie on Friday May 23, 2025 @10:46AM (#44073386)
We use barman too, but we do hourly and daily restores into different database instances.

So for example our prod db is tootie_prod We setup another instance the restores from barman every hour and renames the db to tootie_hourly.

We do the same thing daily.

This means we have backup copies of prod that are great for customer service and dev troubleshooting problems. You can make all the changes you want to _daily or _hourly and it will all get erased and updated in a bit.

Since _hourly and _daily are used regularly, this ensures that our backups are working too, since they are now a part of our daily usage to ensure they never break for long.

Re:OpenAI: Scaling PostgreSQL to the Next Level by JimBlackwood on Friday May 23, 2025 @11:29AM (#44073749)
Hey, this is a pretty neat idea! I might just use this :)
Re:OpenAI: Scaling PostgreSQL to the Next Level by zie on Friday May 23, 2025 @09:33PM (#44078122)
Please do!
Re:OpenAI: Scaling PostgreSQL to the Next Level by JimBlackwood on Friday May 23, 2025 @09:26AM (#44072693)
Not OP, but:

Barman on the host with a cronjob for physical backups and as archive/restore command for wal archiving and point in time recovery.

Another cronjob for logical backups.

They all ship to some external location (S3/SFTP) for storage.

I like the above since it adds minimal complexity, uses mainly native postgres commands and gives pretty good reliability (in our setup, we’d lose the last few minutes of data in the absolute worst case).