frogbak
view release on metacpan or search on metacpan
dump.remote view on Meta::CPAN
set dl = 0
endif
if (! -e /etc/dumpdates) then
touch /etc/dumpdates
endif
#(echo "beginning level $dl dump of `hostname`:$file...." | wall) &
switch ("$os")
case solaris:
/usr/sbin/ufsdump bf$dl 20 - $rfilesys
breaksw
case hp-ux:
case sony:
case ultrix:
case sunos:
/etc/dump bf$dl 20 - $rfilesys
breaksw
default:
/etc/dump sdbf$dl 2000 1000000 2 - $rfilesys
breaksw
endsw
#(echo "finished `hostname`:$file dump." | wall) &
if ($?dumpdates && $?moveddds) then
rm /etc/dumpdates
if (-e /etc/dumpdates) then
bomb "COULD NOT REMOVE /etc/dumpdates"
endif
mv -f /etc/dumpdates.orig /etc/dumpdates
if (! -e /etc/dumpdates) then
bomb "COULD NOT RESTORE /etc/dumpdates"
endif
unset moveddds
endif
endif
if ($?smartdump) then
if ($dumplevel == 0) then
$dump 0f - $file
else
$dump 0fT - "$date2" $file
endif
endif
if ($?etcwbak) then
if ($dumplevel == 0) then
set dl = "-full"
else
set dl = "-af $date1"
endif
/com/wbak -stdout $dl -pdtu $file
endif
if ($?bincpio) then
# cd to $file so find can use . to create relative pathnames
cd $file
# this heads off "Bad Hertz value" message in stream from tophat
setenv HZ 60
if ($dumplevel == 0) then
/bin/find . -mount -depth -print | /bin/cpio -oc
else
set stamp = `echo $date1 | sed -e 's/[^0-9]//g'`
set stamp = `echo $stamp | sed -e 's/\(..\)\(.*\)/\2\1/'`
touch $stamp /tmp/stamp$$
set dl = "-newer /tmp/stamp$$"
/bin/find . -mount -depth $dl -print | /bin/cpio -oc
endif
endif
if ($?gtar) then
if ($compress) then
set c = "--compress --block-compress"
else
set c = ""
endif
if ($dumplevel == 0) then
$gtar $c -c -V "full: $file `date`" \
--atime-preserve -l -S --totals -G -f - $file
else
$gtar $c -c -V "incr: $file $date2 through `date`" \
--newer "$date2" \
--atime-preserve -l -S --totals -G -f - $file
endif
endif
cleanup:
if (-e /etc/dumpdates.orig && $?dumpdates && $?moveddds) then
/bin/rm -f /etc/dumpdates
mv /etc/dumpdates.orig /etc/dumpdates
endif
/bin/rm -f /tmp/dodump$$ /tmp/dodump2.$$ /tmp/stamp$$
exit 0
( run in 2.291 seconds using v1.01-cache-2.11-cpan-437f7b0c052 )