Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


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


22 Sep 2011   #1

Windows 7 Professional x64
 
 
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 System SpecsSystem Spec
.

22 Sep 2011   #2

XP / Win7 x64 Pro
 
 

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 System SpecsSystem Spec
22 Sep 2011   #3

Windows 8.1 Pro (x64)
 
 

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


22 Sep 2011   #4

Windows 7 Professional x64
 
 

Quote   Quote: Originally Posted by logicearth View Post
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 System SpecsSystem Spec
22 Sep 2011   #5

Windows 8.1 Pro (x64)
 
 

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
Quote:
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 System SpecsSystem Spec
22 Sep 2011   #6

Windows 7 Professional x64
 
 

Quote   Quote: Originally Posted by logicearth View Post
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
Quote:
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 System SpecsSystem Spec
22 Sep 2011   #7

Windows 8.1 Pro (x64)
 
 

Quote   Quote: Originally Posted by PatrickGSR94 View Post
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 System SpecsSystem Spec
24 Sep 2011   #8

Windows 7 Professional x64
 
 

I've used VSS on my Windows 7 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 Windows 7'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 System SpecsSystem Spec
24 Sep 2011   #9

Windows 7 64 bit SP1
 
 

Quote   Quote: Originally Posted by PatrickGSR94 View Post
I've used VSS on my Windows 7 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 Windows 7'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 System SpecsSystem Spec
Reply

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




Thread Tools




Our Sites

Site Links

About Us

Find 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 08:16 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33