Backups & data retention
Operator guide
Backups & data retention
A node is only as safe as its backups. This page covers what to back up, how, and the built-in retention features.
What needs backing up
- The database — members, posts, conversations, relationships.
- User media — anything on the local media disk (
storage/app/public). .env— configuration + secrets (store it securely, never in the repo).- Reverb/queue state (if realtime on) — minor, regenerates.
Database backups
MySQL
mysqldump -u USER -p DATABASE > backups/node-$(date +%Y%m%d-%H%M).sql
SQLite (dev/small nodes)
cp database/database.sqlite database/database.sqlite.bak-$(date +%Y%m%d-%H%M)
SQLite: back up while the site isn't mid-write, or use
VACUUM INTOfor a consistent snapshot.
Media backups
# Local disk
rsync -a storage/app/public/ backups/media/
# Cloud disk — your provider's tooling (e.g. aws s3 sync)
Built-in backup feature
Laravel's backup scheduler (spatie/laravel-backup) is installed. With the
queue cron running, schedule:run invokes configured backup jobs. The default
notification mail target is hello@vulasocial.com; override in config/backup.php
→ notifications.mail.to for your node:
'notifiable' => Notifiable::class,
'mail' => [
'to' => 'you@your-node.example',
'from' => ['address' => env('MAIL_FROM_ADDRESS'), 'name' => 'VulaSocial'],
],
Run a manual backup:
php artisan backup:run
Data retention
VulaSocial ships retention controls so a node can prune old data on a schedule:
- Federation message history (see
PurgeExpiredDataandconfig/retention.php) - Expired/lifecycle-deleted profiles
Tune retention in config/retention.php to match your privacy policy (e.g.
"messages kept 90 days"). Pruning is additive-safe — it removes expired rows
only.
Restore
- Restore code +
.env. - Restore the database from the dump.
- Restore media.
php artisan storage:link && php artisan optimize:clear.
Test a restore on a copy before you need it. A backup you've never restored isn't a backup.
Related
Still stuck? Contact the node administrator.