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:29 AM

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

The Backup.BAT file

TITLE %0 effect a backup of a local system
::
:: Set the fixed parameters
::
Set Home=C:\SAFE\
Set Backup=X Y
Set Drives=C D G P
Set WaitTime=10
Set Server=LAP
:: set Pause=Pause
set Pause=
Set Computers=BBB
::
:: Mount the external drives
::
if "%Computername%"=="%Server%" call %Home%Mount.BAT
%pause%
::
:: Wait until each backup drive is mounted
::
For %%H in (%Backup%) do  Call Waitmap %Waittime%  %%H \\%Server%\%%H
%pause%
::
:: Process each valid drive to each backup drive
::
For %%H in (%Backup%) do for %%D in (%Drives%) do call %Home%ProcessDrive %%D %%H
:: Tell the server that this computer has finished with each backup drive.
For %%H in (%Backup%) do @echo %ComputerName% %Date% %Time% >> %%H:\Backup.LOG
%pause%
::
:: Wait until all other processes are complete
::
if "%Computername%"=="%Server%" for %%C in (%Computers%) do For %%H in (%Backup%) do call %Home%Test1F1C.BAT 10 %%C %%H:\Backup.LOG
%pause%
::
:: Dismount the external drives
::
if "%Computername%"=="%Server%" call %Home%Dismount.BAT
%pause%
::
:: Shutdown the Computer system
::
%pause%
call %Home%ShutDown.BAT
::
REM END

This batch file requires customization.

Set Home=C:\SAFE\

Change this to reflect the folder in which you will store these batch files and the Wait.com.

I recommend you use a consistent drive and folder name for each of your computers, networked or not.

Set Backup=X Y

Change this to reflect the letter(s) that will be used as backup drives.

There are plenty of drive letters. I have used “X” as the share letter and I have used “X:” as the drive letter for the first of my USB external drives, and “Y” and “Y:” for the second external drive.

Set Drives=C D G P

On my Laptop computer I have two partitions (C: and D:) to be backed up, and the D: drive has two encrypted files which are made available to me as G: and P:.

So on my Laptop installation I tell the Backup.bat file that I have four drives to be backed up – C, D, G and P.

Set WaitTime=10

I use ten seconds during debugging, so that I don’t have to sit at the monitor waiting for a change to take effect.

I recommend that you set this value to be 120 seconds or thereabouts.

Set Server=LAP

Change this to the shared name of your server, or controlling machine.

:: set Pause=Pause

This line is commented out, but if you remove the double-colons, it will become active.

Backup.bat will then pause after each step, and wait for you to tap the Enter key.

It’s a crude way of single-stepping through a batch file.

You want the batch file to run unattended, so you will leave the following line in place:

set Pause=

Set Computers=BBB

Change this to be the list of computers other than your server.

If I had the IBM server up and running, I’d have my LAPtop as the server and I’d have two satellite computers “BBB” and “IBM”, then this line would read:

Set Computers=BBB IBM

The Mount.BAT file


Loading

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

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