Scheduling backups with the windows task scheduler – Echelon LonMaker User Manual
Page 226

210 Maintaining
Networks
backups are disabled by default. Once you set a database backup interval, the LonMaker tool will
make the automatic hot backups on the specified interval as long as changes have been made to the
network database since the previous backup, the changes were made using the LonMaker tool or
reported by an LNS event, and you are using the LonMaker tool on a local client. The hot backup will
be stored in the DbBackup<dd>\<network name> folder, where <dd> is the number in the sequence of
hot backups made for that network (for example, the third hot backup made for a network named
“Building” would be stored in the DbBackup03 \Building folder, provided that the maximum number
of hot backups is set to 3 or more).
You can set the maximum number of hot backups that are saved for all LonMaker networks (includes
hot backups created automatically and manually). By default, the LonMaker tool will save five hot
backups of a given network database before deleting older hot backups to create new ones. To change
the maximum number of hot backups, enter the desired maximum in the Max Number of LNS Hot
Backups box in the network properties: Backup/Restore options category.
You can also set a periodic backup interval, in which the LonMaker tool creates a standard LonMaker
backup of the network drawing and database. When you close a LonMaker drawing and the periodic
backup interval has elapsed, the LonMaker tool automatically creates a network backup or prompt you
as to whether you want to create a backup (you can select whether you want to be prompted to create
the backup in the Periodic Backup Options box in the network properties: Backup/Restore options
category). If you create the network backup, the backup will be stored in the LM\Backup\<network
name> folder and the backup file will include the date on which it was created and an index (if
necessary to make the file unique).
To set the periodic backup interval, select the desired number of days between backups in the Interval
in Days list under the Periodic Backup Options box in the network properties: Backup/Restore
options category. The default value is 7, which means that a standard LonMaker backup of the
network drawing(s) and database is created every week by default. For networks created with a
previous release of the LonMaker tool, you will be prompted as to whether to create a backup the first
time you close the LonMaker drawing. The Periodic Backup Options box also includes a Prompt
before Creating Backup check box that you can clear so that the LonMaker tool automatically creates
the backup without prompting you. This option is selected by default.
Scheduling Backups with the Windows Task Scheduler
To schedule a regular backup of a network with the Windows Task Scheduler, you create a scheduled
task that runs LonMaker.exe (in the LonWorks\bin directory). To create the task, follow these steps:
1. Open the Windows Task manager. Click Start on the taskbar, click Run, and the enter
C:\Windows\tasks. The Windows Task dialog opens.
2. Double-click
Add Scheduled Task. The Scheduled Task Wizard opens.
3. Click
Next.
4. Under
the
Application column, locate and then click LonMaker. Click Next.
5. Modify the task name, if desired, and select how often you want the backup performed. Click
Next.
6. Select the time, frequency, and date you want to begin running the backup task.
7. Optionally, you can enter a user name and password.
8. Select
the Open Advanced Properties check box and then click Finish. The Task Scheduler
dialog opens.
9. In
the
Run field, append the following to the command line: /Backup=<network name>[/Quiet]
[/DB||/Drawing]. The following are explanations for the command line options.
• /Quiet. Specifies that the network is to be backed up without any prompts.