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
PatrickGSR94

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
FliGi7

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
logicearth

Windows 10 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
PatrickGSR94

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
logicearth

Windows 10 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
PatrickGSR94

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
logicearth

Windows 10 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
PatrickGSR94

Windows 7 Professional x64
 
 

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 System SpecsSystem Spec
24 Sep 2011   #9
GeneO

Windows 10 Pro. EFI boot partition, full EFI boot
 
 

Quote   Quote: Originally Posted by PatrickGSR94 View Post
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 System SpecsSystem Spec
Reply

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




Thread Tools




Similar help and support threads
Thread Forum
Smite Closed Beta Crashes when it wants to open but it still runs
Hi guys every time i want to open my game Smite Closed Beta it crashes like this but it will open its just pretty annoying that everytime i want to open the game its crashes does anyone know how to fix this problem? and here is the error page i can open the game but everytime i open the game its...
Gaming
Windows Runs Installation of Program When I Start Program
I installed Weathrbug Plus and for some odd reason recently when I run it Windows runs the installation for the program. When I run the prograsm I get the typical "Preparing to install..." abnd then tyhe 'Configuring Weatherbug. I've been in contact with Weatherbug Support all day and we can't seem...
Software
Closed Program Screens Ghost on Desktop
The issue: When running two or more programs, one of which is Acrobat X 10.1.3 and the other is IE9, on closing IE9, the last page visited stays in the Acrobat window. I use CCleaner and went into Task Manager to make sure iexplorer was closed - including using Process Explorer to close the...
Software
How do I make sure my Hyper X memory runs at 1600 in my ASUS P5Q3
This is my first post and hopefully I do it right cause I'm a noob... Recently made a few purchases to upgrade my computer. I purchased a OCZ-Vertex 3 120GB SSD and installed Windows 7 on it for faster performance of the OS. At the same time I purchased 8GB of Kingston Hyper X memory...
PC Custom Builds and Overclocking
When Backup Runs, Windows Reports Backup Target Disk Removed
My Win 7 x64 machine (Dell) has three hard drives in it. The original 2TB Seagate with the operating system on it, C:, a 2TB WD used for data storage,F:, ..and a 1TB Seagate repurposed from the XP computer it replaced. That last drive contains only data as that was its purpose in the previous...
Backup and Restore
Make windows slide away when closed
Anyone know if there is a tweak / app / something available that will change the way windows apps closes in Win 7? My desire is to have the windows slide off screen rapidly when closed instead of fading out like they do by default. Not sure if this exists or not. I have tried searching for...
Customization


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 20:30.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App