Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Win7 shutdown backup via GPE?

Thread Tools
 
Search this Thread
 
Old 7th Apr 2017, 09:10
  #1 (permalink)  
Thread Starter
 
Join Date: Aug 2012
Location: Scotland
Age: 54
Posts: 279
Received 82 Likes on 23 Posts
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.
Thrust Augmentation is offline  
Old 7th Apr 2017, 17:10
  #2 (permalink)  
Spoon PPRuNerist & Mad Inistrator
 
Join Date: Sep 2003
Location: Twickenham, home of rugby
Posts: 7,381
Received 244 Likes on 162 Posts
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
Saab Dastard is offline  
Old 7th Apr 2017, 21:47
  #3 (permalink)  
Thread Starter
 
Join Date: Aug 2012
Location: Scotland
Age: 54
Posts: 279
Received 82 Likes on 23 Posts
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...
Thrust Augmentation is offline  
Old 8th Apr 2017, 09:45
  #4 (permalink)  
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.
Avtrician is offline  
Old 10th Apr 2017, 02:40
  #5 (permalink)  
 
Join Date: Nov 2011
Location: Hillsgrove
Posts: 21
Received 4 Likes on 2 Posts
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:
Code:
if /i %time% LSS 16 goto EOF
<backup command(s)>
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.
CaptOveur is offline  
Old 11th Apr 2017, 20:17
  #6 (permalink)  
Thread Starter
 
Join Date: Aug 2012
Location: Scotland
Age: 54
Posts: 279
Received 82 Likes on 23 Posts
Thanks all.
Thrust Augmentation is offline  
Old 12th Apr 2017, 01:17
  #7 (permalink)  
 
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.
JimR is offline  
Old 16th Apr 2017, 12:37
  #8 (permalink)  

Plastic PPRuNer
 
Join Date: Sep 2000
Location: Cape Town
Posts: 1,898
Received 0 Likes on 0 Posts
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.
Mac the Knife is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.