Restore from Backup — Safe Expectations
Who this is for
Users who need to restore a server or site from a previous backup.
Important: What Restore Does and Does Not Do
Before restoring, understand what the restore process covers:
| Backup type | What gets restored |
|---|---|
database | The database is overwritten with the backup dump |
files | The document root is overwritten with the backup files |
full | Both files and database are overwritten |
snapshot | Cannot be restored via CloudAIPilot — use your cloud provider console |
⚠️ Restore is destructive. Current files and database contents on the server are overwritten by the backup. Any changes made after the backup was taken will be lost.
Snapshot Backups: Cloud Console Required
Cloud provider snapshots (type: snapshot) cannot be restored through CloudAIPilot. To restore a snapshot:
- AWS: Use the EC2 Console → Snapshots → Create Volume from Snapshot → Attach to instance.
- GCP: Use the GCP Console → Compute Engine → Disks → Create disk from snapshot.
- Azure: Use the Azure Portal → Snapshots → Create disk from snapshot.
- DigitalOcean: Use the DigitalOcean console → Backups/Snapshots → Restore Droplet.
How to Restore a Backup
- Open the server detail → Backups tab.
- Find the completed backup you want to restore from.
- Click Restore.
- A confirmation dialog appears explaining what will be overwritten.
- Choose:
- Safe mode (default: ON) — CloudAIPilot takes a pre-restore backup before proceeding. This gives you a fallback if the restore itself causes problems.
- Disable safe mode if you are in an emergency and disk space is limited.
- Click Confirm Restore.
Progress is shown in the Activity Center. The restore job runs step by step via SSH.
Safe Mode Explained
When safe mode is ON:
- CloudAIPilot creates a pre-restore snapshot of the current state.
- The restore proceeds.
- If anything goes wrong, you can restore from the pre-restore snapshot.
Safe mode is strongly recommended for production servers.
What Happens During Restore
For files restore:
- CloudAIPilot SSH-es to the server.
- Stops the web server (Nginx) temporarily.
- Extracts the backup archive to the document root.
- Restarts Nginx.
For database restore:
- Drops and re-creates the database (or imports to the existing database with
--force). - Restores the SQL dump.
For full restore:
- Files restore, then database restore.
What Success Looks Like
Restore status shows completed in the Activity Center. The site or server returns to the state it was in when the backup was taken. Files are present and the database contains the backed-up data.
Common Issues and Fixes
| Issue | Likely cause | Fix |
|---|---|---|
| "INVALID_STATE" error | Backup is not in completed status | Only completed backups can be restored. |
| "SNAPSHOT_RESTORE" error | Trying to restore a snapshot via CloudAIPilot | Use the cloud provider console instead. |
| "RESTORE_IN_PROGRESS" | Another restore is already running | Wait for the current restore to complete, or cancel it — see KB-05-06: Cancel Restore. |
| Restore completes but site is broken | Backup was from a different server or has wrong DB credentials | Check wp-config.php (or equivalent) for database connection details. |