#!/bin/sh # # Run a simple backup of the Bacula build directory using the compressed option # then restore a few selected files. # TestName="restore2-by-file-test" JobName=restore2byfile . scripts/functions set_debug 0 copy_test_confs echo "${cwd}/build" >/tmp/file-list sed s%\^%${cwd}% ${cwd}/scripts/flist >${cwd}/tmp/restore2-list change_jobname CompressedTest $JobName start_test cat <tmp/bconcmds @output /dev/null messages @$out tmp/log1.out label storage=File volume=TestVolume001 run job=$JobName yes wait messages @# @# now do a restore @# @$out tmp/log2.out restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore2-list yes wait messages @output quit END_OF_DATA run_bacula check_for_zombie_jobs storage=File stop_bacula check_two_logs dstat=0 for i in `cat ${cwd}/tmp/restore2-list`; do diff $i ${cwd}/tmp/bacula-restores$i if [ $? != 0 ] ; then dstat=1 fi done end_test