This article describes how to create configuration revision and enable automatic backup on logout.
A useful feature of the FortiGate is to save and revert any configuration change. Find the 'Configuration Revisions' option in the top-right drop-down menu on the logged in administrator:
# execute revision list config
Once the ID is found, use the following command to load the old revision:
# execute restore config flash <Revision_ID>