Win7 shutdown backup via GPE?
Thread Starter
Win7 shutdown backup via GPE?
I'm trying to create a backup of specific files & folder at end of day shutdown which I believe can be done with a batch file & group policy editor in Win7 Pro.
I'm not that familiar with batch files or GPE, but it doesn't look too daunting, the only issue I have is that the backup would have to be configured to run only if some time based criteria were met - something along the lines of only occurring between the hours of X & Y, not outwith. This is simply to prevent the backup running inadvertently should a shutdown be required during the working day.
Is this possible using GPE?
(I've also got Acronis True Image, but from what I can make out it's a bit dumb / limited on shutdown options)
Thanks.
I'm not that familiar with batch files or GPE, but it doesn't look too daunting, the only issue I have is that the backup would have to be configured to run only if some time based criteria were met - something along the lines of only occurring between the hours of X & Y, not outwith. This is simply to prevent the backup running inadvertently should a shutdown be required during the working day.
Is this possible using GPE?
(I've also got Acronis True Image, but from what I can make out it's a bit dumb / limited on shutdown options)
Thanks.
Spoon PPRuNerist & Mad Inistrator
It sounds like a possible solution is to use the task scheduler. Create a task to backup your files followed by a shutdown when the backup completes, and schedule it to run daily at a time of your choosing.
I don't see why group policy is required here, unless you are dealing with multiple computers in a domain.
SD
I don't see why group policy is required here, unless you are dealing with multiple computers in a domain.
SD
Thread Starter
SD - thanks for your reply;
Task scheduler isn't ideal as shutdown happens variably in a 1 hour or so window & the computer isn't left on site (so, scheduled task cant be set up to occur later), so ideally it would be driven by shutdown & not a specific schedule.
Acronis can be set up to shut down automatically at backup completion, but this would require actively starting Acronis before shutdown & in this scenario it unlikely to happen...
Task scheduler isn't ideal as shutdown happens variably in a 1 hour or so window & the computer isn't left on site (so, scheduled task cant be set up to occur later), so ideally it would be driven by shutdown & not a specific schedule.
Acronis can be set up to shut down automatically at backup completion, but this would require actively starting Acronis before shutdown & in this scenario it unlikely to happen...
Chief Tardis Technician
Join Date: Jan 2001
Location: Western Australia S31.715 E115.737
Age: 71
Posts: 554
Likes: 0
Received 0 Likes
on
0 Posts
You could write a batch file called powerdown (or similar) linked to a shortcut on the desktop, or just make a shortcut to acronis called shutdown/powerdown.
That will run your backup, and then shutdown when completed. just double click the shortcut when you want to go home.
That will run your backup, and then shutdown when completed. just double click the shortcut when you want to go home.
You could certainly define a shutdown script with local policy to invoke your backup, but the time of day logic would need to be in the script itself. If the earliest you'd want a backup upon shutdown is 4 PM, that could be as straightforward as:
And if you need more flexibility there's always PowerShell.
Regarding the task scheduler, while you could define a trigger on the User32 event ID 1074 in the System log, I'm not sure if that would give your backup enough time to complete.
Code:
if /i %time% LSS 16 goto EOF <backup command(s)>
Regarding the task scheduler, while you could define a trigger on the User32 event ID 1074 in the System log, I'm not sure if that would give your backup enough time to complete.
Join Date: Dec 2006
Location: Belo Horizonte, Brazil
Age: 79
Posts: 50
Likes: 0
Received 0 Likes
on
0 Posts
Thrust, I guess you are wanting to do the programming for fun.
If not why not just use a commercial product. I like EaseUS Todo backup. It can be configured to do just about any of your requirements.
If not why not just use a commercial product. I like EaseUS Todo backup. It can be configured to do just about any of your requirements.
Plastic PPRuNer
You should be able to do this using xxcopy (free from Pixielab and much much faster than almost all accelerated copy programs that I know) and the "shutdown" command in a batch file. You can even turn the batch into an executable if you like.
I'll have a fiddle this evening.
Just love batch files and some of the weird and wonderful things you can make 'em do for fun.
And of course, as someone said, there's always the brilliant Powershell (though it has a bit of a learning curve and a few traps)
Mac
PS: EaseUS works, but I don't like it.
I'll have a fiddle this evening.
Just love batch files and some of the weird and wonderful things you can make 'em do for fun.
And of course, as someone said, there's always the brilliant Powershell (though it has a bit of a learning curve and a few traps)
Mac
PS: EaseUS works, but I don't like it.