#!/bin/sh # # Run a simple backup of the Bacula build directory using the compressed option # then restore it. # TestName="restore-by-file-test" JobName=restorebyfile . scripts/functions set_debug 0 cwd=`pwd` scripts/cleanup scripts/copy-test-confs echo "${cwd}/tmp/build" >/tmp/file-list mkdir ${cwd}/tmp/build cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build cd ${cwd}/tmp/build ls >../1 cd .. sed s%\^%${cwd}/tmp/build/% 1 >restore-list rm -f 1 cd ${cwd} 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 7 <${cwd}/tmp/restore-list yes wait messages @$out quit END_OF_DATA run_bacula check_for_zombie_jobs storage=File stop_bacula check_two_logs check_restore_tmp_build_diff end_test