The fortigate will automatically backup the config to flash which can them be restore via cli, you can verify those configs with the following command:
execute revision list config
You can then restore a particular config via:
execute restore config flash <ID>
A firmware image can be loaded into the Fortigate via ftp or tftp server:
execute restore image tftp <image name> <ip address of tftp server>