Skip to content

Backup pocket-id database - #247

Merged
stackptr merged 2 commits into
mainfrom
backup-pocket-id
Feb 11, 2026
Merged

stackptr merged 2 commits into
mainfrom
backup-pocket-id

Conversation

@stackptr

Copy link
Copy Markdown
Owner

Resolves #246

@stackptr

Copy link
Copy Markdown
Owner Author

Some notes on how to do a restore:

# Download latest snapshot from R2:
sudo env $(sudo cat /run/agenix/restic-env | xargs) \
  restic -r s3:https://9c12166db465350c0f02410b390d0cbc.r2.cloudflarestorage.com/restic \
    --password-file /run/agenix/restic-password \
    restore latest --target /tmp/restore

cd /tmp/restore

# Validate that the snapshot has expected contents
zcat var/backup/postgresql/pocketid.sql.gz | less

# Restore via psql
psql -U postgres -d pocket_id < var/backup/postgresql/pocketid.sql.gz

Loading the env for restic is a little tedious, it could be easier to do this as root instead of via sudo.

I didn't try this out because the snapshot looks sensible enough. However, I'll probably try restoring snapshot 84e4c949 from that bucket when I want to re-enable mastodon.

@stackptr
stackptr merged commit e5c240d into main Feb 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backup pocket-id database and test restoring from snapshot

1 participant