Backup & Restore
ASP provides scripts for stopped full backups and restores. A backup contains deployment files, settings, certificates, logs, and all Docker named volumes.
Keep the deployment directory name
Run backup and restore from a deployment directory named asp-compose.
Changing the directory name changes the Docker Compose project name and named volume names, so the scripts refuse to run.
Protect backup files
Backups contain .env, certificates, databases, object storage, and logs, and may include secrets, API keys, alerts, and investigation records. Secret and plain Custom Variable values are stored as plaintext in PostgreSQL and are included in backups. Encrypt them and restrict access.
1. Create a full backup
Run from asp-compose/:
./scripts/backup.shThe script stops services, creates the backup, starts services, and runs doctor.sh. The default output directory is:
backups/asp-full-<timestamp>/Use another backup root when needed:
./scripts/backup.sh /mnt/asp-backupsEach backup contains:
| File | Content |
|---|---|
files.tar.gz | .env, Compose files, scripts, custom content, certificates, and logs. |
volumes.tar.gz | PostgreSQL, Redis, RustFS, custom Python dependencies, and static file volumes. |
manifest.txt | Backup format, timestamp, and Compose project information. |
SHA256SUMS | SHA-256 checksums for both archives. |
ASP is temporarily unavailable during backup. The script does not remove old backups automatically.
2. Prepare to restore
Confirm:
- The current directory is named
asp-compose. - The backup contains
manifest.txt,SHA256SUMS,files.tar.gz, andvolumes.tar.gz. - For a new machine, Docker and Docker Compose are installed and the ASP Compose package has been extracted as
asp-compose/; do not initialize it.
Restore overwrites current data
Restore replaces deployment files and clears the PostgreSQL, Redis, RustFS, custom Python dependency, and static file volumes before loading backup data. It does not back up the current environment automatically.
3. Restore
Run from the asp-compose/ directory to restore:
./scripts/restore.sh /path/to/asp-full-backupThe script validates the manifest, SHA-256 checksums, archives, and Compose configuration before stopping services. After a complete restore it starts services and runs doctor.sh.
If file or volume restoration fails, services remain stopped. Fix the reported problem and run restore again.
Next Steps
- Upgrade — Create a stopped full backup before upgrading.
- Restart & Operations — Check service status and logs.