Control has the ability to run a SQL backup. By default, this action is in some of the default close-out configurations so that a backup is periodically run.There is an old tech support saying that in the long run there are only two types of people in the world, “Those who back up and those who wish they did.” Unfortunately, while users can continue to use Control while the backup is being done SQL becomes far less responsive and the entire system can slow down.

This how-to guide will help you set up Control to automatically run a backup at night. The basic approach is as follows:

  • Create a Macro to run run a backup (which is treated like a report in Control).
  • Schedule the Macro to automatically run on the server every evening.
  • Check that the backup is successful! Important Step
    • Note: This will store the backup in the location specified under Setup | System Setup | Backup Options.

In this process, Control instructs SQL to start the backup. However, Control does not get confirmation back from SQL whether it was successful or not.

Since this process is run off-hours and without user interaction, it is important that you check the results periodically to make sure that you are getting new backups. Many things (most commonly a bad network path or a full drive) can prevent the backup from succeeding. The only way you will know with this configuration is if you check it.

Cyrious strongly recommends you store the backup on a different computer. The backup path in the setup options can be a UNC path.

As noted above, you will need to be sure that the temporary path, storage space and final destination is properly set in the System Setup/Backup Options setup page in Control.

  1. Create a Macro to run run a backup.
  • On the main menu, click on Sales & Marketing and then Macro Setup. This will open the Macro Setup window.
  • It doesn't matter which category we put this under (since we aren't using any data), but I put these under Company Macros so click on this category and click on the New Macro button.
  • Enter Backup Database as the Macro Name.
  • Click on the Trigger tab.
  • Since we want to schedule this, choose the Option Run this macro manually or on a schedule.
  • Macros assume they will need data to run on. In this case we don't, so we could choose almost any option that produced at least one record. For SQL efficiency, let's use a SQL query that returns exactly one record and will be very fast to run. Click on Use a SQL query and enter this text in the SQL box that appears:
    SELECT Top(1) ID, ClassTypeID FROM Account with(nolock)
  • Click on the Actions tab.
  • Let's delete the “Prompt to Begin” tab, since we don't really need this. Click on the Delete button and say yes.
  • On the “Notify of Completion” action, type the word Backup Started. Please confirm if it was successful. in the Message Text box.
  • Now let's take care of the backup. Click on Report Macro (Action) in the middle section and click the Add button above it. This will insert a Report Macro action.
  • Change the Action Name to “Run Backup”.
  • In the Menu Item Name type “Run Backup”.
  • Click on the down arrow by Action and choose Backup Store Data.
  • As configured, the backup will run after the completion message, so click on the Move Up button in the middle panel.
  • Click on the Save button on the action toolbar.
  1. Schedule the Macro to automatically run on the server every evening.
  • Open Activity Manager to the calendar view. Click on the filters icon and open the list of available filters. Be sure that “Macro Activity” box is checked so that your macro will appear on your calendar. (Note that you may have to close and restart your Cyrious program to have your Scheduled Macro appear on your calendar, particularly if you make this recurring.)
  • Right click on an open place on the calendar and select New | Macro Activity from the menu.
  • Type Run Backup as the Description.
  • Click on the down-arrow by the Macro selection and choose Backup Database.
  • Choose today as the Scheduled Date.
  • Select to Automatically Run… .. Only if Logged On (Local) initially. Once you are satisfied it is working on your login, come back and change this option to On Server (In Background).Note that all pop-up messages are ignored when running on the server since the SSLIP does not have any users.
  • Select a specific time to run the backup. While testing, you might want to do this as the end of the day when most people are gone but, alas, you are probably still working. Once it is automated, 11:00 PM would be a good time to start.
  • Once you are satisfied it is running correctly, you will want to make this a recurring backup by clicking on the Make Recurring button and choosing the backup pattern you want.
  • If you are not running it automatically, you might want to set a reminder so you will get a pop-up message to run the backup at the scheduled time.
  • Click OK to close the schedule window.
  1. Check that the backup is successful! Important Step
  • Open Windows Explorer and navigate the path specified in your backup options.
  • Each time the backup is run, another file of approximately the size of your database should appear.

Contributor: Cyrious

Date: 9/21/090

Version: Control 4.0+

You could leave a comment if you were logged in.