cpio's across multiple volumes
Edberg
elel at ihlpa.ATT.COM
Wed Nov 2 07:29:43 AEST 1988
In our SV environment we solved the multiple volume incremental cpio problem
by first identifying the files to save using 'ff' for every fs. After that
we use this algorithm to determine (in normalized 512 byte blocks) how many
blocks each file system would require.
Our backup schedular then determines which tape volume each fs will be written
to dependent on the maximum capacity of the backup media available for today.
In practice, you have multiple tapes (or disks) with multiple file systems
(files) on each one. We assume if a fs exceeds a single backup media it
is more efficient to do a full volcopy rather than a incremental cpio in the
first place.
There are many problems associated with this scheme that I will not address
here other than to say a programmer using standard unix tools can avoid all of
the problems that have been talked about recently with cpio. The only SV cpio
problem that I have not solved is that directories are sometimes recreated
with the wrong owner/group during a restore attempt.
This algorithm is also used on the systems where on-line disk incrementals are
occuring to forcast the space required.
To some theorists, this algorithm is not exact and should encorporate BSIZE
or FsBSIZE and INOPB and other nasty variables which unecessarily
complicate matters. This short algorithm gives an approximation that ALWAYS
exceeds the needed space by 3-8% so it is acceptable (helps during real-time
backup attempts when files sometimes grow during that little ??window??).
Eric L. Edberg
att!ihlpa!elel
(312)979-4382
###########################################################
$1 = file name
$2 = character count of the files
###########################################################
Changed=
if [ -s $LOG/$fs_num.files ]
then
Changed="`awk '
{remainder=$2%512}
{base=$2/512}
{if(remainder>0){total=total+1} }
{total=total+base}
END {printf("%d",total)}' $LOG/$fs_num.files`"
else
Changed=0
fi
[ -z "$Changed" ] && echo "\nERROR: daemon: AWK failed, FSNUM=($Num), notify UCSA and DELTASAVE support\n"
[ -z "$Changed" -o "$Changed" -lt 0 ] && Changed=0
#######################################################
More information about the Comp.unix.questions
mailing list