[HN Gopher] Dockerized local and offline backing up of PostgreSQ...
       ___________________________________________________________________
        
       Dockerized local and offline backing up of PostgreSQL with
       rotation, compression
        
       Author : thunderbong
       Score  : 32 points
       Date   : 2023-10-07 20:39 UTC (2 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | michelpp wrote:
       | Alternatively you could use Continuous Archiving with Point In
       | Time Recovery [1] which has been built into Postgres for a while.
       | Once your db exceeds several tens of gigabytes dumping to SQL is
       | just not a viable solution anymore.
       | 
       | [1] https://www.postgresql.org/docs/current/continuous-
       | archiving...
        
         | itsthecourier wrote:
         | Exactly, this is the way
        
         | stavros wrote:
         | This is great, I just wish it were a bit easier to set up and
         | configure. That multi-page wall-of-text document is not looking
         | inviting at all.
        
           | javaunsafe2019 wrote:
           | Really? I just read over it lying in bed for the last 15
           | minutes and found it super straight forward and well
           | explained. Kudos to the pg team!
        
       | INTPenis wrote:
       | Sometimes it's like HN is reading my mind.
       | 
       | I just finished a setup where I run PostgreSQL as a quadlet on
       | CoreOS, and in order to manage backups I use systemd Require so
       | the postgres container depends on a pgbackrest container that
       | just runs a relatively simple script to check if storage is empty
       | or not, and restores the backup from S3 if storage is empty.
       | 
       | And another container runs as a oneshot timer that takes full and
       | incremental backups to S3.
       | 
       | Instead of this [1] I use a much simpler while ! pg_isready loop.
       | 
       | 1.
       | https://gist.github.com/efrecon/86456960e2110b287632fd7f42c1...
        
       | Belphemur wrote:
       | I've been using Borgmatic for this.
       | 
       | It does everything, uses pg_dump under the hood, and adds the
       | output as files for Borg.
       | 
       | Borg then takes care of encryption, incremental and also bit rot.
       | Best solution ever in my book.
       | 
       | Also you can directly restore the db with Borgmatic.
       | 
       | https://torsion.org/borgmatic/docs/how-to/backup-your-databa...
        
       | [deleted]
        
       ___________________________________________________________________
       (page generated 2023-10-07 23:00 UTC)