| 416-621-9348 cgreaves@chrisgreaves.com | |
|---|---|
| Home Services Products |
Encryption And Off-site Backup Storage (Home) ; Overview ; The Problem ; The Essence Of The Solution ; How Long Does It Take To Do A Backup? ; Assumptions ; Breakdown Of Tasks ; The Stand-Alone Solution ; The Networked Solution ; Let’s Get Started ; Mounting The Backup Drive ; Mounting An Encrypted Drive ; Waiting For The Backup Drive ; Processing Each Local Drive ; RoboCopy New And Later Files ; RoboCopy Parameter Files ; Append Session Details To A Log File ; Shutting Down the Computer ; Review For Local Systems ; Putting Together The Local Backup System ; SUBSTituting A Drive For A Folder ; Assembling The Batch File ; ( TITLE commands ); Running The Backup Batch File ; Examining Our Results ; Waiting For A Set Of Drives ; Issue the Backup Command To A Set Of Drives ; Modifying The Driving Batch File ; What About The Log File? ; The Upgraded Set Of Batch Files ; Encryption of backup data ; What Is Involved In Encrypting A Backup Device? ; ( Advice On Passwords ); What Is Involved In Mounting An Encrypted Device? ; User Mounted Or Automated? ; Using A DOS Batch File To Facilitate Mounting ; Using A DOS Batch File To Facilitate Dismounts ; Making The External Drives Available Across The Network ; Mounting A Shared Drive For Sharing ; Installing On A Networked Computer ; Running On The Big Beige Box ; An Improved Method Of Waiting ; Shutdown Or Restart? ; At Long Last! A Working Version! ; The Backup.BAT file ; The Mount.BAT file ; The ProcessDrive.BAT file ; The Shutdown.BAT File ; The Encryption Process
Loading
Toronto and Mississauga, Friday, December 03, 2010 8:30 AM
Copyright © 1996-2010 Chris Greaves. All Rights Reserved.
Waiting For The Backup Drive
We will need to perform this test from several places.
If you are implementing a networked solution, each of your networked drives will drum its fingers waiting until the backup drive is plugged in and available on the server.
If you are implementing a stand-alone solution your local machine will want to make sure that the backup drive is plugged in and available; otherwise the backup command will fail, and your files won’t be backed up!
You can search the web for “wait.com dos utility” (without the quotes) or you can extract a copy of Wait.com from my zip file.
Wait.com waits as many seconds as you tell it to wait.
Place Wait.com in your C:\Safe\, then open a DOS window and type the command line:
Wait 4
Four seconds later your command prompt will re-appear
In the screenshot below, I wrote and then ran, a small batch file to echo the time, wait 90 seconds, and echo the time again:
We will tell the computer to wait, impatiently, by testing for the existence of the backup drive, and entering a little loop until the drive becomes available.
Title %0 - wait for a backup drive to appear :Loop if exist X:\ goto Finish @echo %0 Waiting for backup drive to be mounted wait 120 GoTo Loop :Finish REM END
The simple DOS Batch file shown above will wait 2 minutes before testing if a drive is available.
We can make the drive and the wait time be parameters of the batch file, and since this batch file will not be issued by an end-user from the command line, we can get by with minimal testing of the parameters.
Title %0 - wait for a backup drive to appear REM parameter 1 should be the anticipated Drive and path e.g. "X:\" REM parameter 2 should be the wait time in seconds e.g. "120" :Loop if exist %1 goto Finish @echo %0 Waiting for backup drive %1 to be mounted wait %2 GoTo Loop :Finish REM END
You can find WaitBack.bat in my zip file.
Loading
Toronto and Mississauga, Friday, December 03, 2010 8:30 AM
Copyright © 1996-2010 Chris Greaves. All Rights Reserved.