clean:
scripts/cleanup
- rm -f /tmp/file-list
+ rm -f tmp/file-list
rm -fr tmp/* working/*
rm -f test.out
rm -f diff
reset:
chown -R ${USER}:${USER} . tmp working
scripts/cleanup
- rm -f /tmp/file-list tmp/file-list
rm -f tmp/* working/*
distclean: clean
# You may put your real host name here, but localhost is valid also
# and it has the advantage that it works on a non-newtworked machine
HOST="localhost"
+
+# see --with-base-port at
+# http://www.bacula.org/rel-manual/Installing_Bacula.html
+# You only need to change this if you want to run more than one instance
+# of regression testing on the same box. You'll need to set BASEPORT
+# to values that do not overlap. BASEPORT is the first of three ports
+# required by each instance, one for each of Dir, SD, and the FD.
+#
+BASEPORT=8101
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = DDS-4
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "Full Set"
Include { Options { signature=MD5 }
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "client-pw"
File Retention = 30d # 30 days
Storage {
Name = DDS-4
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "storage-pw"
Device = DDS-4 # must be same as Device in Storage daemon
Media Type = DDS-4 # must be same as MediaType in Storage daemon
Storage {
Name = DLT80
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "storage-pw"
Device = DLT80 # must be same as Device in Storage daemon
Media Type = DLT8000 # must be same as MediaType in Storage daemon
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = Dummy
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "Full Set"
Include { Options { signature=MD5 }
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
signature=MD5
verify=pins1
}
- File = </tmp/file-list
+ File = "<@tmpdir@/file-list"
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = Dummy
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = Dummy # must be same as Device in Storage daemon
Media Type = Dummy # must be same as MediaType in Storage daemon
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = File
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "Full Set"
Include { Options { signature=MD5 }
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = DiskChanger
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = DiskChanger # must be same as Device in Storage daemon
Media Type = DiskChangerMedia # must be same as MediaType in Storage daemon
Storage {
Name = File
Address = @hostname@
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = FileStorage
Media Type = File
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = DDS-4
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "Full Set"
Include { Options { signature=MD5 }
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
signature=MD5
verify=pins1
}
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = DDS-4
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = DDS-4 # must be same as Device in Storage daemon
Media Type = DDS-4 # must be same as MediaType in Storage daemon
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = FileStorage # must be same as Device in Storage daemon
Media Type = FileMedia # must be same as MediaType in Storage daemon
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = DDS-4
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
Storage {
Name = DDS-4
Address = 192.168.68.112 # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = DDS-4 # must be same as Device in Storage daemon
Media Type = DDS-4 # must be same as MediaType in Storage daemon
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
FileSet {
Name = FS_TEST
Include {
- File=</tmp/file-list
+ File=<@tmpdir@/file-list
}
}
FileSet {
Name = FS_REMOTE_INC_ERR
Include {
- File="\</tmp/path/to/nowhere"
+ File="\<@tmpdir@/path/to/nowhere"
}
}
FileSet {
Name = FS_LOCAL_INC_ERR
- Include { File=</tmp/path/to/nowhere }
+ Include { File=<@tmpdir@/path/to/nowhere }
}
FileSet {
Name = FS_LOCAL_EXCL_ERR
- Include { File=</tmp/file-list }
+ Include { File=<@tmpdir@/file-list }
Exclude {
- File=</tmp/path/to/nowhere
+ File=<@tmpdir@/path/to/nowhere
}
}
FileSet {
Name = FS_REMOTE_EXCL_ERR
- Include { File=</tmp/file-list }
+ Include { File=<@tmpdir@/file-list }
Exclude {
- File="\</tmp/path/to/nowhere"
+ File="\<@tmpdir@/path/to/nowhere"
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
FileSet {
Name = FS_TESTJOB
Include {
- File=</tmp/file-list
+ File=<@tmpdir@/file-list
}
}
read fifo = yes
}
# wait 60s per fifo
- File=/tmp/fifo
- File=/tmp/fifo2
- File=/tmp/fifo3
+ File=@tmpdir@/fifo
+ File=@tmpdir@/fifo2
+ File=@tmpdir@/fifo3
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
FileSet {
Name = FS_TESTJOB
Include {
- File=</tmp/file-list
+ File=<@tmpdir@/file-list
}
}
Job {
Name = JobB
JobDefs = DefaultRestore
- add prefix = /tmp/bacula-restore
+ add prefix = @tmpdir@/bacula-restore
add suffix = .old
strip prefix = /build
}
Job {
Name = JobC
JobDefs = DefaultRestore
- Where = /tmp/bacula-restore
+ Where = @tmpdir@/bacula-restore
}
Job {
Job {
Name = JobG
JobDefs = DefaultRestore
- Where = /tmp/bacula-restore
+ Where = @tmpdir@/bacula-restore
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
FileSet {
Name = FS_TESTJOB
Include {
- File=</tmp/file-list
+ File=<@tmpdir@/file-list
}
}
Name = FS_FIFO
Include {
Options { readfifo = yes }
- File=</tmp/file-list
+ File=<@tmpdir@/file-list
}
}
FileSet = FS_FIFO
RunScript {
- Command = "/bin/echo touching /tmp/RUN_BUG_897"
+ Command = "/bin/echo touching @tmpdir@/RUN_BUG_897"
RunsWhen = after
RunsOnFailure = yes
}
RunScript {
- Command = "/bin/touch /tmp/RUN_BUG_897"
+ Command = "/bin/touch @tmpdir@/RUN_BUG_897"
RunsWhen = after
RunsOnFailure = yes
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
#
FileDaemon { # this is me
Name = @hostname@-fd
- FDport = 8102 # where we listen for the director
+ FDPort = @fdport@ # where we listen for the director
WorkingDirectory = @working_dir@
Pid Directory = @piddir@
Maximum Concurrent Jobs = 20
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Storage { # definition of myself
Name = rufus-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "/home/kern/bacula/regress/working"
Pid Directory = "/home/kern/bacula/regress/working"
}
Director {
Name = @hostname@-dir
- DIRport = 8101
+ DIRPort = @dirport@
address = @hostname@
Password = "dir-pw"
}
#
# Cleanup left over files -- both before and after test run
#
-rm -rf /tmp/FileVolume* tmp/FileVolume*
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores /tmp/Small*
-rm -rf /tmp/sed_tmp /tmp/file-list
+cwd=`pwd`
+rm -rf ${cwd}/tmp/FileVolume*
+rm -rf ${cwd}/tmp/TestVolume001 ${cwd}/tmp/bacula-restores ${cwd}/tmp/Small*
+rm -rf ${cwd}/tmp/sed_tmp ${cwd}/tmp/file-list
rm -rf tmp/*
rm -rf working/log tmp/TEST-*
rm -rf working/*.bsr
-rm -rf /tmp/disk-changer
+rm -rf ${cwd}/tmp/disk-changer
find . -name "gigaslam.gif" -exec rm -f {} \;
#
FileDaemon { # this is me
Name = @hostname@-fd
- FDport = 8102 # where we listen for the director
+ FDPort = @fdport@ # where we listen for the director
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
SubSys Directory = "@subsysdir@"
cwd=`pwd`
. ${cwd}/config
mkdir -p ${cwd}/bin
-out="/tmp/sed_tmp"
+out="${cwd}/tmp/sed_tmp"
+
+# set the ports used by these tests
+dirport=${BASEPORT}
+fdport=`expr ${BASEPORT} '+' 1`
+sdport=`expr ${BASEPORT} '+' 2`
+
# Create sed command script
echo "s%@sbindir@%${cwd}/bin%g" >${out}
echo "s%@scriptdir@%${cwd}/bin%g" >>${out}
echo "s%@hostname1_password@%${hostname1_password}%g" >>${out}
echo "s%@hostname2_password@%${hostname2_password}%g" >>${out}
echo "s%@hostname3_password@%${hostname3_password}%g" >>${out}
+echo "s%@dirport@%${dirport}%g" >>${out}
+echo "s%@sdport@%${sdport}%g" >>${out}
+echo "s%@fdport@%${fdport}%g" >>${out}
# process .in files with sed script
sed -f ${out} ${cwd}/scripts/bacula-dir.conf.errors.in >${cwd}/scripts/bacula-dir.conf.errors
sed -f ${out} ${cwd}/scripts/bconsole-2d.conf.in >${cwd}/scripts/bconsole-2d.conf
-cp ${cwd}/bin/bacula-sd.conf /tmp/bac$$
-sed s%/tmp%${cwd}/tmp%g /tmp/bac$$ >${cwd}/bin/bacula-sd.conf
+cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/bac$$
+sed s%/tmp%${cwd}/tmp%g ${cwd}/tmp/bac$$ >${cwd}/bin/bacula-sd.conf
chmod 777 ${cwd}/scripts/cleanup-*tape ${cwd}/scripts/cleanup-*drive ${cwd}/scripts/prepare-two-tapes
-rm -f /tmp/bac$$
-cp ${cwd}/bin/mtx-changer /tmp/bac$$
-sed "s%^MTX.*$%MTX=${AUTOCHANGER_PATH}%g" /tmp/bac$$ >${cwd}/bin/mtx-changer
+rm -f ${cwd}/tmp/bac$$
+cp ${cwd}/bin/mtx-changer ${cwd}/tmp/bac$$
+sed "s%^MTX.*$%MTX=${AUTOCHANGER_PATH}%g" ${cwd}/tmp/bac$$ >${cwd}/bin/mtx-changer
chmod 777 ${cwd}/bin/mtx-changer
# get proper SD tape definitions
fi
rm -f ${out}
-rm -f /tmp/bac$$
+rm -f ${cwd}/tmp/bac$$
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = File
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "SparseSet"
Include { Options { signature=MD5; sparse=yes }
- File=</tmp/file-list
+ File=<@tmpdir@/file-list
}
}
Name = "CompressedSet"
Include {
Options { signature=MD5; compression=GZIP }
- File =</tmp/file-list
+ File =<@tmpdir@/file-list
}
}
Options {
signature=MD5; compression=GZIP
}
- File= </tmp/file-list
+ File= <@tmpdir@/file-list
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
Storage {
Name = File1
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage1
Media Type = File1
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = File
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "Full Set"
Include { Options { signature=MD5 }
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
signature=MD5
sparse=yes
}
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
signature=MD5
compression=GZIP
}
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
readfifo = yes
signature=MD5
}
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
compression=GZIP
sparse=yes
}
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
Storage {
Name = File1
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage1
Media Type = File1
#Storage {
# Name = DLTDrive
# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
+# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = "HP DLT 80" # must be same as Device in Storage daemon
# Media Type = DLT8000 # must be same as MediaType in Storage daemon
#Storage {
# Name = SDT-10000
# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
+# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = SDT-10000 # must be same as Device in Storage daemon
# Media Type = DDS-4 # must be same as MediaType in Storage daemon
#Storage {
# Name = "8mmDrive"
# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
+# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
# Device = "Exabyte 8mm"
# MediaType = "8mm"
CFLAGS="-g -O2 -Wall" \
./configure \
--sbindir=${1}/bin \
+ --archivedir=${1}/tmp \
--sysconfdir=${1}/bin \
--mandir=${1}/bin \
--with-pid-dir=${1}/working \
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = File
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "Full Set"
Include { Options { signature=MD5 }
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
FileSet {
Name = "SparseSet"
Include { Options { signature=MD5; sparse=yes }
- File=</tmp/file-list
+ File=<@tmpdir@/file-list
}
}
Name = "CompressedSet"
Include {
Options { signature=MD5; compression=GZIP }
- File =</tmp/file-list
+ File =<@tmpdir@/file-list
}
}
Options {
signature=MD5; compression=GZIP
}
- File= </tmp/file-list
+ File= <@tmpdir@/file-list
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
Storage {
Name = File1
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage1
Media Type = File1
#Storage {
# Name = DLTDrive
# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
+# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = "HP DLT 80" # must be same as Device in Storage daemon
# Media Type = DLT8000 # must be same as MediaType in Storage daemon
#Storage {
# Name = SDT-10000
# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
+# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = SDT-10000 # must be same as Device in Storage daemon
# Media Type = DDS-4 # must be same as MediaType in Storage daemon
#Storage {
# Name = "8mmDrive"
# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
+# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
# Device = "Exabyte 8mm"
# MediaType = "8mm"
#
FileDaemon { # this is me
Name = @hostname@-fd
- FDport = 8102 # where we listen for the director
+ FDPort = @fdport@ # where we listen for the director
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
SubSys Directory = "@subsysdir@"
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Director {
Name = @hostname@-dir
- DIRport = 8101
+ DIRPort = @dirport@
address = @hostname@
Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3"
}
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
Storage = File
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "Full Set"
Include { Options { signature=SHA1 }
- File =</tmp/file-list
+ File =<@tmpdir@/file-list
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
Storage {
Name = File1
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage1
Media Type = File1
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
Storage = File
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "Full Set"
Include { Options { signature=SHA1 }
- File =</tmp/file-list
+ File =<@tmpdir@/file-list
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
Storage {
Name = File1
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage1
Media Type = File1
Director { # define myself
Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = File
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
FileSet {
Name = "Full Set"
Include { Options { signature=MD5 }
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
signature=MD5
sparse=yes
}
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
signature=MD5
compression=GZIP
}
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
readfifo = yes
signature=MD5
}
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
compression=GZIP
sparse=yes
}
- File = </tmp/file-list
+ File = <@tmpdir@/file-list
}
}
Client {
Name = @hostname@-fd
Address = @hostname@
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Storage {
Name = File
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Media Type = File
Storage {
Name = File1
Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage1
Media Type = File1
#Storage {
# Name = DLTDrive
# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
+# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = "HP DLT 80" # must be same as Device in Storage daemon
# Media Type = DLT8000 # must be same as MediaType in Storage daemon
#Storage {
# Name = SDT-10000
# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
+# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = SDT-10000 # must be same as Device in Storage daemon
# Media Type = DDS-4 # must be same as MediaType in Storage daemon
#Storage {
# Name = "8mmDrive"
# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
+# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
# Device = "Exabyte 8mm"
# MediaType = "8mm"
#
FileDaemon { # this is me
Name = @hostname@-fd
- FDport = 8102 # where we listen for the director
+ FDPort = @fdport@ # where we listen for the director
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
SubSys Directory = "@subsysdir@"
Storage { # definition of myself
Name = @hostname@-sd
- SDPort = 8103 # Director's port
+ SDPort = @sdport@ # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
Subsys Directory = "@subsysdir@"
Director { # define myself
Name = localhost-dir
- DIRport = 8101 # where we listen for UA connections
+ DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
#
# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
+# By default, this job will back up to disk in @tmpdir@
Job {
Name = "NightlySave"
Type = Backup
Storage = DDS-4
Messages = Standard
Pool = Default
- Where = /tmp/bacula-restores
+ Where = @tmpdir@/bacula-restores
}
Client {
Name = localhost-fd
Address = localhost
- FDPort = 8102
+ FDPort = @fdport@
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc"
File Retention = 30d # 30 days
Storage {
Name = DDS-4
Address = 192.168.68.112 # N.B. Use a fully qualified name here
- SDPort = 8103
+ SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = DDS-4 # must be same as Device in Storage daemon
Media Type = DDS-4 # must be same as MediaType in Storage daemon
scripts/copy-2disk-drive-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
# sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
setdebug level=51 storage=DDS-4
label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Full drive=1
# exit
run_bacula
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
wait
scripts/cleanup
scripts/copy-2disk-drive-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label pool=Default storage=DDS-4 volume=TestVolume001 slot=1 drive=0
label pool=Default storage=DDS-4 volume=TestVolume002 slot=2 drive=1
update Volume=TestVolume001 MaxVolBytes=100000000
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
unmark *
mark *
change_jobname localhost-fd $JobName
start_test
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
if test ! -d ${cwd}/tmp/build ; then
mkdir ${cwd}/tmp/build
fi
cd ${cwd}
# Turn off Prefer Mounted Volumes so we use 2 drives
-outf="tmp/sed_tmp"
+outf="${cwd}/tmp/sed_tmp"
echo "s%# Prefer Mounted Volumes% Prefer Mounted Volumes%g" >${outf}
cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
# Comment the next line out to write everything to one drive
sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
setdebug level=3 dir
setdebug level=3 storage=DDS-4
setdebug level=3 client
echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
update volume=TestVolume001 VolStatus=Used
status storage=DDS-4
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores
7
<${cwd}/tmp/restore-list
check_two_logs
# The restore should read from TestVolume002, which was on drive 1
-grep TestVolume002 tmp/log2.out >/dev/null 2>&1
+grep TestVolume002 ${cwd}/tmp/log2.out >/dev/null 2>&1
# Note rstat may already be set, so we don't just store into it
if [ $? != 0 ] ; then
rstat=$?
#
# Delete .c files because we will only restored the txt files
#
-rm -f tmp/build/*.c
+rm -f ${cwd}/tmp/build/*.c
check_restore_tmp_build_diff
end_test
change_jobname localhost-fd $JobName
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
if test ! -d ${cwd}/tmp/build ; then
mkdir ${cwd}/tmp/build
fi
cd ${cwd}
# Turn off Prefer Mounted Volumes so we use 2 drives
-outf="tmp/sed_tmp"
+outf="${cwd}/tmp/sed_tmp"
echo "s%# Prefer Mounted Volumes% Prefer Mounted Volumes%g" >${outf}
cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
# Comment the next line out to write everything to one drive
start_test
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=1
@#setdebug level=100 storage=DDS-4
echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
update volume=TestVolume001 VolStatus=Used
status storage=DDS-4
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores
7
<${cwd}/tmp/restore-list
#
# Delete .c files because we will only restored the txt files
#
-rm -f tmp/build/*.c
+rm -f ${cwd}/tmp/build/*.c
check_restore_tmp_build_diff
end_test
/bin/cp -f scripts/ansi-sd-tape.conf bin/bacula-sd.conf
scripts/cleanup-tape
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=200 storage=DDS-4
label storage=DDS-4 volume=Vol001 slot=0 pool=Default
purge volume=Vol001
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
wait
touch ${cwd}/build/src/dird/*.c
echo "test test" > ${cwd}/build/src/dird/xxx
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
list volumes
@#setdebug level=300 storage=DDS-4
run job=$JobName yes
@#
@# now do a second restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
list volumes
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
copy_test_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
sed "s%# Label Format% Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_SCRIPT >tmp/bconcmds
+cat <<END_OF_SCRIPT >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
status all
status all
list pools
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File
unmark *
mark *
scripts/copy-tape-confs
scripts/cleanup-tape
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=200 storage=DDS-4
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
purge volume=TestVolume001
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
wait
touch ${cwd}/build/src/dird/*.c
echo "test test" > ${cwd}/build/src/dird/xxx
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
list volumes
run job=$JobName yes
wait
@#
@# now do a second restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
list volumes
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
change_jobname Client1 $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label volume=TestVolume001 storage=File pool=Default
@#setdebug level=100 storage=File
run job=$JobName yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
check_for_zombie_jobs storage=File
stop_bacula
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=100 storage=File
run job=$JobName yes
wait
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
scripts/cleanup
scripts/copy-fifo-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
-rm -f tmp/log1.out tmp/log2.out
+rm -f ${cwd}/tmp/log1.out ${cwd}/tmp/log2.out
start_test
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=200 storage=Dummy
label storage=Dummy volume=TestVolume001 slot=0 pool=Default
run job=$JobName yes
touch ${cwd}/build/src/dird/*.c
echo "test test" > ${cwd}/build/src/dird/xxx
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
list volumes
run job=$JobName yes
wait
check_for_zombie_jobs storage=Dummy
stop_bacula
-grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+grep "^ Termination: *Backup OK" ${cwd}/tmp/log1.out 2>&1 >/dev/null
bstat=$?
-grep "^ Termination: *Backup OK" tmp/log2.out 2>&1 >/dev/null
+grep "^ Termination: *Backup OK" ${cwd}/tmp/log2.out 2>&1 >/dev/null
dstat=$?
# not yet implemented
scripts/cleanup-tape
scripts/copy-win32-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=NightlySave yes
@sleep 10
@#
@# now do a restore
@#
-@$outt tmp/log2.out
+@$outt ${cwd}/tmp/log2.out
@#restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
@#yes
@#wait
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File1 volume=TestVolume001
label storage=File1 volume=TestVolume002
update Volume=TestVolume001 MaxVolBytes=3000000
@#
@# now build the bsr file but do not restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore bootstrap=${cwd}/working/restore.bsr where=${cwd}/tmp/bacula-restores select all storage=File1 done
no
wait
bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
fi
rstat=$?
-grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+grep "^ Termination: *Backup OK" ${cwd}/tmp/log1.out 2>&1 >/dev/null
bstat=$?
check_restore_diff
end_test
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+cwd=`pwd`
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=100 storage=File
label storage=File volume=TestVolume001
run job=$JobName yes
fi
cd ${cwd}
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
sql
UPDATE Media SET Volbytes=${size} WHERE VolumeName='TestVolume001';
sql
SELECT * FROM JobMedia;
-@output tmp/log2.out
+@output ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores storage=File select all done
yes
wait
copy_tape_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
# sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
copy_tape_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >tmp/file-list
-cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
-sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
+cp ${cwd}/bin/bacula-sd.conf tmp/1
+sed "s%# Maximum File Size% Maximum File Size%" tmp/1 >${cwd}/bin/bacula-sd.conf
change_jobname NightlySave $JobName
start_test
@#
@# now do a restore
@#
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=tmp/bacula-restores select all storage=DDS-4 done
yes
wait
messages
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >tmp/file-list
change_jobname NightlySave $JobName
start_test
@# now do a restore
@#
@#setdebug level=400 storage=File1
-restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores select all storage=File1 done
+restore bootstrap=tmp/kern.bsr where=tmp/bacula-restores select all storage=File1 done
yes
wait
messages
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File1 volume=TestVolume001
label storage=File1 volume=TestVolume002
update Volume=TestVolume001 MaxVolBytes=3000000
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore bootstrap=${cwd}/working/restore.bsr where=${cwd}/tmp/bacula-restores select storage=File1
unmark *
cd ${cwd}/build/src/cats
bsrstat=$?
check_two_logs
-diff -r build/src/cats tmp/bacula-restores${cwd}/build/src/cats 2>&1 >/dev/null
+diff -r build/src/cats ${cwd}/tmp/bacula-restores${cwd}/build/src/cats 2>&1 >/dev/null
if [ $? != 0 -o $bsrstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
echo " "
echo " "
change_jobname $JobName
start_test
-bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA 2>&1 >tmp/log1.out
+bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA 2>&1 >${cwd}/tmp/log1.out
fill
s
END_OF_DATA
-grep "^The last block on the tape matches\. Test succeeded\." tmp/log1.out 2>&1 >/dev/null
+grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out 2>&1 >/dev/null
if [ $? != 0 ] ; then
echo " "
echo " "
copy_tape_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
sed "s%# MaximumVolumeSize% MaximumVolumeSize%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
fill
s
quit
run_btape DDS-4
-grep "^The last block on the tape matches\. Test succeeded\." tmp/log1.out 2>&1 >/dev/null
+grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out 2>&1 >/dev/null
if [ $? != 0 ] ; then
echo " "
echo " "
copy_test_confs
rm -f bin/bacula-dir.conf
-rm -f tmp/RUN*log
+rm -f ${cwd}/tmp/RUN*log
rm -f ${cwd}/tmp/fifo
-rm -f /tmp/RUN_BUG_897
-rm -f /tmp/RUN_FD_FAILED
+rm -f ${cwd}/tmp/RUN_BUG_897
+rm -f ${cwd}/tmp/RUN_FD_FAILED
/bin/cp -f scripts/bacula-dir.conf.testrunscript bin/bacula-dir.conf
-echo "${cwd}/build/po" >/tmp/file-list
-echo "${cwd}/tmp/fifo" >> /tmp/file-list
+echo "${cwd}/build/po" >${cwd}/tmp/file-list
+echo "${cwd}/tmp/fifo" >> ${cwd}/tmp/file-list
mkfifo "${cwd}/tmp/fifo"
# use this to be able to cancel a running job
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
label volume=TestVolume001
-@$out tmp/RUN_FD_FAILED.log
+@$out ${cwd}/tmp/RUN_FD_FAILED.log
run job=RUN_FD_FAILED yes
wait
messages
@sleep 1
-@$out tmp/RUN_BUG_897.log
+@$out ${cwd}/tmp/RUN_BUG_897.log
setdebug level=200 client
run job=BUG_897 yes
@sleep 2
export bstat
export rstat
-grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
a=$?
-grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
b=$?
-grep 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
c=$?
-grep 'touching' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep 'touching' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
d=$?
-grep '*** Backup Error ***' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep '*** Backup Error ***' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
e=$?
if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 -a $e = 0 ]
then
echo "RUN_FD_FAILED in error"
rstat=1
fi
-if test -f /tmp/RUN_FD_FAILED
+if test -f ${cwd}/tmp/RUN_FD_FAILED
then
- echo "The /tmp/RUN_FD_FAILED have been created, but nothing could be found"
+ echo "The ${cwd}/tmp/RUN_FD_FAILED have been created, but nothing could be found"
echo "in the log"
fi
-grep 'touching' tmp/RUN_BUG_897.log >/dev/null 2>&1
+grep 'touching' ${cwd}/tmp/RUN_BUG_897.log >/dev/null 2>&1
d=$?
if [ $d = 0 ]
then
echo "RUN_BUG_897 in error"
rstat=1
fi
-if test -f /tmp/RUN_BUG_897
+if test -f ${cwd}/tmp/RUN_BUG_897
then
- echo "The /tmp/RUN_BUG_897 have been created, but nothing could be found"
+ echo "The ${cwd}/tmp/RUN_BUG_897 have been created, but nothing could be found"
echo "in the log"
fi
copy_test_confs
rm -f bin/bacula-dir.conf
-rm -f tmp/RUN*log
+rm -f ${cwd}/tmp/RUN*log
/bin/cp -f scripts/bacula-dir.conf.testrunscript bin/bacula-dir.conf
-rm -f /tmp/file-list
-# /tmp/file-list doesn't exists
-# echo "${cwd}/build/po" >/tmp/file-list
+rm -f ${cwd}/tmp/file-list
+# ${cwd}/tmp/file-list doesn't exists
+# echo "${cwd}/build/po" >${cwd}/tmp/file-list
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
label volume=TestVolume001
-@$out tmp/RUN_BUG_FATAL.log
+@$out ${cwd}/tmp/RUN_BUG_FATAL.log
run job=BUG_FATAL yes
wait
messages
bin/bacula start
-cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
+cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
stop_bacula
export dstat=0
scripts/cleanup
scripts/copy-crypto-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
setdebug level=10 fd
run job=$JobName yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
@# setdebug level=0 fd
restore where=${cwd}/tmp/bacula-restores storage=File
5
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
status all
status all
messages
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File
unmark *
mark *
check_two_logs
check_restore_diff
-grep " Software Compression" tmp/log1.out | grep "%" 2>&1 1>/dev/null
+grep " Software Compression" ${cwd}/tmp/log1.out | grep "%" 2>&1 1>/dev/null
if [ $? != 0 ] ; then
echo " !!!!! No compression !!!!!"
bstat=1
copy_test_confs
-echo "${cwd}/tmp/largefile" >/tmp/file-list
+echo "${cwd}/tmp/largefile" >${cwd}/tmp/file-list
if test -c /dev/urandom ; then
# Create 56MB file with random data
echo "Creating a 56MB file with random data ..."
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
run job=$JobName level=Full yes
run job=$JobName level=Full yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File
unmark *
mark *
stop_bacula
check_two_logs
-diff tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
+diff ${cwd}/tmp/largefile ${cwd}/tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
dstat=$?
end_test
scripts/cleanup
scripts/copy-crypto-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
@#setdebug level=10 fd
run job=$JobName yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
@#setdebug level=10 fd
restore where=${cwd}/tmp/bacula-restores storage=File
5
stop_bacula
du -s build
-du -s tmp/bacula-restores/
+du -s ${cwd}/tmp/bacula-restores/
check_two_logs
check_restore_diff
scripts/cleanup
scripts/copy-test-confs
-echo "/dev" >/tmp/file-list
+echo "/dev" >${cwd}/tmp/file-list
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@output tmp/log1.out
+@output ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
run job=NightlySave yes
wait
@#
@# now do a restore
@#
-@output tmp/log2.out
+@output ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
rm -f sed.scr
#
cd ${cwd}
-diff tmp/original tmp/restored 2>&1 1>/dev/null
+diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 1>/dev/null
if [ $? != 0 ] ; then
echo " "
echo " "
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
mkdir ${cwd}/tmp/build
cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
cd ${cwd}/tmp
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume002
label storage=File volume=TestVolume001
run job=$JobName yes
echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Force differential on the second Volume
update volume=TestVolume002 VolStatus=Used
run level=differential job=$JobName yes
scripts/check_for_zombie_jobs storage=File
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run level=incremental job=$JobName yes
wait
messages
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
yes
wait
#
# Delete .c files because we will only restore the txt files
#
-rm -f tmp/build/*.c
+rm -f ${cwd}/tmp/build/*.c
check_restore_tmp_build_diff
end_test
scripts/cleanup-tape
scripts/copy-tape-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=$JobName level=Full Storage=DDS-4 yes
run job=$JobName level=Full Storage=DDS-4 yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
unmark *
mark *
scripts/cleanup
scripts/copy-crypto-confs
-echo "${cwd}/encrypt-bug.jpg" >/tmp/file-list
-echo "${cwd}/encrypt-bug.jpg" >${cwd}/tmp/restore-list
-echo "${cwd}/encrypt-bug.txt" >>/tmp/file-list
-echo "${cwd}/encrypt-bug.txt" >>${cwd}/tmp/restore-list
-echo "${cwd}/encrypt-bug2.txt" >>/tmp/file-list
+echo "${cwd}/encrypt-bug.jpg" >${cwd}/tmp/file-list
+echo "${cwd}/encrypt-bug.jpg" >${cwd}/tmp/restore-list
+echo "${cwd}/encrypt-bug.txt" >>${cwd}/tmp/file-list
+echo "${cwd}/encrypt-bug.txt" >>${cwd}/tmp/restore-list
+echo "${cwd}/encrypt-bug2.txt" >>${cwd}/tmp/file-list
echo "${cwd}/encrypt-bug2.txt" >>${cwd}/tmp/restore-list
files="encrypt-bug.jpg encrypt-bug.txt encrypt-bug2.txt"
mkdir -p ${cwd}/tmp/build
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
setdebug level=100 fd
run job=$JobName yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
setdebug level=100 fd
restore where=${cwd}/tmp/bacula-restores storage=File
5
stop_bacula
du -s build
-du -s tmp/bacula-restores/
+du -s ${cwd}/tmp/bacula-restores/
check_two_logs
scripts/cleanup-tape
scripts/copy-tape-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
-out="tmp/sed_tmp"
+out="${cwd}/tmp/sed_tmp"
echo "s%# Maximum File Size% Maximum File Size%g" >${out}
cp -f ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
sed -f ${out} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
change_jobname $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
update Volume=TestVolume001 MaxVolBytes=3000000
run job=$JobName yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
wait
scripts/cleanup
copy_test_confs
-rm -f tmp/*.log
+rm -f ${cwd}/tmp/*.log
/bin/cp -f scripts/bacula-dir.conf.errors bin/bacula-dir.conf
-echo "${cwd}/build/po" >/tmp/file-list
+echo "${cwd}/build/po" >${cwd}/tmp/file-list
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@output tmp/LOCAL_INC_ERR.log
+@output ${cwd}/tmp/LOCAL_INC_ERR.log
label storage=File volume=TestVolume001
add storage=File2
1
run job=LOCAL_INC_ERR yes
wait
messages
-@output tmp/REMOTE_INC_ERR.log
+@output ${cwd}/tmp/REMOTE_INC_ERR.log
run job=REMOTE_INC_ERR yes
wait
messages
-@output tmp/LOCAL_EXCL_ERR.log
+@output ${cwd}/tmp/LOCAL_EXCL_ERR.log
run job=LOCAL_EXCL_ERR yes
wait
messages
-@$out tmp/REMOTE_EXCL_ERR.log
+@$out ${cwd}/tmp/REMOTE_EXCL_ERR.log
run job=REMOTE_EXCL_ERR yes
wait
messages
-@$out tmp/REMOTE_RUNSCRIPT_ERR.log
+@$out ${cwd}/tmp/REMOTE_RUNSCRIPT_ERR.log
run job=REMOTE_RUNSCRIPT_ERR yes
wait
messages
-@$out tmp/LOCAL_RUNSCRIPT_ERR.log
+@$out ${cwd}/tmp/LOCAL_RUNSCRIPT_ERR.log
run job=LOCAL_RUNSCRIPT_ERR yes
wait
messages
-@$out tmp/CLIENT_CONNECT_TIMEOUT.log
+@$out ${cwd}/tmp/CLIENT_CONNECT_TIMEOUT.log
run job=CLIENT_CONNECT_TIMEOUT yes
wait
messages
-@$out tmp/SD_CONNECT_TIMEOUT.log
+@$out ${cwd}/tmp/SD_CONNECT_TIMEOUT.log
run job=SD_CONNECT_TIMEOUT yes
wait
messages
END_OF_DATA
run_bacula
-touch tmp/log1.out
+touch ${cwd}/tmp/log1.out
client=$(grep client= bin/bacula-dir.conf)
check_for_zombie_jobs storage=File $client
stop_bacula
scripts/cleanup
scripts/copy-test-confs
-echo "/etc" >/tmp/file-list
+echo "/etc" >${cwd}/tmp/file-list
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@output tmp/log1.out
+@output ${cwd}/tmp/log1.out
label storage=File
TestVolume001
run job=NightlySave
@#
@# now do a restore
@#
-@output tmp/log2.out
+@output ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select
unmark *
mark *
sort <${cwd}/tmp/2 >${cwd}/tmp/restored
rm -f ${cwd}/tmp/1 ${cwd}/tmp/2
cd ${cwd}
-diff tmp/original tmp/restored 2>&1 1>/dev/null
+diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 1>/dev/null
if [ $? != 0 ] ; then
echo " "
echo " "
# an autochanger. Note, the Director has three Pools in its
# conf: Default, Full, and Inc. Default is used in the
# NightlySave job by default. What is backed up is what
-# is in /tmp/file-list, which is by default the Bacula
+# is in ${cwd}/tmp/file-list, which is by default the Bacula
# source code (i.e. the build directory).
#
# Note, we use the virtual disk autochanger.
# Make a relatively large backup set 5 x source code directory
# Reduced to 1 for portable
-echo "${cwd}/build" >/tmp/file-list
-echo "${cwd}/build" >/tmp/file-list
-echo "${cwd}/build" >/tmp/file-list
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
start_test
# Write out bconsole commands to a file
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=150 storage=DDS-4
label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
wait
scripts/cleanup
scripts/copy-test-confs
-echo "/tmp/bfifo" >/tmp/file-list
+echo "${cwd}/tmp/bfifo" >${cwd}/tmp/file-list
-rm -f /tmp/bfifo
-mkfifo /tmp/bfifo
+rm -f ${cwd}/tmp/bfifo
+mkfifo ${cwd}/tmp/bfifo
# send a file into the fifo
file=encrypt-bug.jpg
-cat ${file} >/tmp/bfifo&
+cat ${file} >${cwd}/tmp/bfifo&
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File1 volume=TestVolume001
run job=$JobName storage=File1 yes
wait
run_bacula
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
@#setdebug level=50 client
restore where=/ select all storage=File1 done
yes
quit
END_OF_DATA
-cat </tmp/bfifo >tmp/${file}&
+cat <${cwd}/tmp/bfifo >${cwd}/tmp/${file}&
run_bconsole
stop_bacula
check_two_logs
-diff ${file} tmp/${file}
+diff ${file} ${cwd}/tmp/${file}
dstat=$?
end_test
copy_tape_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
echo "s%# Maximum Block Size% Maximum Block Size%" >${cwd}/tmp/2
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
setdebug level=51 storage=DDS-4
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=$JobName yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
unmark *
mark *
scripts/cleanup-tape
scripts/copy-tape-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=$JobName level=Full Storage=DDS-4 yes
run job=$JobName level=Full Storage=DDS-4 yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
unmark *
mark *
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File1
TestVolume001
label storage=File1
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File1
unmark *
mark *
scripts/cleanup-tape
scripts/copy-tape-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
estimate job=$JobName listing
estimate job=$JobName listing
estimate job=$JobName listing
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=$JobName yes
wait
END_OF_DATA
if test "$debug" -eq 1 ; then
bin/bacula start
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
else
bin/bacula start 2>&1 >/dev/null
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
fi
scripts/check_for_zombie_jobs storage=DDS-4
#
# run a second job
#
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run job=$JobName level=Incremental yes
wait
messages
END_OF_DATA
if test "$debug" -eq 1 ; then
bin/bacula start
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
else
bin/bacula start 2>&1 >/dev/null
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
fi
scripts/check_for_zombie_jobs storage=DDS-4
#
# run a third job
#
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run job=$JobName level=Incremental yes
wait
messages
END_OF_DATA
if test "$debug" -eq 1 ; then
bin/bacula start
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
else
bin/bacula start 2>&1 >/dev/null
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
fi
scripts/check_for_zombie_jobs storage=DDS-4
#
# run a fourth job
#
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run job=$JobName level=Incremental yes
wait
messages
END_OF_DATA
if test "$debug" -eq 1 ; then
bin/bacula start
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
else
bin/bacula start 2>&1 >/dev/null
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
fi
scripts/check_for_zombie_jobs storage=DDS-4
#
# now do several restores to ensure we cleanup between jobs
#
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
restore where=${cwd}/tmp/bacula-restores select all done
yes
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
@#
@# now unmount the tape and start two restores
@# at the same time
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
estimate job=$JobName listing
estimate job=$JobName listing
estimate job=$JobName listing
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
run job=$JobName yes
wait
#
# run a second job
#
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run job=$JobName yes
wait
messages
#
# run a third job
#
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@output tmp/log1.out
+@output ${cwd}/tmp/log1.out
run job=$JobName yes
wait
messages
#
# run a fourth job
#
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@output tmp/log1.out
+@output ${cwd}/tmp/log1.out
run job=$JobName yes
wait
messages
#
# now do several restores to ensure we cleanup between jobs
#
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
restore where=${cwd}/tmp/bacula-restores select all storage=File done
yes
restore where=${cwd}/tmp/bacula-restores select all storage=File done
yes
wait
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File
unmark *
mark *
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
cd ${cwd}/build/src/tools
./gigaslam
if [ $? != 0 ]; then
start_test
-cat >tmp/bconcmds <<END_OF_DATA
+cat >${cwd}/tmp/bconcmds <<END_OF_DATA
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
run job=$JobName yes
wait
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File
unmark *
mark *
# that are only saved once. In 1.33, Bacula now deals
# with this situation.
#
-echo "${cwd}/weird-files" >/tmp/file-list
-echo "${cwd}/weird-files" >>/tmp/file-list
+echo "${cwd}/weird-files" >${cwd}/tmp/file-list
+echo "${cwd}/weird-files" >>${cwd}/tmp/file-list
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File
TestVolume001
run job=$JobName
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores storage=File
5
cd ${cwd}/weird-files/subdir
scripts/copy-2disk-confs
scripts/prepare-two-disks
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
if test ! -d ${cwd}/tmp/build ; then
mkdir ${cwd}/tmp/build
fi
start_test
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=0
run job=$JobName yes
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
update volume=TestVolume001 VolStatus=Used
run level=Incremental job=$JobName yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores
7
<${cwd}/tmp/restore-list
#
# Delete .c files because we will only restored the txt files
#
-rm -f tmp/build/*.c
+rm -f ${cwd}/tmp/build/*.c
check_two_logs
check_restore_tmp_build_diff
# an error.
#
if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- cat tmp/log1.out
+ cat ${cwd}/tmp/log1.out
echo " "
- cat tmp/log2.out
+ cat ${cwd}/tmp/log2.out
echo " "
- diff -r tmp/build tmp/bacula-restores${cwd}/tmp/build
+ diff -r ${cwd}/tmp/build ${cwd}/tmp/bacula-restores${cwd}/tmp/build
fi
end_test
scripts/cleanup
scripts/copy-2disk-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
start_test
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
label storage=File volume=TestVolume002 Pool=Default
run job=$JobName yes
touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
update volume=TestVolume001 VolStatus=Used
setdebug level=51 storage=File
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
setdebug level=51 storage=DDS-4
restore where=${cwd}/tmp/bacula-restores select all done
yes
mt -f /dev/nst1 rewind
mt -f /dev/nst1 weof
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
start_test
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
label storage=DLT80 volume=TestVolume002 Pool=Default
run job=$JobName yes
touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
update volume=TestVolume001 VolStatus=Used
setdebug level=51 storage=DLT80
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
setdebug level=51 storage=DDS-4
restore where=${cwd}/tmp/bacula-restores select all done
yes
scripts/copy-2tape-confs
scripts/cleanup-2tape
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
if test ! -d ${cwd}/tmp/build ; then
mkdir ${cwd}/tmp/build
fi
echo " "
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=0
run job=NightlySave yes
if test "$debug" -eq 1 ; then
bin/bacula start
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
else
bin/bacula start 2>&1 >/dev/null
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
+ cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
fi
echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
update volume=TestVolume001 VolStatus=Used
run level=Incremental job=NightlySave yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores
7
<${cwd}/tmp/restore-list
quit
END_OF_DATA
bin/bacula stop 2>&1 >/dev/null
-grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+grep "^ Termination: *Backup OK" ${cwd}/tmp/log1.out 2>&1 >/dev/null
bstat=$?
-grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+grep "^ Termination: *Restore OK" ${cwd}/tmp/log2.out 2>&1 >/dev/null
rstat=$?
#
# Delete .c files because we will only restored the txt files
#
-rm -f tmp/build/*.c
-diff -r tmp/build tmp/bacula-restores${cwd}/tmp/build 2>&1 >/dev/null
+rm -f ${cwd}/tmp/build/*.c
+diff -r ${cwd}/tmp/build ${cwd}/tmp/bacula-restores${cwd}/tmp/build 2>&1 >/dev/null
if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
echo " "
echo " "
copy_tape_confs
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
if test ! -d ${cwd}/tmp/build ; then
mkdir ${cwd}/tmp/build
fi
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=$JobName yes
wait
echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run level=Incremental job=$JobName yes
wait
messages
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores storage=DDS-4
7
<${cwd}/tmp/restore-list
#
# Delete .c files because we will only restored the txt files
#
-rm -f tmp/build/*.c
+rm -f ${cwd}/tmp/build/*.c
check_two_logs
check_restore_tmp_build_diff
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
mkdir ${cwd}/tmp/build
cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
cd ${cwd}/tmp
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=100 storage=File
label storage=File volume=TestVolume001
label storage=File volume=TestVolume002
echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
cp -f ${cwd}/tmp/build/dird.c ${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
update volume=TestVolume001 VolStatus=Used
run level=Differential job=$JobName yes
touch ${cwd}/tmp/build/ficheriro1.txt
touch ${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run level=Incremental job=$JobName yes
wait
messages
sed "s%a%b%g" 1 >ficheriro2.txt
rm -f 1
cd ${cwd}
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run level=Differential job=$JobName yes
wait
messages
sleep 1
touch ${cwd}/tmp/build/ficheriro1.txt
touch ${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run level=Incremental job=$JobName yes
wait
messages
sleep 1
touch ${cwd}/tmp/build/ficheriro1.txt
touch ${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run level=Incremental job=$JobName yes
wait
messages
sleep 1
touch ${cwd}/tmp/build/ficheriro1.txt
touch ${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run level=Incremental job=$JobName yes
wait
messages
touch ${cwd}/tmp/build/ficheriro1.txt
touch ${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run level=Incremental job=$JobName yes
wait
messages
@#
@# now do a restore
@#
-@output tmp/log2.out
+@output ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
yes
wait
#
# Delete .c files because we will only restored the txt files
#
-rm -f tmp/build/*.c
+rm -f ${cwd}/tmp/build/*.c
check_restore_tmp_build_diff
end_test
scripts/cleanup-tape
scripts/copy-tape-confs
-echo "/lib" >/tmp/file-list
+echo "/lib" >${cwd}/tmp/file-list
echo " "
echo " "
echo " === Starting lib-tape-root test ==="
bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
@output /dev/null
messages
-@output tmp/log1.out
+@output ${cwd}/tmp/log1.out
label storage=DDS-4 Volume=TestVolume001 slot=0
run job=NightlySave yes
wait
@#
@# now do a restore
@#
-@output tmp/log2.out
+@output ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
rm -f 1
#
cd ${cwd}
-diff tmp/original tmp/restored 2>&1 1>/dev/nul
+diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 1>/dev/nul
if [ $? != 0 ] ; then
echo " "
echo " "
scripts/cleanup
scripts/copy-test-confs
-echo "/lib" >/tmp/file-list
+echo "/lib" >${cwd}/tmp/file-list
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@output tmp/log1.out
+@output ${cwd}/tmp/log1.out
label storage=File
TestVolume001
run job=NightlySave
@#
@# now do a restore
@#
-@output tmp/log2.out
+@output ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select
unmark *
mark *
rm -f 1
#
cd ${cwd}
-diff tmp/original tmp/restored 2>&1 1>/dev/null
+diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 1>/dev/null
if [ $? != 0 ] ; then
echo " "
echo " "
copy_test_confs
rm -f bin/bacula-dir.conf
-rm -f tmp/RUN*log
+rm -f ${cwd}/tmp/RUN*log
/bin/cp -f scripts/bacula-dir.conf.maxtime bin/bacula-dir.conf
WHEN=$(date '+%Y-%m-%d %H:%M:%S')
-echo "${cwd}/build/po" >/tmp/file-list
+echo "${cwd}/build/po" >${cwd}/tmp/file-list
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
label volume=TestVolume001 pool=PoolA
-@$out tmp/RUN_MAXTIME.log
+@$out ${cwd}/tmp/RUN_MAXTIME.log
@# no media => have to wait
run job=RUN_MAXWAITTIME pool=Default yes
@sleep 2
quit
END_OF_DATA
-(mkfifo /tmp/fifo
- mkfifo /tmp/fifo2
- mkfifo /tmp/fifo3) 2> /dev/null
+(mkfifo ${cwd}/tmp/fifo
+ mkfifo ${cwd}/tmp/fifo2
+ mkfifo ${cwd}/tmp/fifo3) 2> /dev/null
bin/bacula start
-cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
+cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
stop_bacula
-rm /tmp/fifo /tmp/fifo2 /tmp/fifo3
+rm ${cwd}/tmp/fifo ${cwd}/tmp/fifo2 ${cwd}/tmp/fifo3
export dstat=0
export bstat=0
export rstat=0
-if grep -e 'RUN_MAXWAITTIME.* Fatal error: Max wait time exceeded. Job canceled.' tmp/RUN_MAXTIME.log >/dev/null 2>&1
+if grep -e 'RUN_MAXWAITTIME.* Fatal error: Max wait time exceeded. Job canceled.' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null 2>&1
then
[ "$debug" = 1 ] && echo MAXWAITTIME ok
else
rstat=1
fi
-if grep -e 'RUN_MAXSTARTDELAY.* Fatal error: Job canceled because max start delay time exceeded.' tmp/RUN_MAXTIME.log &&
- ! grep -e 'NEVER start this' tmp/RUN_MAXTIME.log >/dev/null 2>&1
+if grep -e 'RUN_MAXSTARTDELAY.* Fatal error: Job canceled because max start delay time exceeded.' ${cwd}/tmp/RUN_MAXTIME.log &&
+ ! grep -e 'NEVER start this' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null 2>&1
then
[ "$debug" = 1 ] && echo MAXSTARTDELAY ok
else
rstat=1
fi
-if grep -e 'RUN_MAXRUNTIME.* Fatal error: Max run time exceeded. Job canceled.' tmp/RUN_MAXTIME.log >/dev/null 2>&1
+if grep -e 'RUN_MAXRUNTIME.* Fatal error: Max run time exceeded. Job canceled.' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null 2>&1
then
[ "$debug" = 1 ] && echo MAXRUNTIME ok
else
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
cp -f ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
sed "s%# Maximum Volume Jobs% Maximum Volume Jobs%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File1 volume=TestVolume001
label storage=File1 volume=TestVolume002
label storage=File1 volume=TestVolume003
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File1
unmark *
mark *
scripts/cleanup-tape
scripts/copy-tape-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=$JobName level=Full Storage=DDS-4 yes
sql
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
unmark *
mark *
scripts/cleanup
scripts/copy-migration-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
# Pool Full uses Storage=DiskChanger
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=100 storage=File
label storage=File volume=FileVolume001 Pool=Default
label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
list volumes
restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
unmark *
scripts/cleanup
scripts/copy-migration-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
# Pool Full uses Storage=DiskChanger
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=10 dir
@#setdebug level=100 storage=File
label storage=File volume=FileVolume001 Pool=Default
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
unmark *
mark *
scripts/cleanup
scripts/copy-migration-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
# Pool Full uses Storage=DiskChanger
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=FileVolume001 Pool=Default
label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
unmark *
mark *
scripts/cleanup
scripts/copy-migration-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
# Pool Full uses Storage=DiskChanger
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=FileVolume001 Pool=Default
label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
unmark *
mark *
scripts/cleanup
scripts/copy-migration-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
#cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
#sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
# Pool Full uses Storage=DiskChanger
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=FileVolume001 Pool=Default
label storage=File volume=FileVolume002 Pool=Default
update Volume=FileVolume001 MaxVolBytes=3000000 pool=Default
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
unmark *
mark *
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Make sure we can contact all clients
@#setdebug level=100 dir
status client=${HOST}-fd
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores client=${hostname}-fd select storage=File1
unmark *
mark *
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
mkdir ${cwd}/tmp/build
cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
cd ${cwd}/tmp
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
label storage=File volume=TestVolume002
run job=$JobName yes
echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@# Force differental on the second Volume
update volume=TestVolume001 VolStatus=Used
run level=differental job=$JobName yes
stop_bacula
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run level=incremental job=$JobName yes
wait
messages
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
yes
wait
#
# Delete .c files because we will only restored the txt files
#
-rm -f tmp/build/*.c
+rm -f ${cwd}/tmp/build/*.c
check_two_logs
check_restore_tmp_build_diff
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File1 volume=TestVolume001
label storage=File1 volume=TestVolume002
label storage=File1 volume=TestVolume003
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File1
unmark *
mark *
/bin/cp -f scripts/bacula-dir.conf.regexwhere bin/bacula-dir.conf
-echo "${cwd}/build/po" >/tmp/file-list
+echo "${cwd}/build/po" >tmp/file-list
start_test
@## Where
m
9
-/tmp/bacula-restore-it
+tmp/bacula-restore-it
m
@## use add suffix
10
J=JobB
# $cwd begins with /
if grep -q "Restore OK" tmp/RUN_$J &&
- grep -q "/tmp/bacula-restore${cwd}/po/fr.po.old" tmp/RUN_$J
+ grep -q "tmp/bacula-restore${cwd}/po/fr.po.old" tmp/RUN_$J
then
[ "$debug" = 1 ] && echo $J ok
else
J=JobC
if grep -q "Restore OK" tmp/RUN_$J &&
- grep -q "/tmp/bacula-restore${cwd}/build/po/fr.po" tmp/RUN_$J
+ grep -q "tmp/bacula-restore${cwd}/build/po/fr.po" tmp/RUN_$J
then
[ "$debug" = 1 ] && echo $J ok
else
J=JobG
if grep -q "Restore OK" tmp/RUN_$J &&
- grep -q "/tmp/bacula-restore/build/po/fr.po" tmp/RUN_$J
+ grep -q "tmp/bacula-restore/build/po/fr.po" tmp/RUN_$J
then
[ "$debug" = 1 ] && echo $J ok
else
J=JobJ
if grep -q "Restore OK" tmp/RUN_$J &&
grep -q "/etc/passwd.old" tmp/RUN_$J &&
- grep -q -e "Where: */tmp/bacula-restore-it" tmp/RUN_$J &&
+ grep -q -e "Where: *tmp/bacula-restore-it" tmp/RUN_$J &&
grep -q "${cwd}/build/po/fr.po.old" tmp/RUN_$J
then
[ "$debug" = 1 ] && echo $J ok
scripts/cleanup-tape
scripts/copy-tape-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=$JobName level=Full yes
wait
#
# now do several restores to ensure we cleanup between jobs
#
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
restore where=${cwd}/tmp/bacula-restores select all done
yes
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
@#
@# now unmount the tape and start two restores
@# at the same time
. scripts/functions
copy_tape_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
sed s%\^%${cwd}% ${cwd}/scripts/flist | sort | uniq >${cwd}/tmp/restore2-list
cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=$JobName level=Full yes
wait
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores storage=DDS-4 file=<${cwd}/tmp/restore2-list
yes
wait
fi
done
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
run job=$JobName level=Full yes
wait
messages
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores
7
<${cwd}/tmp/restore2-list
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
mkdir ${cwd}/tmp/build
cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
cd ${cwd}/tmp/build
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
run job=$JobName yes
wait
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores storage=File
7
<${cwd}/tmp/restore-list
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
rm -rf ${cwd}/tmp/build
mkdir ${cwd}/tmp/build
# Copy only the .c files (to be restored)
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
run job=$JobName yes
wait
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
setdebug level=30 fd
setdebug level=11 storage=File
sql
. scripts/functions
copy_tape_confs
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
rm -rf ${cwd}/tmp/build
mkdir ${cwd}/tmp/build
# Copy only the .c files (to be restored)
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 pool=Default
run job=$JobName yes
wait
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
setdebug level=30 fd
setdebug level=10 storage=DDS-4
sql
. scripts/functions
copy_test_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
sed s%\^%${cwd}% ${cwd}/scripts/flist | sort | uniq >${cwd}/tmp/restore2-list
change_jobname CompressedTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
run job=$JobName yes
wait
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore2-list
yes
wait
copy_test_confs
rm -f bin/bacula-dir.conf
-rm -f tmp/RUN*log
-rm -f tmp/RUN_FD_FAILED
+rm -f ${cwd}/tmp/RUN*log
+rm -f ${cwd}/tmp/RUN_FD_FAILED
-touch tmp/log1.out
+touch ${cwd}/tmp/log1.out
/bin/cp -f scripts/bacula-dir.conf.testrunscript bin/bacula-dir.conf
-echo "${cwd}/build/po" >/tmp/file-list
+echo "${cwd}/build/po" >${cwd}/tmp/file-list
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
label volume=TestVolume001
-@$out tmp/RUN_FD_WARNING.log
+@$out ${cwd}/tmp/RUN_FD_WARNING.log
run job=RUN_FD_WARNING yes
wait
messages
@sleep 1
-@$out tmp/RUN_ALL_OK.log
+@$out ${cwd}/tmp/RUN_ALL_OK.log
run job=RUN_ALL_OK yes
wait
messages
@sleep 1
-@$out tmp/RUN_FD_FAILED.log
+@$out ${cwd}/tmp/RUN_FD_FAILED.log
run job=RUN_FD_FAILED yes
wait
messages
@sleep 1
-@$out tmp/RUN_DIR_FAILED.log
+@$out ${cwd}/tmp/RUN_DIR_FAILED.log
run job=RUN_DIR_FAILED yes
wait
messages
@sleep 1
-@$out tmp/RUN_FD_FAILED2.log
+@$out ${cwd}/tmp/RUN_FD_FAILED2.log
run job=RUN_FD_FAILED2 yes
wait
messages
export bstat
export rstat
-grep 'dir: BeforeJob: run command "/bin/echo RunBeforeJob"' tmp/RUN_ALL_OK.log >/dev/null 2>&1
+grep 'dir: BeforeJob: run command "/bin/echo RunBeforeJob"' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1
a=$?
-grep 'fd: ClientRunBeforeJob: ClientRunBeforeJob' tmp/RUN_ALL_OK.log >/dev/null 2>&1
+grep 'fd: ClientRunBeforeJob: ClientRunBeforeJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1
b=$?
-grep 'fd: ClientAfterJob: run command "/bin/echo ClientRunAfterJob' tmp/RUN_ALL_OK.log >/dev/null 2>&1
+grep 'fd: ClientAfterJob: run command "/bin/echo ClientRunAfterJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1
c=$?
-grep 'dir: AfterJob: run command "/bin/echo RunAfterJob' tmp/RUN_ALL_OK.log >/dev/null 2>&1
+grep 'dir: AfterJob: run command "/bin/echo RunAfterJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1
d=$?
if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 ]
then
rstat=1
fi
-grep 'dir: BeforeJob: run command "/bin/false RUN_DIR_FAILED"' tmp/RUN_DIR_FAILED.log >/dev/null 2>&1
+grep 'dir: BeforeJob: run command "/bin/false RUN_DIR_FAILED"' ${cwd}/tmp/RUN_DIR_FAILED.log >/dev/null 2>&1
a=$?
-grep 'dir: AfterJob: RunAfterFailedJob' tmp/RUN_DIR_FAILED.log >/dev/null 2>&1
+grep 'dir: AfterJob: RunAfterFailedJob' ${cwd}/tmp/RUN_DIR_FAILED.log >/dev/null 2>&1
b=$?
if [ $a = 0 -a $b = 0 ]
then
rstat=1
fi
-grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
a=$?
-grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
b=$?
-grep 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
c=$?
-#grep 'touching' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
-test -f tmp/RUN_FD_FAILED
+#grep 'touching' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+test -f ${cwd}/tmp/RUN_FD_FAILED
d=$?
-grep '*** Backup Error ***' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep '*** Backup Error ***' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
e=$?
if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 -a $e = 0 ]
then
rstat=1
fi
-grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
+grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
a=$?
-grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
+grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
b=$?
-grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED3"' tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
+grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED3"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
c=$?
-grep 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
+grep 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
d=$?
-grep '*** Backup Error ***' tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
+grep '*** Backup Error ***' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1
e=$?
if [ $a = 0 -a $b != 0 -a $c = 0 -a $d = 0 -a $e = 0 ]
then
rstat=1
fi
-grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_WARNING"' tmp/RUN_FD_WARNING.log >/dev/null 2>&1
+grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_WARNING"' ${cwd}/tmp/RUN_FD_WARNING.log >/dev/null 2>&1
a=$?
-grep 'RunAfterFailedJob' tmp/RUN_FD_WARNING.log >/dev/null 2>&1
+grep 'RunAfterFailedJob' ${cwd}/tmp/RUN_FD_WARNING.log >/dev/null 2>&1
b=$?
-grep 'Backup OK -- with warnings' tmp/RUN_FD_WARNING.log >/dev/null 2>&1
+grep 'Backup OK -- with warnings' ${cwd}/tmp/RUN_FD_WARNING.log >/dev/null 2>&1
c=$?
if [ $a = 0 -a $b != 0 -a $c = 0 ]
then
scripts/copy-2disk-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
-outf="tmp/sed_tmp"
+outf="${cwd}/tmp/sed_tmp"
echo "s%# Maximum File Size% Maximum File Size%g" >${outf}
cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
start_test
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=1 pool=Scratch drive=0
label storage=DDS-4 volume=TestVolume002 slot=2 pool=Scratch drive=0
update Volume=TestVolume001 MaxVolBytes=2000000 pool=Scratch drive=0
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
wait
# copy special conf file
/bin/cp -f scripts/testb-bacula-dir.conf bin/bacula-dir.conf
-echo "${cwd}/tmp/largefile" >/tmp/file-list
+echo "${cwd}/tmp/largefile" >${cwd}/tmp/file-list
# Create 56MB file with random data
echo "Creating a 56MB file with random data ..."
dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
change_jobname MultiVol $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=50 storage=File
run job=$JobName storage=File yes
run job=$JobName storage=File yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
sql
select * from JobMedia where JobId=4;
select * from JobMedia where JobId=5;
stop_bacula
check_two_logs
-diff tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
+diff ${cwd}/tmp/largefile ${cwd}/tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
dstat=$?
end_test
copy_tape_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
setdebug level=2 storage=DDS-4
run job=$JobName yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
unmark *
mark *
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File1 volume=TestVolume004
label storage=File1 volume=TestVolume003
label storage=File1 volume=TestVolume002
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File1
unmark *
mark *
cwd=`pwd`
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
start_test
-cat >tmp/bconcmds <<END_OF_DATA
+cat >${cwd}/tmp/bconcmds <<END_OF_DATA
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
run job=SparseCompressedTest yes
wait
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all storage=File done
yes
wait
scripts/cleanup
scripts/copy-crypto-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
cd ${cwd}/build/src/tools
./gigaslam
if [ $? != 0 ]; then
change_jobname SparseTest $JobName
start_test
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
setdebug level=10 fd
run job=$JobName yes
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
@# setdebug level=0 fd
restore where=${cwd}/tmp/bacula-restores storage=File
5
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
start_test
-cat >tmp/bconcmds <<END_OF_DATA
+cat >${cwd}/tmp/bconcmds <<END_OF_DATA
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
label storage=File volume=TestVolume001
run job=$JobName yes
wait
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=File
unmark *
mark *
# an autochanger. Note, the Director has four Pools in its
# conf: Default, Full, Inc, and Scratch. Default is used in the
# NightlySave job by default. What is backed up is what
-# is in /tmp/file-list, which is by default the Bacula
+# is in ${cwd}/tmp/file-list, which is by default the Bacula
# source code (i.e. the build directory).
#
# Note, we use the virtual disk autochanger.
cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
sed "s%Client Run Before Job%#Client Run Before Job%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
start_test
# Write out bconsole commands to a file
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=150 storage=DDS-4
label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
wait
scripts/copy-2disk-drive-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
# Turn off Prefer Mounted Volumes so we use 2 drives
-outf="tmp/sed_tmp"
+outf="${cwd}/tmp/sed_tmp"
echo "s%# Prefer Mounted Volumes% Prefer Mounted Volumes%g" >${outf}
cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
# Comment the next line out to write everything to one drive
sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
@#setdebug level=200 storage=DDS-4
@#setdebug level=200 client
label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
# exit
run_bacula
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
@#
@# now do a restore
@#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
wait
scripts/cleanup
scripts/copy-tls-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname CompressedTest $JobName
start_test
copy_tape_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
cwd=`pwd`
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname CompressedTest $JobName
start_test
# an autochanger. Note, the Director has three Pools in its
# conf: Default, Full, and Inc. Default is used in the
# NightlySave job by default. What is backed up is what
-# is in /tmp/file-list, which is by default the Bacula
+# is in ${cwd}/tmp/file-list, which is by default the Bacula
# source code (i.e. the build directory).
#
TestName="two-pool-tape"
echo "Done prepare two tapes"
# Make a relatively large backup set 5 x source code directory
-echo "${cwd}/build" >/tmp/file-list
-echo "${cwd}/build" >>/tmp/file-list
-echo "${cwd}/build" >>/tmp/file-list
-echo "${cwd}/build" >>/tmp/file-list
-echo "${cwd}/build" >>/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
+echo "${cwd}/build" >>${cwd}/tmp/file-list
+echo "${cwd}/build" >>${cwd}/tmp/file-list
+echo "${cwd}/build" >>${cwd}/tmp/file-list
+echo "${cwd}/build" >>${cwd}/tmp/file-list
start_test
# an autochanger. Note, the Director has three Pools in its
# conf: Default, Full, and Inc. Default is used in the
# NightlySave job by default. What is backed up is what
-# is in /tmp/file-list, which is by default the Bacula
+# is in ${cwd}/tmp/file-list, which is by default the Bacula
# source code (i.e. the build directory).
#
# Note, we use the virtual disk autochanger.
# Make a relatively large backup set 5 x source code directory
# Reduced to 1 for portable
-echo "${cwd}/build" >/tmp/file-list
-echo "${cwd}/build" >/tmp/file-list
-echo "${cwd}/build" >/tmp/file-list
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
start_test
cwd=`pwd`
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
scripts/copy-2tape-confs
scripts/prepare-two-tapes
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
outf="tmp/sed_tmp"
echo "s%# Maximum File Size% Maximum File Size%g" >${outf}
scripts/copy-2disk-confs
scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
outf="tmp/sed_tmp"
echo "s%# Maximum File Size% Maximum File Size%g" >${outf}
. scripts/functions
scripts/copy-tape-confs
scripts/cleanup-tape
-echo "/usr" >/tmp/file-list
+echo "/usr" >${cwd}/tmp/file-list
echo " "
echo " "
cwd=`pwd`
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
-#echo "${cwd}/do_all" >/tmp/file-list
-#echo "${cwd}/do_all_tapes" >>/tmp/file-list
-#echo "${cwd}/do_file" >>/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
+#echo "${cwd}/do_all" >${cwd}/tmp/file-list
+#echo "${cwd}/do_all_tapes" >>${cwd}/tmp/file-list
+#echo "${cwd}/do_file" >>${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
copy_tape_confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
cwd=`pwd`
scripts/cleanup
scripts/copy-test-confs
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname NightlySave $JobName
start_test
# that are only saved once. In 1.33, Bacula now deals
# with this situation.
#
-echo "${cwd}/weird-files" >/tmp/file-list
-echo "${cwd}/weird-files" >>/tmp/file-list
+echo "${cwd}/weird-files" >${cwd}/tmp/file-list
+echo "${cwd}/weird-files" >>${cwd}/tmp/file-list
# Create a Unix domain socket (sock-file)
cd weird-files
scripts/copy-test-confs
rm -rf weird-files2
cp -Rp weird-files weird-files2
-echo "${cwd}/weird-files2" >/tmp/file-list
+echo "${cwd}/weird-files2" >${cwd}/tmp/file-list
cd weird-files2
perl socket.pl
cd ..
scripts/copy-win32-confs
scripts/cleanup-tape
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
start_test
@# now do a restore
@#
@$out tmp/log2.out
-restore where=c:/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
yes
wait
messages
scripts/copy-win32-confs
scripts/cleanup-tape
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
change_job $JobName
start_test
@# now do a restore
@#
@$out tmp/log2.out
-restore where=/tmp/bacula-restores client=Tibs select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores client=Tibs select all storage=DDS-4 done
yes
wait
messages