Laatst verwerkt op 07-11-12 10:57:43 CET door gebruiker ulefr01
#!/bin/bash # # ---------------------------------------------------------------------------------------------- # #/media/EHD4P1/tools/script.sh -r t2 echo "Restore linux franz6" echo "--------------------" date DATE="$(date +%Y%m%d)" #stty cols 180 rows 56 # cd /media/EHD4P1/franz6 #rm outputs pwd # # # (/media/EHD4P1/tools/franz6-r2 2>&1) | tee terminal_r-end.out # cat terminal_r-end.out >franz6-restore-${DATE}.out # echo "-----------------" exit #
#!/bin/bash # # ---------------------------------------------------------------------------------------------- # #/media/EHD4P1/tools/script.sh -r t2 echo "Restore linux franz6-r2" echo "-----------------------" # cd /media/EHD4P1/franz6 #rm outputs pwd # date # /media/EHD4P1/tools/archive /dev/mapper/linux-linux_boot backupboot-20121102-17h46.fsa restfs date # /media/EHD4P1/tools/archive /dev/mapper/linux-linux_home backuphome-20111118-19h12.fsa restfs /media/EHD4P1/tools/archive /dev/mapper/linux-linux_root backuproot-20121102-17h47.fsa restfs # date # # echo "-----------------" exit #
# archive ARGS=3 E_BADARGS=65 if [ $# -ne "$ARGS" ] then echo "Usage: `basename $0` device file mode" echo "mode = savefs/restfs" exit $E_BADARGS fi device=$1 file=$2 mode=$3 #exit 0 # fsarchiver #if [ [$mode !== 'restfs' ] || [ $mode !== 'savefs' ] if [ $mode == 'restfs' ] || [ $mode == 'savefs' ] then echo 'ok' else echo 'stops mode is not restfs or savefs' exit 1 fi echo "mode= $mode" echo "device= $device" if [ $mode == 'restfs' ] then number=0 fi if [ $mode == 'savefs' ] then number=2000 echo "number = $number" fi statement1='fsarchiver' if [ $mode == 'savefs' ] then if [ $number != 0 ] then statement2="-s $number" else statement2='' fi fi if [ $mode == 'savefs' ] then statement3='-o' else statement3='' fi statement4=$file statement5=$device if [ $mode == 'savefs' ] then statement="$statement1 $statement2 $statement3 $mode $statement4 $statement5" else statement="$statement1 $mode $statement4 id=0,dest=$statement5" fi echo "statement = $statement" $statement echo 'gedaan !' fsarchiver archinfo $file exit 0
Restore linux franz6-r2
-----------------------
/media/EHD4P1/franz6
Wed Nov 7 22:29:01 UTC 2012
ok
mode= restfs
device= /dev/mapper/linux-linux_boot
statement = fsarchiver restfs backupboot-20121102-17h46.fsa id=0,dest=/dev/mapper/linux-linux_boot
Statistics for filesystem 0
* files successfully processed:....regfiles=1001, directories=40, symlinks=1, hardlinks=0, specials=0
* files with errors:...............regfiles=0, directories=0, symlinks=0, hardlinks=0, specials=0
gedaan !
====================== archive information ======================
Archive type: filesystems
Filesystems count: 1
Archive id: 509d1d77
Archive file format: FsArCh_002
Archive created with: 0.6.15
Archive creation date: 2012-11-02_16-46-11
Archive label: linux_boot
Minimum fsarchiver version: 0.6.4.0
Compression level: 7 (lzma level 1)
Encryption algorithm: none
===================== filesystem information ====================
Filesystem id in archive: 0
Filesystem format: ext4
Filesystem label:
Filesystem uuid: 7169cbf8-a1c8-4edd-8b28-8ce8f6cd2816
Original device: /dev/linux/mysnap
Original filesystem size: 1007.90 MB (1056858112 bytes)
Space used in filesystem: 92.68 MB (97185792 bytes)
Wed Nov 7 22:29:06 UTC 2012
ok
mode= restfs
device= /dev/mapper/linux-linux_root
statement = fsarchiver restfs backuproot-20121102-17h47.fsa id=0,dest=/dev/mapper/linux-linux_root
Statistics for filesystem 0
* files successfully processed:....regfiles=185286, directories=22800, symlinks=68679, hardlinks=38, specials=89
* files with errors:...............regfiles=0, directories=0, symlinks=0, hardlinks=0, specials=0
gedaan !
====================== archive information ======================
Archive type: filesystems
Filesystems count: 1
Archive id: 5092ce81
Archive file format: FsArCh_002
Archive created with: 0.6.15
Archive creation date: 2012-11-02_16-47-27
Archive label: linux_root
Minimum fsarchiver version: 0.6.4.0
Compression level: 7 (lzma level 1)
Encryption algorithm: none
===================== filesystem information ====================
Filesystem id in archive: 0
Filesystem format: ext4
Filesystem label:
Filesystem uuid: 104e82b7-4868-42ac-a02f-9b6a53ce87f0
Original device: /dev/linux/mysnap
Original filesystem size: 14.76 GB (15853404160 bytes)
Space used in filesystem: 7.74 GB (8315338752 bytes)
Wed Nov 7 22:33:28 UTC 2012
-----------------