Move to offsite backup storage #19

Open
opened 2026-04-19 07:23:32 +00:00 by forgejo-lila · 0 comments
Owner

Context

Database backups (daily pg_dump, 7-day retention) currently live on the same VPS as the database. If the VPS fails, both the database and backups are lost.

What to do

After the daily backup runs, copy the dump to offsite storage.

Options

  • Hetzner Object Storage (S3-compatible, same provider, cheapest)
  • Hetzner Storage Box (SFTP/SCP, simple)
  • Backblaze B2 (S3-compatible, free egress)

Files to change

  • ~/backup.sh on the VPS — add an upload step after the pg_dump. For S3-compatible storage, use aws cli or s3cmd. For Storage Box, use scp or rsync.

Acceptance criteria

  • Each daily backup is copied to offsite storage automatically
  • Old offsite backups are cleaned up (same 7-day retention or longer)
  • Backup script logs success/failure of the offsite copy
  • A restore from offsite storage has been tested at least once

Notes

Current backup script: ~/backup.sh. Cron runs at 3 AM daily. Dumps are compressed with gzip (~few MB). Dev laptop also syncs backups via rsync on login. See documentation/deployment.md.

## Context Database backups (daily pg_dump, 7-day retention) currently live on the same VPS as the database. If the VPS fails, both the database and backups are lost. ## What to do After the daily backup runs, copy the dump to offsite storage. ## Options - Hetzner Object Storage (S3-compatible, same provider, cheapest) - Hetzner Storage Box (SFTP/SCP, simple) - Backblaze B2 (S3-compatible, free egress) ## Files to change - `~/backup.sh` on the VPS — add an upload step after the pg_dump. For S3-compatible storage, use `aws cli` or `s3cmd`. For Storage Box, use `scp` or `rsync`. ## Acceptance criteria - Each daily backup is copied to offsite storage automatically - Old offsite backups are cleaned up (same 7-day retention or longer) - Backup script logs success/failure of the offsite copy - A restore from offsite storage has been tested at least once ## Notes Current backup script: `~/backup.sh`. Cron runs at 3 AM daily. Dumps are compressed with gzip (~few MB). Dev laptop also syncs backups via rsync on login. See `documentation/deployment.md`.
forgejo-lila added the
infra
label 2026-04-19 07:23:32 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo-lila/lila#19
No description provided.