Debian Codegraph @

examples/dump_on_cd_2/DE/backup_CD

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # This script dumps the specified Filesystem via dump on a CD/DVD
3 # CD_CAPACITY defines the capacity in MB per CD
4 # The script for the next volume is passed via the -F option of dump
5 # !!! do NOT forget to change CD_CAPACITY in $EXITSCRIPT !!!
6 COMPRESSION_LEVEL=2
7 RECORD_BIN="/usr/bin/cdrecord dev=0,0,0 speed=10 fs=64M -v -dao -eject -pad scip-shell filesystem . . `/usr/bin/cdrecord dev=0,0,0 speed=10 fs=64M -v -dao -eject -pad `."
8 EXITSCRIPT="/root/bin/cd_dump_userexitscip-shell filesystem . . `/root/bin/cd_dump_userexit`."
9 FILESYSTEM="/homescip-shell filesystem . . `/home`."
10 LEVEL=0
11 LABEL="`datescip-shell system . . date. -I`"
12 # !!! do NOT forget to change CD_CAPACITY in $EXITSCRIPT !!!
13 # CD_CAPACITY=650
14 CD_CAPACITY=700
15 TSIZE="$(echoscip-shell system . . echo. "$CD_CAPACITY*1024*1024" | bc -l )"
16 BSIZE="$(echoscip-shell system . . echo. "$CD_CAPACITY*1024" | bc -l )"
17 FIFO="/tmp/dump.fifoscip-shell filesystem . . `/tmp/dump.fifo`."
18 DUMP_BIN="/usr/sbin/dump -z$COMPRESSION_LEVEL -b64 -B$BSIZE -F $EXITSCRIPT -$LEVEL -L $LABEL -f $FIFO $FILESYSTEM"
19
20 rmscip-shell system . . rm. -f $FIFO
21 mkfifoscip-shell system . . mkfifo. $FIFO
22 ANSWER=""
23 while [scip-shell system . . `[`. "$ANSWER" != "j" ] ; do
24 read -p "Ist die CD No. 1 eingelegt? (j/n)" ANSWER
25 if [scip-shell system . . `[`. "$ANSWER" == "j" ] ; then
26 $RECORD_BIN -tsize=$TSIZE -data $FIFO &
27 $DUMP_BIN
28 rmscip-shell system . . rm. -f $FIFO
29 exit 0
30 else
31 EXIT=""
32 read -p "Wollen Sie abbrechen? (j/n)" EXIT
33 if [scip-shell system . . `[`. "$EXIT" == "j" ] ; then
34 exit 1
35 fi
36 fi
37 done