Creating and Using a Network Backup File
This command is used to create a backup image of LoggerNet’s working directory. The backup file will contain the exact images of LoggerNet’s configuration files and, when restored, will restore LoggerNet to the exact state that existed when the backup file was created. A file created using this command can be restored using the restore-snapshot command.
NOTE: You may want to consider using LoggerNet’s Scheduled Backup/Manual Backup/Restore Network options available from the Setup Screen as an alternative to using CoraScript for network backups.
To create a backup file, connect to the LoggerNet server (LoggerNet must be running), and type in the following command:
create-backup-file;
If executed successfully, you will see something similar to the line below:
+create-backup-file, C:\CampbellSci\Loggernet\2005-3-1_14-15-01.snapshot;
Where the directory is the path in which the backup file is stored, and the file name reflects the date and time the snapshot was created.
Create-backup-file has three options. You can specify the path and filename instead of using the default, include additional files in the backup image that would not otherwise be saved, and specify whether or not the data cache will be stored with the image. By default, the data cache will not be saved, so it may be a good idea to include at least this option if your intent is to fully restore LoggerNet to the exact state it was in when the backup was created. In this instance, the command would be:
+create-backup-file include-tables=“true”;
To restore LoggerNet from a snapshot file created using the create-backup-file command, use restore-snapshot. For instance, to restore from the backup file created above:
restore-snapshot 2005-3-1_14-15-01.snapshot;
By default, when the network is restored, LoggerNet will first delete all files from the LoggerNet working directory. However, you can override this default by using the clear=“false” option after the filename.
Refer to the CoraScript on-line help for more information on these two commands and their associated options.