Summary

The backup scheduler enables automatic backup of your invoice template and database files.

For now the backup scheduler is designed for local files only -- i.e. your invoice template and Access database file. SQL Server offers its own back up tools, as detailed on Create a Full Database Backup (SQL Server). If your SQL Server is hosted on the Internet, the hosting service provider may offer automatic backup too.

How to enable automatic backup

The backup scheduler built into Invoice Manager for Excel utilizes Windows Task Scheduler. Once you have scheduled your backup task, it is performed automatically on each recurring day.

  1. Open your invoice / quotation template as usual.
  2. Click "Settings".
  3. Go to the "Database" tab.
  4. On the "Access database" page, click "Backup Scheduler".
  5. Check "Enable automatic backup" start activate the task. Remove this check to disable automatic backup.

    Backup Scheduler dialog box in Invoice Manager for Excel

  6. In the "When to backup" section, specify the week day you want to execute the backup, from Monday to Sunday.
  7. The "What to backup" section shows all the files that will be backed. The "Add current database and template" button (The store edition does not have this button) allows you to quickly add the current Excel template and Access database file. You can add other files too, by clicking the "Add" button, or delete a files from the list by clicking the "Delete" button.
  8. The "Other options" section allows you to specify where to backup (i.e. the destination folder), and the log file. Make sure your Windows account that will be used when executing the backup has full access privilege for writing files into the destination folder.
  9. Click the "Apply and close" button to make the options take effect. If you have already created / enabled the backup task using another Windows account, it prompts error message.

Once you enabled the automatic backup, on each recurring day specified in the "When to backup" section, all files shown on the "What to backup" list will be copied to a zip package file stored in the destination folder. The zip package file will have a file name like "Imfe-BackupFile-20200822-075209.zip", where "20200822" is the date when the backup is performed, and "075209" is the time (hour, minute, second).

That's all you need to know to enable automatic backup for Invoice Manager for Excel. The following section explains the underlying mechanism. You need to understand the underlying mechanism only when you want to further customize the backup process.

How the backup scheduler works

When the backup scheduler is enabled, Invoice Manager for Excel creates a task named "Invoice Manager for Excel Backup Task" in Windows task scheduler. To start Windows Task Scheduler, type "Task Scheduler" into your Windows 10 search box, click "Task scheduler" on the result.

The Windows Task Scheduler utilized by Invoice Manager for Excel Backup Scheduler

Double click or tap on "Invoice Manager for Excel Backup Task" to open the property page.

The backup task property page

As you can see Windows task scheduler offers more options and thus deep control over the task execution. For example, the task created by Invoice Manager for Excel is run only when you sign in Windows with the account you used to create the task. However on this "Invoice Manager for Excel Backup Task Properties" dialog box, you can choose to "Run whether user is logged on or not."

The "Actions" page shows what to do when the task runs. In this example, the "Action" is "Start a program", which is "ImfeBackup.exe" installed by Invoice Manager for Excel setup program.

If you use the Microsoft Store edition, the program to run is:

rundll32

For Invoice Manager version 12.11 (build 301) and later:

The files to backup, the backup target location and the backup log file are all specified via the command line argument section. The separate XML configuration file is no longer required.

For Invoice Manager version prior to 11.12 (build 297):

When ImfeBackup.exe starts to run, it loads the configuration file:

C:\ProgramData\UniformSoft.com\Invoice Manager for Excel\BackupSettings.xml

Here is an example of BackupSettings.xml

                        
<?xml version="1.0" encoding="utf-8"?>
<cBackupOptionsData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Enabled>true</Enabled>
<DaysOfWeek>127</DaysOfWeek>
<FilesToBackup>E:\inv2\aa.xlsx;E:\inv2\aabb.mdb;e:\inv2\INVOICE.xlsx;E:\NET\UIS\to release\excel\sample6.mdb</FilesToBackup>
<DestinationFolder>c:\Invoice Manager for Excel Backup\</DestinationFolder>
<LogFile>c:\Invoice Manager for Excel Backup\backup-log.txt</LogFile>
</cBackupOptionsData>
    

The options shown in the BackupSettings.xml match what shown on the Backup Scheduler dialog box inside Invoice Manager for Excel. It's pretty straightforward, except the <DaysOfWeek> element, which uses an integer number to identify which days of week to run the backup. This <DaysOfWeek> value is in fact a sum the following week day numbers:

Sunday1
Monday2
Tuesday4
Wednesday8
Thursday16
Friday32
Saturday64

So for example, if the task should be run on each Sunday and Monday, you fill 1 + 2 = 3 into the <DaysOfWeek> element.