Viewing revision r1 of Backup — saved 2026-05-11 11:06 UTC .
“Initial seed content”
Jump to current version Full history

Backup

Backing up an ANetBBS install.

What to back up

Path What's there
data/anetbbs.db The sqlite database (everything)
data/uploads/ User uploads + file library
data/avatars/ Profile pictures
data/ansi/ Custom ANSI screens
data/echomail/ Inbound/outbound BinkP packets
data/secrets.env API keys (CHMOD 600!)
/var/lib/anetbbs/doors/ Door binaries & per-door state

Source code itself isn't critical — restored from the install
tarball.

Quick weekly tarball

sudo tar czf /backup/anetbbs-$(date +%F).tar.gz \
    --exclude=data/logs --exclude=__pycache__ \
    /home/stingray/anetbbs/data \
    /var/lib/anetbbs/doors

Run that out of cron once a week, rotate keep-last-30.

Hot DB copy

sqlite's online backup API gives a consistent dump even while the
BBS is writing. The bundled script:

sudo -u stingray /home/stingray/anetbbs/tools/db_backup.sh \
    /backup/db/anetbbs-$(date +%F-%H%M).db

cron this every 6 hours during the day if you want point-in-time
recovery.

Off-site

Worst case, your house burns down. Push the rotated tarballs to an
off-site target — rclone to B2/S3, or rsync over SSH to a friend's
box.

Restore

  1. Stop the services.
  2. Untar the backup into a fresh tree.
  3. chown -R stingray:stingray /home/stingray/anetbbs/data
  4. Start the services. Auto-sweep migrations will fix any
    column-add diffs between the backup era and current code.