PrivaPub admin restore <id> (and soon the administrator's page) checks the backup (same host, a format and newest migration this build reads, every hash) and writes restore.json; the running service sees it within seconds and stops, and the next start restores it in MaintenanceGate, before migrations, indexes and hosted services: a pre-restore backup taken once, every collection dropped and imported raw with its indexes, the media the live directory lacks brought back, then the protective merge from the pre-restore backup. Followers and follows are the live ones; blocks, mutes, domain blocks, reserved names, tombstones, reports, filters and OAuth applications are the union; deletions win; accounts made since become tombstones and local posts made since answer 410; every session ends. Each attempt redoes everything; one refused before any change is abandoned and recorded, one failed midway exits 1 for systemd to retry, and after three it exits 75, which the unit no longer restarts. Commands wait (exit 75) while a restore is pending. RestoreRecord tells what happened (admin restore --status). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
26 lines
829 B
Desktop File
26 lines
829 B
Desktop File
[Unit]
|
|
Description=PrivaPub ActivityPub server (privapub.thepra.dev)
|
|
After=network-online.target privapub-mongod.service
|
|
Wants=network-online.target
|
|
Requires=privapub-mongod.service
|
|
|
|
[Service]
|
|
Type=exec
|
|
User=www-data
|
|
Group=www-data
|
|
WorkingDirectory=/var/www/privapub.thepra.dev
|
|
ExecStart=/var/www/privapub.thepra.dev/PrivaPub
|
|
Environment=ASPNETCORE_ENVIRONMENT=Production
|
|
Environment=DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|
Restart=always
|
|
RestartSec=5
|
|
# a restore asked for stops the service, and the next start carries it out; one that failed three times exits 75 and
|
|
# waits for someone to look (journalctl -u privapub, PrivaPub admin restore --status)
|
|
RestartPreventExitStatus=75
|
|
# its own /tmp: ffmpeg's and the uploads' temporary files are nobody else's
|
|
PrivateTmp=true
|
|
SyslogIdentifier=privapub
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|