Documentation · Chapter 18

Activate atomically and keep a way back.

Upload and activation are separate phases. Timestamped releases and a current link allow fast atomic switching and rollback.

Every lesson starts from the problem, explains the mechanism, then gives a concrete verification.

LESSON OBJECTIVE

What you will be able to do

Separate upload, preparation, health verification, activation, retention, and rollback responsibilities.

Transfer only differences

After the first release, fingerprint comparison avoids re-uploading unchanged files while still producing a complete release view.

phpaml — zsh
aml deploy staging
aml deploy:status staging
aml deploy:history staging
aml deploy:rollback staging

Activate after verification

Run remote preparation, migrations under policy, health checks, then switch current atomically. Keep old releases until the new one is proven.

Rollback is not database time travel

Code rollback cannot automatically reverse destructive schema or external side effects. Design backward-compatible migrations and separate recovery plans.

CHECKPOINT

Before you continue

Could code rollback leave the database schema or an external side effect incompatible with the restored version?