Link to home
Start Free TrialLog in
Avatar of Fred D
Fred DFlag for United States of America

asked on

Need Automated QuickBook Backup on a Server

I need a reliable way to backup our 3 different QuickBooks Pro 2019 company files on the 2012 server.
And keep at least 5 copies of each.  
The Built-In QB backup program has to be running and in single user mode to run a backup and I have to be logged on to each QB file in order to run a verify and backup.  
I tried a batch file but it keeps too many files and the extras must be manually deleted.
And I don't think I need to copy any of the other files like the TLG files that continue to grow unless you backup with the QB Program.
I am using Carbonite to the cloud and a local disk but if the file is left open by any user then the backup is somewhat corrupted.
Thank you.

Avatar of Bill Bach
Bill Bach
Flag of United States of America image

I'm a bit OCD about backups, because I have lost critical data in the past.  (OK, that was on an 80286 with a 40MB hard drive, but it took out my entire semester project for a class, and I had to rewrite the entire thing in under a week, I learned my lesson early.)  For my critical QuickBooks data, I actually use TWO different backup methods.

The first backup method is via the application.  First, create 5 folders.  I call mine MondayNight, TuesdayNight, etc.  Start QB from the server, go to File, Backup, Create Local Backup.  Select Local Backup & click the Options button. Click OK, then Next, and then select the option to Only Schedule Future Backups, then Next.  Click New... to schedule a new backup.  Give it a name and set the location to the MondayNight folder.  Check the box to keep 3 backups. (With 5 daily folders, you'll actually have 15 rotating copies.  Decrease this if you are low on disk space.)  Set the time to 11PM and click the Every 1 Week on Monday options.  Click OK and you're done.  Repeat this for each day of the week and for each database.

Two down sides: 1) You have to set this up for each database for each night.  I'm sure there's got to be a way to schedule it with PowerShell or something, but I've never looked. 2) Every time you update QB, the old backup task fails and will never run again.  You have to go to Task Scheduler and remove all the old ones and create a bunch of new ones.

The second backup method is via a VSS Snapshot. You may find this easier, as you don't have to set up so many jobs, but it is a bit more technical. First, you have to configure VSS storage for the volume on which your files are stored.  Then, download the Volume ShadowCopy Simple Client (VSCSC) along with the accompanying DOSDEV utility.  From here, I'll just give you the scripts as I run them.

The first is a batch file that runs the backup.  You can schedule this directly in the Task Scheduler, but I call mine BackupQuickBooksVSS.BAT:
E:
CD\BackupScripts
vscsc -exec=E:\BackupScripts\BackupQuickBooksVSS_Script.bat E:

Open in new window

This calls the VSCSC tool to create a snapshot, and then passes that snapshot to the second batch file, which looks like this:
E:
CD\BackupScripts
DOSDEV B: %1
"C:\Program Files (x86)\Beyond Compare 3\BCompare.exe" @E:\BackupScripts\BackupQuickBooksVSS.Txt
DOSDEV /D B:

Open in new window

This file mounts the VSS snapshot as Drive B, then uses a tool called Beyond Compare (www.scootersoftware.com) to copy only the changed data each night.  (The text file is simply another script that tells BC what to copy.)  You can replace the 4th line with your favorite copy program -- XXCOPY, ROBOCOPY, SFTP, etc.

When the VSCSC script runs, the B: drive is an exact snapshot of the E: drive (in my case, specify your own data volume), but frozen in time and completely available (i.e. no locked files).  Therefore, the backup script can get to all the files, even if users are still using the system.

I should also note that I don't just leave the LOCAL copies of these backups, either.  I have another script that uses BC to copy the QuickBooks Backups folders from the server to my desktop at 12:01AM every morning.  At 12:20, another BC script copies the backup folder structure to my NAS. Finally, I have yet another process that backs up the VM running QB starting at 1AM to the NAS.  

Are all of these enough?  Nope.  Nothing is being sent off-site yet!  There is another BC process that I use to copy all backup data from the NAS (including both the server-side backups and all QB backups) to an external USB hard disk connected to my laptop every Monday morning, which then gets rotated among 6 drives.  The most recent is in a fireproof safe, 4 more on the shelf in my office, and one periodically rotated to the safe deposit box at the bank.

Paranoid much?  Perhaps.  However, data is the lifeblood of my company.  I have lost a VM server before, and restoring was easy.  I have lost the data on the NAS before (twice), and restoring was easy.  I have never lost more than a day's effort in the 24 years of our business operations.
> ...tried a batch file but it keeps too many files and the extras must be manually deleted

Would adjusting your batch so it backs up just the file types you need work for you?

If so, it shouldn't be difficult to configure it so you have a backup set of each day Monday thru Friday
Avatar of Fred D

ASKER

Bill Bach - wow!  you have taken backups to another level and I like your thinking especially about rotating external drives.
The two downsides you mentioned are a problem and I have experienced both especially the second because I was not aware that a new release stopped the backups.

An important question would be about making sure QB is closed and nobody else has left their PC on to access the file therefore making the backup somewhat corrupt.

I'm not sure about the option to do a backup with Power Shell but I do like the other methods with VSS and will try them. Obviously it will take a bit to get those started but thank you for the scripts.
I would like to keep this thread open for a week or so so that I can experiment and reply with my findings.

Using these alternatives I didn't see anything that would only keep 5 days of VSS backups so I don't have to do any manual deletes.  And is this copying the entire drive E?

Thank you!!!
ASKER CERTIFIED SOLUTION
Avatar of Bill Bach
Bill Bach
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial