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.

Append Session Details To A Log File

We want to keep a record of when we backed up our files, and we want that record to be available across the network if we are implementing a networked solution.

The log file will serve two purposes:

If there is any question about whether a backup was run, or the date/time of the latest backup, the log file will provide the information we need.

A networked solution server can examine the log file to determine whether or not all the networked machines have been backed up.

This link ( http://vlaurie.com/computers2/Articles/environment.htm ) will tell you a bit about Windows XP Environment variables.

We would like to append the local computer name and the current date and time to a log file.

In a DOS Command window, experiment with %COMPUTERNAME%, %DATE% and %TIME%.

Visit www.ChrisGreaves.com for this image! BackE009.JPG

Quantities may vary.

My computer’s name is the unimaginative “Lap”.

We would like to place a single line of text in a specified file, the line to contain the computer name, date and time.

Visit www.ChrisGreaves.com for this image! BackE010.JPG

In the screen snapshot above you can see that I have Echoed the details in append mode to a file. The "Type" command displays the contents of the file and shows that the details have been stored.

Here is a little DOS Batch file to achieve our purpose:

TITLE %0 - Log the session details to a specified file.
REM parameter 1 should be the name of the log file e.g. "C:\Safe\LogFile.log"
@echo %ComputerName% %Date% %Time% >> %1
REM END

Shutting Down the Computer


Loading

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

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