Skip to content

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/:

bash
./scripts/backup.sh

The script stops services, creates the backup, starts services, and runs doctor.sh. The default output directory is:

text
backups/asp-full-<timestamp>/

Use another backup root when needed:

bash
./scripts/backup.sh /mnt/asp-backups

Each backup contains:

FileContent
files.tar.gz.env, Compose files, scripts, custom content, certificates, and logs.
volumes.tar.gzPostgreSQL, Redis, RustFS, custom Python dependencies, and static file volumes.
manifest.txtBackup format, timestamp, and Compose project information.
SHA256SUMSSHA-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, and volumes.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:

bash
./scripts/restore.sh /path/to/asp-full-backup

The 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