Backup and Recovery
APF keeps little state on a host. Most of what it needs, the signed bundle, trust roots, and keys, comes from your deployment and publish pipelines and can be reinstalled. The anti-rollback counter is the one piece of state that only the host has, and it needs deliberate handling.
State on a Host
The policy gateway keeps no policy state of its own. It rebuilds its evaluator from the policy service at startup.
The Anti-Rollback Counter
The counter records the highest bundle revision the policy service accepted. Losing it, or restoring an older copy, lets the host accept an older signed bundle again.
- Back it up after each activation, or at least as often as you publish bundles.
- Treat counter loss as a security event. A missing counter reads as
0, as on a fresh install. Before you restart the service, make sure the only bundle it can load is the current one. - Do not restore an older counter to work around a rejection. Publish a bundle with a higher revision instead.
- A corrupt counter stops the service. It refuses to start until an operator restores a good copy or removes the files deliberately.
Recovery Scenarios
Backup Tooling
The repository does not include backup or restore tooling. Use your platform’s tools, and keep backups of the counter under the same access controls as the counter itself.
Next Steps
- To diagnose a service that does not start, refer to Troubleshooting.
- To understand the counter in depth, refer to Expiry and Rollback Protection.