[DX4WIN] Backup Of Logbook to Floppy
Larry Alkoff
[email protected]
Fri, 12 Dec 2003 22:35:04 -0600
I backup my log _files_ frequently to several hard disks on my home network
using a simple dos batch file. It's just a matter of typing "backn2la".
We have a shack computer, my office computers (Windows 98 and Linux) and wife's office computer.
They all have to fail before I lose the data.
I say _files_ because it is necessary to backup n2la.dxl, dx4win.tcp and dx4win.cty.
They all are zipped into n2la.zip in the save directory of DX4Win on the shack computer with zip -u.
Then the zip files are saved to several networked computers (including the shack computer) in /data/ham.dat
as n2laDOY?.zip where DOY is the Day Of the Year and ? is a single letter from a to n.
The backup file names for any given DOY start with a and continue to n such that, if n2la309a.zip exists then
the next is named n2la309b.zip etc.
The batch file runs under 4DOS, a command.com replacement which has the DOY function
but it should be easy to do something under command.com. Of course, if you do much batch work
I strongly suggest 4DOS which has many extensions to make like under dos better.
Use 4NT for the CLI of Windows NT - actually it runs in 32 bits under _any_ Windows 95+ OS.
At present 1.4 megabytes of data take under 400k of disk space - it's cheap you know.
The next thing I'm going to do is make it run once daily automatically but I don't know how to do this under Windows 98 yet.
There is no cron.daily you know ;-)
Since attachments are not permitted on this list,
I have included the batch file for your inspection:
=============== batch file backn2la.bat =======================================
@echo off
rem Copy n2la log data from n2la computer to wanda
pushd c:\pf\ham\dx4win\save
echo Updating n2la.zip file:
zip -u n2la n2la.dxl dx4win.cty dx4win.tcp
copy /u \\n2la\c\pf\ham\dx4win\save\n2la.dxl \\wanda\c\pf\ham\dx4win\save\
copy /u \\n2la\c\pf\ham\dx4win\save\dx4win.cty \\wanda\c\pf\ham\dx4win\save\
copy /u \\n2la\c\pf\ham\dx4win\save\dx4win.tcp \\wanda\c\pf\ham\dx4win\save\
rem Change to dx4win\save\backup
if not isdir \pf\ham\dx4win\save\backup md backup
cd backup
set numb=a
if exist n2la%_doy%a.zip set numb=b
if exist n2la%_doy%b.zip set numb=c
if exist n2la%_doy%c.zip set numb=d
if exist n2la%_doy%d.zip set numb=e
if exist n2la%_doy%e.zip set numb=e
if exist n2la%_doy%f.zip set numb=g
if exist n2la%_doy%g.zip set numb=h
if exist n2la%_doy%h.zip set numb=i
if exist n2la%_doy%i.zip set numb=j
if exist n2la%_doy%j.zip set numb=k
rem skip number l
if exist n2la%_doy%k.zip set numb=m
if exist n2la%_doy%m.zip set numb=n
echo Updating log data to n2la and wanda:
copy /u ..\n2la.zip \\wanda\c\inv\ham.dat\dxlog\n2la%_doy%%numb.zip
copy /u ..\n2la.zip \\wanda\d\inv\ham.dat\dxlog\n2la%_doy%%numb.zip
copy /u ..\n2la.zip \\doug\c\inv\ham.dat\dxlog\n2la%_doy%%numb.zip
copy /u ..\n2la.zip c:\inv\ham.dat\dxlog\n2la%_doy%%numb.zip
:end
popd
============= end batch file =============================
Larry Alkoff N2LA - Austin TX