fortinet / fortinet.fortios / 1.1.7 / module / fortios_system_config_backup_restore Backup/restore fortigate configuration | "added in version" 2.10 of fortinet.fortios" Authors: Link Zheng (@chillancezen), Hongbin Lu (@fgtdev-hblu), Frank Shen (@frankshen01), Jie Xue (@JieX19), Miguel Angel Munoz (@mamunozgonzalez), Nicolas Thomas (@thomnico) preview | supported by communityfortinet.fortios.fortios_system_config_backup_restore (1.1.7) — module
Install with ansible-galaxy collection install fortinet.fortios:==1.1.7
collections: - name: fortinet.fortios version: 1.1.7
This module is able to backup or restore the global or particial settings of the fortigate Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0
- hosts: localhost connection: httpapi collections: - fortinet.fortios vars: vdom: "root" host: "192.168.122.60" username: "admin" password: "" tasks: - name: backup global or a_specific_vdom settings fortios_system_config_backup_restore: config: "system config backup" host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" vdom: "{{ vdom }}" backup: "yes" https: True ssl_verify: False scope: "global or vdom" filename: "/tmp/backup_test" - name: Restore global or a_specific_vdom settings fortios_system_config_backup_restore: config: "system config restore" host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" vdom: "{{ vdom }}" https: True ssl_verify: False scope: "global or vdom" filename: "/tmp/backup_test"
host: description: - host of fortigate required: false type: str mkey: description: - primary key required: false type: str vdom: default: root description: - vdom to operate on required: false type: str https: default: true description: - use https or not required: false type: bool scope: description: - scope to operation on required: true type: str backup: description: - content to backup required: false type: str config: description: - configuration to restore required: false type: str commands: description: - the command required: false type: str filename: description: - the file name required: true type: str password: description: - password of fortigate required: false type: str username: description: - username of fortigate required: false type: str ssl_verify: default: true description: - enable ssl verification or not required: false type: bool description: description: - descriptive text required: false type: str
build: description: Build number of the fortigate image returned: always sample: '1547' type: str http_method: description: Last method used to provision the content into FortiGate returned: always sample: PUT type: str http_status: description: Last result given by FortiGate on last operation applied returned: always sample: '200' type: str mkey: description: Master key (id) used in the last call to FortiGate returned: success sample: id type: str name: description: Name of the table used to fulfill the request returned: always sample: urlfilter type: str path: description: Path of the table used to fulfill the request returned: always sample: webfilter type: str revision: description: Internal revision number returned: always sample: 17.0.2.10658 type: str serial: description: Serial number of the unit returned: always sample: FGVMEVYYQT3AB5352 type: str status: description: Indication of the operation's result returned: always sample: success type: str vdom: description: Virtual domain used returned: always sample: root type: str version: description: Version of the FortiGate returned: always sample: v5.6.3 type: str