Cancel Restore and Understand State

Who this is for

Users who have started a restore and need to stop it, or who want to understand what state the server is in after a cancelled restore.


Important: Cancellation Has Limits

CloudAIPilot's cancel mechanism signals the restore process to stop, but it cannot interrupt an already-executing step (e.g., a database import that is mid-way through).

⚠️ The restore script checks for a cancel signal between steps — not continuously. If a step is running, it will finish before the cancel takes effect.


How to Cancel a Restore

  1. Open the server detail → Backups tab.
  2. Find the backup currently being restored (shown as running or via the Activity Center).
  3. Click Cancel Restore.

CloudAIPilot writes a .cancel file on the server. The restore script detects this file between its next steps and halts.


Server State After Cancellation

The server's state after a cancel depends on which step was in progress when the signal was received:

ScenarioServer state
Cancelled before files were overwrittenServer is unchanged from before the restore
Cancelled after files were partially overwrittenServer has partial files from the backup — likely in a broken state
Cancelled after database import startedDatabase may be partially restored — likely in a broken state

What to do if the server is in a partially restored state:

  1. Check if the site/app is functional.
  2. If not, restore again from the same backup (or a different one) — the previous restore job was marked failed when cancelled.
  3. If you used Safe Mode, a pre-restore snapshot was taken before the restore started — you can restore from that.

Starting a New Restore After Cancel

After a cancel, the restoreActive flag is cleared. You can start a new restore immediately:

  1. Go back to the Backups tab.
  2. Click Restore on the backup you want.

Related Articles