416-621-9348 cgreaves@chrisgreaves.com Visit www.ChrisGreaves.com for this image! Chris_GEDC1894_Head (Small).JPG
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.

Processing Each Local Drive

Each machine will be responsible for sending copies of files to the backup drive, wherever that backup drive is.

Let’s develop the code to work our way through all local drives.

We start with two small batch files:

AllDrive.bat

For %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do ProcessDrive %%a

ProcessDrive.bat

if exist %1:\ @Echo %1

The ProcessDrive.bat is an embryonic form of our basic back process. For now it merely tests to see if the drive exists, and if the drive does exist, then the drives name is echoed back to us.

AllDrive.bat works its way through all 26 letters of the alphabet – the maximum legal set of drive letters, and tries to process each drive.

We do not want to backup our floppy drives, or CD drives, USB keys or indeed the backup drive itself, so we will remove those drive letters from our list:

AllDrive.bat

For %%a in (c d g p) do ProcessDrive %%a

Above is my stripped-down batch file; yours will be different from mine.

On my laptop computer, the 100GB hard drive is partitioned into a 15GB drive C: and an 85GB drive D:, so both those partitions must be backed up.

My corporate (“Greaves”) and personal(“Pers”) files are encrypted and they will be mounted as G: and P: respectively, so I want those backe dup.

I use a RamDrive assigned to drive Z:, I don’t want that backed up.

My drives F: and H: are encrtpted backup drives (I operate on the principle that if backing up to one external drive is fun, backing up to two external drives will be twice as much fun) and they are mounted as X: and Y: respectively.

All my other drive letters are the result of DOS SUBST commands, mapping subsidiary folders of G:\, and since those folders will be backed up from G:, there’s no need to re-process them.

RoboCopy New And Later Files


Loading

Toronto and Mississauga, Friday, December 03, 2010 8:30 AM

Copyright © 1996-2010 Chris Greaves. All Rights Reserved.