OpenClaw Safe Config Rollback
Use scripts/safe_apply.sh to enforce: backup → apply → restart → health check → optional ack wait → rollback on failure.
Run
bash scripts/safe_apply.sh \
--config ~/.openclaw/openclaw.json \
--apply-cmd 'python3 /tmp/patch.py' \
--ack-timeout 60 \
--require-ack
Ack mode
When --require-ack is enabled, the script prints an ack token file path.
A successful manual ack is:
touch <ack-file-path>
If timeout expires without ack, rollback is triggered automatically.
Defaults
- Health probe command:
openclaw gateway statusand requireRPC probe: ok - Restart command:
openclaw gateway restart - Backup file:
<config>.bak.YYYYmmdd-HHMMSS
Recommended workflow
- Prepare a deterministic patch command (
--apply-cmd). - Run with
--require-ack --ack-timeout 45for production changes. - Verify health.
- Ack explicitly only after end-to-end validation.
- Let timeout auto-rollback if validation cannot complete in time.