Backup Autosoft on a regular schedule
The Autosoft backup program can be set up to run automatically on a regular basis. To do this we use the Windows Task Scheduler, a normal part of your operating system.
This article explains how to create a scheduled task and call the Autosoft backup program from there. It has been written for the Windows 7 Professional operating system, and assumes Autosoft is installed on the C: drive under Autosoft5 (ie. C:\Autosoft5). If this is not the case, replace "c:\Autosoft5" with the correct path in the instructions below.
- Run the Autosoft Backup program (see separate article) and set all the values to be correct for the environment, including any FTP details. Click on "Save Screen Values" to write these settings out to the Backup.ini file (usually in c:\Autosoft5\Programs in case you want to check).
- It's possible you may get SQL permission errors in trying to run the Backup.exe program directly from the task scheduler, so we shall create a "dos batch/command file" to call the backup program, and call it from the task scheduler. Call up Notepad and type in the following:
Save this in the c:\Autosoft5\Programs folder as "BackupDB.bat".
Note that you could backup more than one database by adding more "Backup.exe" lines with extra command line parameters to specify database, eg.
Backup.exe AUTORUN=1 DATABASE=2ndDatabase
- From the Windows Start menu, call up Control Panel / Administrative Tools / Task Scheduler.
- On the left, click on Task Scheduler Library then choose "Create Task..." from the Action menu on the right.
- Give it a name, eg. "Autosoft DB Backup" and description, eg. "Backup Autosoft database and send it offsite via FTP".
- Click on the Triggers tab, then New to bring up the Edit Trigger dialog. Make sure the "Begin the task:" is set to "On a schedule", then choose Weekly, and tick every day that the workshop operates - probably all days except Sunday. Pick a time that is suitable for the conditions - not when the workshop is too busy, some time when the computer is likely to be switched on, after or before the working day is ideal but not necessary. The backup can be taken while Autosoft is being used. Click on OK to close the Trigger dialog.
- On the Actions tab, click New to bring up the Action dialog. Leave the Action: at "Start a program", type "cmd" without the quotes for Program/script, and Add arguments of "/c c:\Autosoft5\Programs\Programs\BackupDB.bat". Click OK to close the Actions dialog.
- Select the Settings tab. Change the time for "Stop the task if it runs longer than:" to be something smaller than 3 days. 1 hour should be fine - the backup should take only a couple of minutes for a smaller database up to maybe 20 minutes for an Autosoft database which has been in production for 10 years.
- Click on OK to save away the new task. It should appear in the list of tasks which are shown in the middle window when "Task Scheduler Library" is selected from the tree view on the left. To test that it will run correctly, select the task and choose Run from the Selected-Item menu on the right hand side. The backup should run and follow the options as set up in step 1. If not, review each of the steps above and check the settings.
Please note that support of Windows Task Scheduler is outside the scope of your normal Autosoft Support agreement. As such, this guide is provided "as is" and does not imply that Autosoft will fix problems with your Task Scheduler.