Backup & Restore

Fix backup failures and restore errors.

Backup fails with disk full error

bash
df -h

Backup archives can be large (hundreds of MB for active deployments). If your root volume is full, free space or change the backup destination. Old backups accumulate in ~/sp-backups/ — review and remove old ones:

bash
ls -lh ~/sp-backups/
rm ~/sp-backups/old-backup.tar.gz

Backup archive is corrupt

Test the integrity of a backup file before restoring:

bash
tar -tzf ~/sp-backups/backup.tar.gz > /dev/null && echo "OK" || echo "CORRUPT"

If the archive is corrupt, it was likely interrupted during creation. Create a new backup:

bash
sp export --name fresh

Restore fails with wrong security answer

The security answer you provide during restore must match exactly what you entered during setup (including capitalization). If you have forgotten your answer:

There is no way to recover a forgotten security answer. If you cannot restore from backup, you will need to set up fresh and re-import your data manually.

Restore succeeds but services do not start

  1. Run sp status to see which services are down
  2. Run sp logs <service> to check for startup errors
  3. If you restored from an old backup, some configurations may reference old hostnames or passwords — contact support with the log output

Restore on a different domain

Restoring to a server with a different domain than the original backup requires additional reconfiguration (SSL certificates, Mautic site URL). Contact support before attempting a cross-domain restore.

Best backup practices

  • Run sp export before every update or major change
  • Copy the backup file off-server immediately after creation
  • Test restores on a secondary server periodically
  • Keep at least 3 rolling backups (last 3 days)