Debian Codegraph @

examples/dump_on_cd_2/EN/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 # FILESYSTEM defines the filesystem to back up
6 COMPRESSION_LEVEL=2
7 RECORD_BIN="/usr/bin/dvdrecord dev=0,0,0 fs=64M speed=2 scip-shell filesystem . . `/usr/bin/dvdrecord dev=0,0,0 fs=64M speed=2 `."
8 EXITSCRIPT="/root/bin/dvd_dump_userexitscip-shell filesystem . . `/root/bin/dvd_dump_userexit`."
9 FILESYSTEM="/homescip-shell filesystem . . `/home`."
10 LEVEL=0
11 LABEL="`datescip-shell system . . date. -I`"
12 CD_CAPACITY=700
13 TSIZE="$(echoscip-shell system . . echo. "$CD_CAPACITY*1024*1024" | bc -l )"
14 BSIZE="$(echoscip-shell system . . echo. "$CD_CAPACITY*1024" | bc -l )"
15 FIFO="/tmp/dump.fifoscip-shell filesystem . . `/tmp/dump.fifo`."
16 DUMP_BIN="/usr/sbin/dump -z$COMPRESSION_LEVEL -b64 -B$BSIZE -F $EXITSCRIPT -$LEVEL -L $LABEL -f $FIFO $FILESYSTEM"
17
18 rmscip-shell system . . rm. -f $FIFO
19 mkfifoscip-shell system . . mkfifo. $FIFO
20 ANSWER=""
21 while [scip-shell system . . `[`. "$ANSWER" != "y" ] ; do
22 read -p "Did you insert CD No. 1? (y/n)" ANSWER
23 if [scip-shell system . . `[`. "$ANSWER" == "y" ] ; then
24 $RECORD_BIN -blank=fast
25 $RECORD_BIN -eject -pad -tsize=$TSIZE -data $FIFO &
26 $DUMP_BIN
27 rmscip-shell system . . rm. -f $FIFO
28 exit 0
29 elif [scip-shell system . . `[`. "$ANSWER" == "n" ] ; then
30 EXIT=""
31 read -p "Do you really want to exit? (y/n)" EXIT
32 if [scip-shell system . . `[`. "$EXIT" == "y" ] ; then
33 exit 1
34 fi
35 fi
36 done