Need to make sure program is closed on all machines before backup runs


  1. Posts : 182
    Windows 7 Professional x64
       #1

    Need to make sure program is closed on all machines before backup runs


    I work in an architecture office using Quickbooks to track hours, expenses, billing, etc. The company QB files reside on the server in a shared directory that is mapped as drive Z: on all machines through a domain logon script that runs when each person logs on to their machine. The company file runs in multi-user mode so that everyone can access the file and enter their hours at the same time.

    The problem is that if anyone happens to leave Quickbooks open at night, the server backup process (running BackupExec) will skip the files that are in use, usually either 2 or 3 files. This is potentially bad news because if anything happened to the server the following day after those files were skipped, we would not have the file from the night before to restore, which could potentially mean lots of information lost (sometimes lots of info is entered in one day, especially on "billing" days).

    Sometimes people will leave in the afternoon for a meeting, thinking they'll be back later and leave their programs open. But then the meeting ends up running long and they don't come back until the next day. That's usually why Quickbooks ends up getting left open on a machine overnight.

    What I'm wondering is if there's a way to make the program automatically close, if it's open on any machine, perhaps just before the backup process starts on the server. Or, make the program close if the computer has been idle a certain amount of time.

    Is there any way to make this happen? All machines in our office that have Quickbooks on it run Windows 7, except for one machine that still runs XP.
      My Computer


  2. Posts : 1,814
    XP / Win7 x64 Pro
       #2

    Find the process name of Quickbooks, then kill it from the command-line on end users' machines via psexec, task scheduler, or something of the like:

    Taskkill /IM quickbooks.exe /F
      My Computer


  3. Posts : 5,642
    Windows 10 Pro (x64)
       #3

    Shame, if you used a backup service that took advantage of the Volume Shadow Copy Service you wouldn't have this problem.
      My Computer


  4. Posts : 182
    Windows 7 Professional x64
    Thread Starter
       #4

    logicearth said:
    Shame, if you used a backup service that took advantage of the Volume Shadow Copy Service you wouldn't have this problem.
    I'm not sure I understand what you mean. Can you go into a bit more detail?

    I created a simple 2-line batch script that I have set up on all our workstations to run 5 minutes before the backup process starts, and only if the workstation has been idle for at least 10 minutes. Simple solution.
      My Computer


  5. Posts : 5,642
    Windows 10 Pro (x64)
       #5

    Volume Shadow Copy Service (VSS), is the under lying technology used by System Restore, and Previous Versions. VSS allows them to function without taking the computer offline to copy files in use or being written to. In other words, an application could be writing to the file and you can still back it up with VSS.

    https://secure.wikimedia.org/wikiped...ki/Shadow_Copy
    Snapshots have two primary purposes: they allow the creation of consistent backups of a volume, ensuring that the contents cannot change while the backup is being made; and they avoid problems with file locking...backup programs are able to access every file without interfering with other programs writing to those same files.
      My Computer


  6. Posts : 182
    Windows 7 Professional x64
    Thread Starter
       #6

    logicearth said:
    Volume Shadow Copy Service (VSS), is the under lying technology used by System Restore, and Previous Versions. VSS allows them to function without taking the computer offline to copy files in use or being written to. In other words, an application could be writing to the file and you can still back it up with VSS.

    https://secure.wikimedia.org/wikiped...ki/Shadow_Copy
    Snapshots have two primary purposes: they allow the creation of consistent backups of a volume, ensuring that the contents cannot change while the backup is being made; and they avoid problems with file locking...backup programs are able to access every file without interfering with other programs writing to those same files.
    Wouldn't that mean that if the file was in use, the backup software would copy the most recent shadow copy, which could be 12 or more hours old? In our workflow that could still mean loss of quite a bit of data if something happened to the server. I would prefer to have it back up the file with everything through the end of that day, so I think the script to make sure it's closed on everyone's machine will work best.
      My Computer


  7. Posts : 5,642
    Windows 10 Pro (x64)
       #7

    PatrickGSR94 said:
    Wouldn't that mean that if the file was in use, the backup software would copy the most recent shadow copy, which could be 12 or more hours old?
    No, it means it takes snapshots when you tell it, then one saves the snapshot. VSS takes snapshots without interrupting or being interrupted. That is the point. The built in backup solution in Windows 7 and Windows Server 2008 use VSS to overcome the issue of files in use by using VSS to take a snapshot.

    Do not confuse VSS with System Restore. I'm not even sure where you got the 12 hours old deal.
      My Computer


  8. Posts : 182
    Windows 7 Professional x64
    Thread Starter
       #8

    I've used VSS on my Win7 machine many times before to get back files that were accidentally deleted from our server. I just right-click on the folder and go to Restore Previous Versions. The list shows a "snapshot" of that folder and its contents from twice each previous day for a couple of weeks back, which is what I was referring to by the 12 hours. Actually ours shows snapshots at 7 AM and 12 PM each day. Not sure where those times came from. However I'm not sure if that's Win7's VSS on my workstation that's taking those "snapshots" or if it's on the server itself. Our server runs Windows Server 2003.

    Anyway, I went ahead and set up the batch file on everyone's machine to be sure Quickbooks is closed each night before the backup starts. For additional protection, our office manager's copy of QB is set up to automatically create its own backup file in completely separate folder on the server, each time she closes out of QB. That folder is then also backed up by BackupExec each night.

    Add all that to our 3 other on-site and off-site backup locations and I think we're pretty well protected. :)
      My Computer


  9. Posts : 1,653
    Windows 10 Pro. EFI boot partition, full EFI boot
       #9

    PatrickGSR94 said:
    I've used VSS on my Win7 machine many times before to get back files that were accidentally deleted from our server. I just right-click on the folder and go to Restore Previous Versions. The list shows a "snapshot" of that folder and its contents from twice each previous day for a couple of weeks back, which is what I was referring to by the 12 hours. Actually ours shows snapshots at 7 AM and 12 PM each day. Not sure where those times came from. However I'm not sure if that's Win7's VSS on my workstation that's taking those "snapshots" or if it's on the server itself. Our server runs Windows Server 2003.

    Anyway, I went ahead and set up the batch file on everyone's machine to be sure Quickbooks is closed each night before the backup starts. For additional protection, our office manager's copy of QB is set up to automatically create its own backup file in completely separate folder on the server, each time she closes out of QB. That folder is then also backed up by BackupExec each night.

    Add all that to our 3 other on-site and off-site backup locations and I think we're pretty well protected. :)
    What your talking about is system restore that will allow you to restore those files.

    The way backups use VSS is, the moment you start the backup, a shadow copy is made of t he volume. Once a Volume shadow is created, instead of overwriting blocks of a file on disk, they are written to a different location (this is referred to as "copy on write"). Similarly, if you delete a file, the blocks belonging to the file are not overwritten. The backup uses the old copies of modified and delete blocks while the running system access the modified blocks. When the backup is complete, the old copies of blocks are freed for reuse.

    So, with a backup that uses VSS, your backup contains a self consistent snaphot of the system at the time you started the backup. All files are backed up - none are skipped.

    System restore also uses VSS to make restore points.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:00.
Find Us