TIP: Click on subject to list as thread! ANSI
echo: os2
to: Andy Roberts
from: Jack Stein
date: 1999-09-06 09:19:06
subject: Re: Backup

following up a message from Jack Pfisterer to Andy Roberts:

 AR> I have a few directories I want a backup of that also removes old
 AR> files, such as msg-bases, that may no longer be in the dir, but were in
 AR> the previous *.Zip file.  So I start by deleting specific
 AR> subdirectories from the previous *.Zip file.  Then add anything new or
 AR> changed.  This is much faster than just Zip everything from scratch,
 AR> since Zip simply skips over all files that have not changed.  What I
 AR> get is an incremental backup in a Zip file that can be UnZip'd for a
 AR> full restore of each of those dirs.

I use RAR now for my backups, but used the same approach with PKZIP and
PKZIP/2. I put the bu of each drive in it's own directory on my H: drive as
H:\CDRIVE; H:\DDRIVE and so on. Backup files are named E_DRIVE.RAR, E_INCR.RAR 
and so on.   From CRON I run a script each night around 3 AM that looks like
this:
::**********************************************************************
::********* Full backup Sat, daily incremental E: F: G: Drives *********
::**********************************************************************
iff "%_DOW" == "Sat" then
   set Abit=-ac
   set Outfile=_DRIVE
else
   set Abit=-ao
   set Outfile=_INCR
endiff

:: *******  E: Drive  *****
cdd h:\edrive
del E%Outfile.rar
RAR a %Abit -r -o+ E%Outfile @E_nclude.lst -x@E_xclude.lst

:: *******  F: Drive  *****
cdd h:\fdrive
del F%Outfile.rar
RAR a %Abit -r -o+ F%Outfile @F_nclude.lst -x@F_xclude.lst
::*****************************

The archive bit (%Abit) is changed for a full back up on Saturdays, and a
partial on weekdays.  The include and xclude.lst files contain files and
directories I want skipped or included, so I can taylor things easily to my
needs.  My boot drives I only do a full back up on the 1st of the month, so
the script has a section that looks the same, except it tests for the day of
month instead of Sat.:

::**** Daily Incremental BU of C D Drives and Full Bu on 1st of month  ****
::****                            (boot drives)                        ****
::*************************************************************************
iff "%_DAY" == "1" then
   set Abit=-ac
   set Outfile=_DRIVE
else
   set Abit=-ao
   set Outfile=_INCR
endiff
:: *******  C: Drive  *****
cdd H:\Cdrive
del C%Outfile.rar
RAR a %Abit -r -o+ C%Outfile @C_nclude.lst -x@C_xclude.lst
*** snip ****

I use 4DOS and 4OS2 though, so the %_DAY and %_DOW values are built in to my
command processor.  This works good for me, and I can see the whole backup
file with OS2 Commander, highlight whatever files I want, and copy them for a
restore in an instant, or, if I ever needed a full restore, I would simply
unrar the full, then unrar the incremental.  No muss, no fuss.  

                                               Jack 
--- timEd/2-B11
* Origin: Jack's Free Lunch 4OS2 USR 56k Pgh Pa (412)492-0822 (1:129/171)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.