Automatically backing up the Food Processor or Genesis R&D Foods database requires:
- Setting up a command line calling Database Utility; and
- Scheduling the execution of that command line through Windows Task Scheduler.
Set up a command line calling Database Utility
1. Go to Start and type "CMD" to open the Command Prompt
2. Use the following to call Database Utility
- Format: "[path\]dbutil.exe" -backup "[path\filename.bak]" ex: "C:\Program Files (x86)\ESHA Research\DatabaseUtilities\dbutil.exe" -backup "C:\Esha backup\eshastuff.bak"
- Parameters: filename: (optional) the database backup will be written to this file.
Notes: The filename parameter is optional; if it is not provided, the program will create a default name for the file, in the format [DatabaseName]_date-time.bak. If the file named already exists, it will be deleted before the backup begins.
The file named must physically reside on the same computer that contains the SQL Server instance. It cannot be a shared network drive. If a file path is not provided, it will save the backup at C:\ProgramData\Esha Research\Database Utility\backup
3. Create a new text document and enter in the command line described above. After saving the file, change the file extension from .txt to .bat.
Schedule the execution of the command line
You can then schedule the Task Scheduler setting the Action to Run a Program using the .bat file whenever you would like.
- Go to Start and search for "Task Scheduler" to access that program
- Under Actions, click Create Basic Task
- Follow the prompts
- When you get to the Action screen, enter the path for the Program/script
- Click Finish.
Reference the Windows documentation for more information.
This Microsoft article tells you how to schedule backups of SQL Server databases in SQL Server Express (the \ESHA instance).