Scheduling Backups of your Microsoft Money File
I've occasionally been asked about Microsoft MS Money file backups for versions
prior to Money 2006. (For Money 2006 and later backups, I have another
article - see FAQ Article 212)
Money creates a backup on *exiting* the program, which means that if you close a
file with some corruption, it is carried forward into the backup. This means that
you may never obtain a 'clean' backup file unless you take steps to enhance the
backup system.
What do I do to backup the file?
I choose to backup the backup file, but do this on a very regular basis. I avoid
any corruption issues because if I do it often enough, I generate enough safe files
to allow me to ignore any files with issues. I state that I backup the backup file
- this is because trying to copy a Money file which is open won't work - the file
could be locked and Windows can't copy it. This can be the case if you use a Pocket
PC or have background banking turned on.
Also, I use a USB pen drive as a removable backup. This is a really good option
- you can take your money file off the machine, so in the case of a catastrophic
failure, you've got your Money file elsewhere.
I am also fortunate enough to have more than one machine, so my money file is copied
across my network to another machine in another room.
How do I cause the backup file to be saved?
I use Scheduled Tasks to do it. There is a daily task which runs between 00:00 and
01:59 (currently 00:21 in the example) and then every two hours afterwards. This
task runs my script. When my computer is not running, I don't really care. When
it is, I take a copy just in case I've used Money in the period since the last backup.
Each time the script runs, it creates a file - depending on how you use the script,
you will overwrite daily/monthly files until the end of the day/month - the following
day/month a new file is created.
My script is called '_money_backup.bat' and lives in the D:\backup directory
Note the settings - run every two hours for 24 hours, every 1 day
And in the advanced options, this is where I say every two hours, for 24 hours,
so i get a backup at anytime of the day or night I am using the system
Warning on disk space!
If you create a lot of backup files (ie you go for the daily option), you'll use
up huge amounts of disk space. You can compress the Money files on closure (Tools->Options->Backup,
make my file small (compress it) on both manual and automatic backup) to save quite
a bit of space, and think about removing older files after a time (maybe leaving
one per week or month).
The Backup Batch File
@echo off
for /F "tokens=1-4 delims=/ " %%i IN ('date /t') DO (
set DT_DAY=%%i
set DT_MM=%%j
set DT_YYYY=%%k)
if exist "d:\backup\My Money Backup%dt_yyyy%%dt_mm%%dt_day%.mbf" attrib -r "d:\backup\My
Money Backup%dt_yyyy%%dt_mm%%dt_day%.mbf"
copy "d:\backup\My Money Backup.mbf" "d:\backup\My Money Backup%dt_yyyy%%dt_mm%%dt_day%.mbf"
/y
This script will create a daily backup. Create a Windows Batch file and copy this
into it, and then schedule the batch file. Note that the location of my backup files
is almost certainly going to be different to yours, so amend the script accordingly.
You might only want Monthly backups, in which case use the following script:
@echo off
for /F "tokens=1-4 delims=/ " %%i IN ('date /t') DO (
set DT_DAY=%%i
set DT_MM=%%j
set DT_YYYY=%%k)
if exist "d:\backup\My Money Backup%dt_yyyy%%dt_mm%.mbf" attrib -r "d:\backup\My
Money Backup%dt_yyyy%%dt_mm%.mbf"
copy "d:\backup\My Money Backup.mbf" "d:\backup\My Money Backup%dt_yyyy%%dt_mm%.mbf"
/y
Summary of what happens
By running the script every two hours, I get a backup quite often, which will overwrite
any previous one from the same day/month. Once a new day/month occurs, the filenames
get changed and a new file is created. The old backup is left and becomes the definitive
one for that [previous] day/month.
Issues with the backup script
Only one that I am aware of at the moment.
- Windows XP SP1 sometimes doesn't run scheduled tasks if you use Standby (and possibly
hibernate) a lot. Windows XP Service Pack 2 (SP2) fixes this (and a whole lot more
besides, make sure you upgrade to it!)
Question about backups and the backup script
Feel free to POST questions to the newsgroups (news:microsoft.public.uk.money
and news:microsoft.public.money).
Don't send me email, I get enough and don't read unsolicited stuff. If you have
some enhancement suggestions which you think ought to go on this page, then do send
me them. I'll add them if they are complete and are a useful addition.
Thanks to Matt for some changes to the checking attribute line.