Wikiposts
Search

Notices
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 April 2017 | 09:10
  #1 (permalink)  
Thread Starter
10 Anniversary
 
Joined: Aug 2012
Aviation Qualifications: Spotter
Posts: 343
Likes: 173
From: Scotland
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  
Reply
Old 7th April 2017 | 17:10
  #2 (permalink)  
Administrator
 
Joined: Mar 2001
Aviation Qualifications: PPL
Posts: 8,121
Likes: 686
From: Twickenham, home of rugby
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  
Reply
Old 7th April 2017 | 21:47
  #3 (permalink)  
Thread Starter
10 Anniversary
 
Joined: Aug 2012
Aviation Qualifications: Spotter
Posts: 343
Likes: 173
From: Scotland
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  
Reply
Old 8th April 2017 | 09:45
  #4 (permalink)  
Chief Tardis Technician
 
Joined: Jan 2001
Posts: 554
Likes: 0
From: Western Australia S31.715 E115.737
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  
Reply
Old 10th April 2017 | 02:40
  #5 (permalink)  
10 Anniversary
 
Joined: Nov 2011
Posts: 24
Likes: 5
From: Hillsgrove
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  
Reply
Old 11th April 2017 | 20:17
  #6 (permalink)  
Thread Starter
10 Anniversary
 
Joined: Aug 2012
Aviation Qualifications: Spotter
Posts: 343
Likes: 173
From: Scotland
Thanks all.
Thrust Augmentation is offline  
Reply
Old 12th April 2017 | 01:17
  #7 (permalink)  
 
Joined: Dec 2006
Posts: 50
Likes: 0
From: Belo Horizonte, Brazil
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  
Reply
Old 16th April 2017 | 12:37
  #8 (permalink)  

Plastic PPRuNer
25 Anniversary
 
Joined: Sep 2000
Posts: 1,902
Likes: 0
From: Rochechouart, France
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  
Reply

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 © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.