It is possible to configure Ignition to automatically perform scheduled Gateway backups to a local or networked file location. The following knowledge base article discusses how to configure an Ignition installation to perform these backups within the context of typical network security settings. This article is relevant to Ignition installations in Windows environments.
The picture below demonstrates an Ignition Gateway configured to save to a network location every evening at midnight.
To configure networked backups, access the Gateway to configure the settings for automatic scheduled backups. Select the Configure tab and select Gateway Settings from the list of options under the section called Configuration. The section titled Scheduled Backup Settings is where Ignition contains options to configure scheduled backups.
Selecting Enable Scheduled Backups check box will instruct Ignition to make scheduled backups of the Gateway.
The backup folder is the location where the backups will reside. This may be a local folder, for example "C:\backups" or a network path such as "\\fileserver\backups". The scheduled backup feature does not recognize mapped network drives. For example, a network administrator configured a local computer with an Ignition Gateway to have a mapped network drive. This mapped network drive was known to the local computer as its "Z:\" drive. If the administrator configures the Ignition installation to automatically backup to the "Z:\" drive then the automatic backups will not occur.
Ignition runs as a Windows service. Windows service applications run in their own security context and are started before the user logs into the Windows computer on which the service is installed. Therefore, the log-in credentials of the Windows user will not affect the Windows service. Access to the ”Z:\” drive in this example will fail because Ignition as a Windows service does not have permission to access to the “Z:\” drive. Alternatively, the administrator can enter a full network path such as “\\fileserver\backups” or even “\\10.10.1.52\backups.” In this case, access to the file path is possible for a Windows service such as Ignition as long as the Ignition service has permission to write to the target location. For example, the target’s security settings authorize a service from a certain IP address to have write permission to a certain folder location.
Alternatively, the target’s security settings might use Active Directory to authenticate the permissions. If this is the case then the Ignition service must log into the correct Active Directory domain and have the required permissions. Ignition as a windows service can log into an Active Directory domain by configuring its service settings. These services settings can be accessed from the Windows services console under the properties of the Ignition service.
Ignition will test for the presence of the backup location after the selection of the button labeled Save Changes from the bottom of the Gateway settings page. If the file does not exist then Ignition will attempt to create the file. For example, the file location “\\fileserver\” exist but does not contain a folder called “backups.” The Gateway will attempt to create the “backups” folder immediately after saving the configuration settings. If the Gateway could not create the folder then an error will appear in the Gateway console. If an error exist in the Gateway console then most likely the Ignition service does not have write permission to the target file location.
A good practice is to enter “*/5 * * * *” into the Backup Schedule text area while testing the ability for the Gateway to perform scheduled backups. The crontab style scheduling in this case schedules the Gateway to perform backups to the backup folder every 5 minutes. This allows the Gateway administrator to verify the backups are occurring in accordance with this schedule. Ignition crontab style scheduling subscribes to standard crontab style formatting.
Retention Count refers to the number of Gateway backups the Gateway manages in the backup folder location. It will not exceed the number as configured in the retention count. The Gateway will delete older versions of the backup files in order to make room for new backup files.
A best practice for setting up scheduled backups involves confirming that the Gateway can access the backup folder by configuring a backup schedule to occur within a fast iteration such as every 5 minutes. Changing the crontab to a more reasonable backup schedule is appropriate after confirmation that the Gateway is writing actual backups to the backup folder. As an additional step, restarting the Gateway and inspecting the backup folder for additional backup files written to the backup folder will ensure that the scheduled backups persevere after restarting the Gateway.