+2003-10-04 Version 1.32a 04Sep03 Release
+- Fix sparse file option -- is_buffer_zero().
+- Clarification fixes to btape's help.
+- Pull in some manual updates.
+- Update testls to zap permissions on soft links.
+
2003-10-01 Version 1.32 30Sep03 Release
28Sep03
- Enhance manual faq, regression ...
- Release Notes for Bacula 1.32
+ Release Notes for Bacula 1.32a
Bacula code: Total files = 259 Total lines = 77,740 (*.h *.c *.in)
Major Changes this Release:
+- Fix sparse file option for is_block_zero().
- Implemented forward space file/block whenever possible
during restore. Restoring a small number of files is now
much faster.
/* ua_output.c */
void prtit(void *ctx, char *msg);
int complete_jcr_for_job(JCR *jcr, JOB *job, POOL *pool);
+RUN *find_next_run(JOB *job, time_t &runtime);
/* ua_server.c */
void bsendmsg(void *sock, char *fmt, ...);
strcasecmp(ua->argk[i], _("nextvolume")) == 0) {
JOB *job;
JCR *jcr = ua->jcr;
+ POOL *pool;
+ RUN *run;
+ time_t runtime;
+
i = find_arg_with_value(ua, "job");
if (i <= 0) {
if ((job = select_job_resource(ua)) == NULL) {
}
}
}
- if (!complete_jcr_for_job(jcr, job, NULL)) {
+ run = find_next_run(job, runtime);
+ pool = run ? run->pool : NULL;
+ if (!complete_jcr_for_job(jcr, job, pool)) {
return 1;
}
return 1;
}
+/*
+ * For a given job, we examine all his run records
+ * to see if it is scheduled today or tomorrow.
+ */
+RUN *find_next_run(JOB *job, time_t &runtime)
+{
+ time_t now, tomorrow;
+ RUN *run;
+ SCHED *sched;
+ struct tm tm;
+ int mday, wday, month, wpos, tmday, twday, tmonth, twpos, i, hour;
+ int tod, tom;
+
+ Dmsg0(200, "enter find_runs()\n");
+
+ sched = job->schedule;
+ if (sched == NULL) { /* scheduled? */
+ return NULL; /* no nothing to report */
+ }
+ /* Break down current time into components */
+ now = time(NULL);
+ localtime_r(&now, &tm);
+ mday = tm.tm_mday - 1;
+ wday = tm.tm_wday;
+ month = tm.tm_mon;
+ wpos = (tm.tm_mday - 1) / 7;
+
+ /* Break down tomorrow into components */
+ tomorrow = now + 60 * 60 * 24;
+ localtime_r(&tomorrow, &tm);
+ tmday = tm.tm_mday - 1;
+ twday = tm.tm_wday;
+ tmonth = tm.tm_mon;
+ twpos = (tm.tm_mday - 1) / 7;
+
+ for (run=sched->run; run; run=run->next) {
+ /*
+ * Find runs in next 24 hours
+ */
+ tod = (bit_is_set(mday, run->mday) || bit_is_set(wday, run->wday)) &&
+ bit_is_set(month, run->month) && bit_is_set(wpos, run->wpos);
+
+ tom = (bit_is_set(tmday, run->mday) || bit_is_set(twday, run->wday)) &&
+ bit_is_set(tmonth, run->month) && bit_is_set(wpos, run->wpos);
+
+ Dmsg2(200, "tod=%d tom=%d\n", tod, tom);
+ if (tod) { /* Jobs scheduled today (next 24 hours) */
+ /* find time (time_t) job is to be run */
+ localtime_r(&now, &tm);
+ hour = 0;
+ for (i=tm.tm_hour; i < 24; i++) {
+ if (bit_is_set(i, run->hour)) {
+ tm.tm_hour = i;
+ tm.tm_min = run->minute;
+ tm.tm_sec = 0;
+ runtime = mktime(&tm);
+ if (runtime > now) {
+ return run; /* found it, return run resource */
+ }
+ }
+ }
+ }
+
+// Dmsg2(200, "runtime=%d now=%d\n", runtime, now);
+ if (tom) { /* look at jobs scheduled tomorrow */
+ localtime_r(&tomorrow, &tm);
+ hour = 0;
+ for (i=0; i < 24; i++) {
+ if (bit_is_set(i, run->hour)) {
+ hour = i;
+ break;
+ }
+ }
+ tm.tm_hour = hour;
+ tm.tm_min = run->minute;
+ tm.tm_sec = 0;
+ runtime = mktime(&tm);
+ Dmsg2(200, "truntime=%d now=%d\n", runtime, now);
+ if (runtime < tomorrow) {
+ return run; /* found it, return run resource */
+ }
+ }
+ } /* end for loop over runs */
+ /* Nothing found */
+ return NULL;
+}
/*
* Fill in the remaining fields of the jcr as if it
* is going to run the job.
*/
static void print_jobs_scheduled(UAContext *ua)
{
- time_t now, runtime, tomorrow;
+ time_t runtime;
RUN *run;
JOB *job;
- SCHED *sched;
- struct tm tm;
- int mday, wday, month, wpos, tmday, twday, tmonth, twpos, i, hour;
- int tod, tom;
- int found;
- int hdr_printed = FALSE;
+ bool hdr_printed = false;
int level;
Dmsg0(200, "enter find_runs()\n");
- now = time(NULL);
- localtime_r(&now, &tm);
- mday = tm.tm_mday - 1;
- wday = tm.tm_wday;
- month = tm.tm_mon;
- wpos = (tm.tm_mday - 1) / 7;
-
- tomorrow = now + 60 * 60 * 24;
- localtime_r(&tomorrow, &tm);
- tmday = tm.tm_mday - 1;
- twday = tm.tm_wday;
- tmonth = tm.tm_mon;
- twpos = (tm.tm_mday - 1) / 7;
-
/* Loop through all jobs */
LockRes();
for (job=NULL; (job=(JOB *)GetNextRes(R_JOB, (RES *)job)); ) {
level = job->level;
- sched = job->schedule;
- if (sched == NULL) { /* scheduled? */
- continue; /* no, skip this job */
+ run = find_next_run(job, runtime);
+ if (!run) {
+ continue;
}
- for (run=sched->run; run; run=run->next) {
- if (run->level) {
- level = run->level;
- }
- /*
- * Find runs in next 24 hours
- */
- tod = (bit_is_set(mday, run->mday) || bit_is_set(wday, run->wday)) &&
- bit_is_set(month, run->month) && bit_is_set(wpos, run->wpos);
-
- tom = (bit_is_set(tmday, run->mday) || bit_is_set(twday, run->wday)) &&
- bit_is_set(tmonth, run->month) && bit_is_set(wpos, run->wpos);
-
- Dmsg2(200, "tod=%d tom=%d\n", tod, tom);
- found = FALSE;
- if (tod) { /* Jobs scheduled today (next 24 hours) */
- /* find time (time_t) job is to be run */
- localtime_r(&now, &tm);
- hour = 0;
- for (i=tm.tm_hour; i < 24; i++) {
- if (bit_is_set(i, run->hour)) {
- tm.tm_hour = i;
- tm.tm_min = run->minute;
- tm.tm_sec = 0;
- runtime = mktime(&tm);
- if (runtime > now) {
- if (!hdr_printed) {
- hdr_printed = TRUE;
- prt_runhdr(ua);
- }
- prt_runtime(ua, job, level, runtime, run->pool);
- found = TRUE;
- break;
- }
- }
- }
- }
+ if (run->level) {
+ level = run->level;
+ }
+ if (!hdr_printed) {
+ hdr_printed = true;
+ prt_runhdr(ua);
+ }
+ prt_runtime(ua, job, level, runtime, run->pool);
-// Dmsg2(200, "runtime=%d now=%d\n", runtime, now);
- if (!found && tom) { /* look at jobs scheduled tomorrow */
- localtime_r(&tomorrow, &tm);
- hour = 0;
- for (i=0; i < 24; i++) {
- if (bit_is_set(i, run->hour)) {
- hour = i;
- break;
- }
- }
- tm.tm_hour = hour;
- tm.tm_min = run->minute;
- tm.tm_sec = 0;
- runtime = mktime(&tm);
- Dmsg2(200, "truntime=%d now=%d\n", runtime, now);
- if (runtime < tomorrow) {
- if (!hdr_printed) {
- hdr_printed = TRUE;
- prt_runhdr(ua);
- }
- prt_runtime(ua, job, level, runtime, run->pool);
- }
- }
- } /* end for loop over runs */
} /* end for loop over resources */
UnlockRes();
Dmsg0(200, "Leave find_runs()\n");
+++ /dev/null
-test-gnome-console.conf
-Makefile
-gnome-console
-gnome-console.conf
-1
-2
-3
/* Return true of buffer has all zero bytes */
int is_buf_zero(char *buf, int len)
{
- uint64_t *ip = (uint64_t *)buf;
+ uint64_t *ip;
char *p;
int i, len64, done, rem;
+ if (buf[0] != 0) {
+ return 0;
+ }
+ ip = (uint64_t *)buf;
/* Optimize by checking uint64_t for zero */
- len64 = len >> sizeof(uint64_t);
+ len64 = len / sizeof(uint64_t);
for (i=0; i < len64; i++) {
if (ip[i] != 0) {
return 0;
}
}
- done = len64 << sizeof(uint64_t); /* bytes already checked */
+ done = len64 * sizeof(uint64_t); /* bytes already checked */
p = buf + done;
rem = len - done;
for (i = 0; i < rem; i++) {
*/
static void capcmd()
{
- printf(_("Device capabilities:\n"));
+ printf(_("Configured device capabilities:\n"));
printf("%sEOF ", dev->capabilities & CAP_EOF ? "" : "!");
printf("%sBSR ", dev->capabilities & CAP_BSR ? "" : "!");
printf("%sBSF ", dev->capabilities & CAP_BSF ? "" : "!");
{
unsigned int i;
usage();
+ printf(_("Interactive commands:\n"));
printf(_(" Command Description\n ======= ===========\n"));
for (i=0; i<comsize; i++)
printf(" %-10s %s\n", commands[i].key, commands[i].help);
{
fprintf(stderr, _(
"\nVersion: " VERSION " (" BDATE ")\n\n"
-"Usage: btape [-c config_file] [-d debug_level] [device_name]\n"
+"Usage: btape [-c config_file] [-d debug_level] device_name\n"
" -c <file> set configuration file to file\n"
" -dnn set debug level to nn\n"
" -s turn off signals\n"
while ((ch = getopt(argc, argv, "ad:e:i:?")) != -1) {
switch (ch) {
- case 'a': /* print extended attributes *debug* */
- attrs = 1;
- break;
-
- case 'd': /* set debug level */
- debug_level = atoi(optarg);
- if (debug_level <= 0) {
- debug_level = 1;
- }
- break;
+ case 'a': /* print extended attributes *debug* */
+ attrs = 1;
+ break;
+
+ case 'd': /* set debug level */
+ debug_level = atoi(optarg);
+ if (debug_level <= 0) {
+ debug_level = 1;
+ }
+ break;
- case 'e': /* exclude patterns */
- exc = optarg;
- break;
+ case 'e': /* exclude patterns */
+ exc = optarg;
+ break;
- case 'i': /* include patterns */
- inc = optarg;
- break;
+ case 'i': /* include patterns */
+ inc = optarg;
+ break;
- case '?':
- default:
- usage();
+ case '?':
+ default:
+ usage();
}
}
char *p, *f;
int n;
+ if (type == FT_LNK) {
+ statp->st_mtime = 0;
+ statp->st_mode |= 0777;
+ }
p = encode_mode(statp->st_mode, buf);
n = sprintf(p, " %2d ", (uint32_t)statp->st_nlink);
p += n;
n = sprintf(p, " ");
}
p += n;
- if (type != FT_LNK) {
- p = encode_time(statp->st_mtime, p);
- } else {
- p = encode_time(0, p);
- }
+ p = encode_time(statp->st_mtime, p);
*p++ = ' ';
/* Copy file name */
for (f=fname; *f && (p-buf) < (int)sizeof(buf); )
/* */
#undef VERSION
-#define VERSION "1.32"
+#define VERSION "1.32a"
#define VSTRING "1"
-#define BDATE "30 Sep 2003"
-#define LSMDATE "30Sep03"
+#define BDATE "04 Oct 2003"
+#define LSMDATE "04Oct03"
/* Debug flags */
#undef DEBUG
+++ /dev/null
-build
-bin
-test.out
-weird-files
-diff
-tmp
-working
+++ /dev/null
- Bacula Regression
- Kern Sibbald
- April 2003
-
-This is Bacula's regression script directory. At this time
-(May 2003), it is still in development, so all the tests are
-not complete.
-
-To set it up, first edit Makefile and set BACULA-SOURCE to point
-to your source.
-
-!!!!!!!!!! IMPORTANT !!!!!!!!
-Second, edit the EMAIL address in the Makefile to be your
-email address and not mine or I will get LOTS of unwanted
-email!
-
-Third, edit the DEPKGS path in the Makefile to point to the
-depkgs directory.
-
-Fourth, make sure that depkgs is pre-built if it isn't
-already: (cd your-depkgs; make sqlite).
-
-Then do:
-
- make setup
-
-You run the above one time. This will copy the Bacula
-source, configure, build it, and configure all the scripts
-and conf files. If you change your source, you will need
-to redo this command.
-
-Then you can run any of the tests in the tests subdirectory.
-Each test whose name ends in -root requires you to be root for
-a resonable run. Each test is totally independent of any other
-test. Aside from the required "make setup", each test is totally
-self-initalizing and should clean up after itself.
-
-Not all the tests yet report OK. This is simply because there are
-some spurious differences that I haven't yet taken the time to
-eliminate. The working scrips as of 24 Apr 03 are:
-
-backup-bacula-test
-sparse-test
-compressed-test
-sparse-compressed-test
-two-jobs-test
-wierd-files-test
-verify-vol-test
-
-The tests expect you to execute them from the main regress
-directory!
-
-You can run them individually as:
-
- tests/two-jobs-test
-
-or all non-root tests (my normal testing under my account)
-
- ./all-non-root-tests
-
-or all tests (I only run these before a production release):
-
- su
- ./all-tests
-
-
-after running the root tests, while still root, it is a good idea
-to do:
-
- make reset
-
-this cleans up any files that may be created with root permissions.
-
-If you want to add more tests, do so by putting the shell script
-in the tests subdirectory. Be careful when adding (or better not)
-new clients, pools, and such to the test-bacula-dir.conf.in file
-as it may invalidate a good number of tests, which respond to
-questions by answering with a number (i.e. the order of the selection
-list is known). It might be better to add your own testb-bacula...
-configuration file.
-
-To avoid re-doing a make setup if you have made a change to the
-conf files, and you do not need a new copy of the source, you can simply do:
-
- scripts/do-sed <your-email-address>
+++ /dev/null
-#!/bin/sh
-#
-# Run all tape tests
-#
-tests/test0
-tests/backup-bacula-tape
-tests/small-file-size-tape
-tests/two-volume-tape
-echo " "
-echo " "
-echo "Test results"
-cat test.out
-scripts/cleanup
+++ /dev/null
-#!/bin/sh
-#
-# Run all tests
-#
-tests/test0
-tests/backup-bacula-test
-tests/verify-vol-test
-tests/sparse-test
-tests/compressed-test
-tests/sparse-compressed-test
-tests/weird-files-test
-tests/two-jobs-test
-tests/two-vol-test
-tests/six-vol-test
-tests/bscan-test
-tests/weird-files2-test
-tests/concurrent-jobs-test
-tests/four-concurrent-jobs-test
-tests/bsr-opt-test
-tests/bextract-test
-tests/recycle-test
-tests/span-vol-test
-tests/restore-by-file-test
-echo " "
-echo " "
-echo "Test results"
-cat test.out
-scripts/cleanup
+++ /dev/null
-#!/bin/sh
-#
-# Run all root tests
-#
-tests/dev-test-root
-tests/etc-test-root
-tests/lib-test-root
-cat test.out
-scripts/cleanup
+++ /dev/null
-#!/bin/sh
-#
-# Run all tests
-#
-tests/test0
-tests/backup-bacula-test
-tests/verify-vol-test
-tests/sparse-test
-tests/compressed-test
-tests/sparse-compressed-test
-tests/weird-files-test
-tests/two-jobs-test
-tests/two-vol-test
-tests/six-vol-test
-tests/bscan-test
-tests/weird-files2-test
-tests/concurrent-jobs-test
-tests/four-concurrent-jobs-test
-tests/bsr-opt-test
-tests/bextract-test
-tests/recycle-test
-tests/span-vol-test
-tests/backup-bacula-tape
-tests/small-file-size-tape
-tests/two-volume-tape
-echo " "
-echo " "
-echo "Test results"
-cat test.out
-scripts/cleanup
+++ /dev/null
-#!/bin/sh
-#
-# Run all tests
-#
-./all-non-root-tests
-./all-root-tests
-cat test.out
-scripts/cleanup
+++ /dev/null
-bacula-dir.conf
-bacula-fd.conf
-bacula-sd.conf
-console.conf
-test-bacula-dir.conf
-test-bacula-fd.conf
-test-bacula-sd.conf
-test-console.conf
-testa-bacula-dir.conf
-bacula-dir-tape.conf
-bacula-sd-tape.conf
-cleanup-tape
+++ /dev/null
-#
-# Default Bacula Director Configuration file
-#
-# The only thing that MUST be changed is to add one or more
-# file or directory names in the Include directive of the
-# FileSet resource.
-#
-# For Bacula release 1.30 (12 April 2003) -- redhat 7.3
-#
-# You might also want to change the default email address
-# from root to your address. See the "mail" and "operator"
-# directives in the Messages resource.
-#
-
-Director { # define myself
- Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
- QueryFile = "@scriptdir@/query.sql"
- WorkingDirectory = "@working_dir@"
- PidDirectory = "@piddir@"
- Maximum Concurrent Jobs = 4
- Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3"
- Messages = Standard
-}
-
-#
-# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
-Job {
- Name = "NightlySave"
- Type = Backup
- Client=@hostname@-fd
- FileSet="Full Set"
- Storage = DDS-4
- Messages = Standard
- Pool = Default
- Write Bootstrap = "@working_dir@/NightlySave.bsr"
- Maximum Concurrent Jobs = 4
-}
-
-
-# Standard Restore template, to be changed by Console program
-Job {
- Name = "RestoreFiles"
- Type = Restore
- Client=@hostname@-fd
- FileSet="Full Set"
- Storage = DDS-4
- Messages = Standard
- Pool = Default
- Where = /tmp/bacula-restores
-}
-
-
-# List of files to be backed up
-FileSet {
- Name = "Full Set"
- Include = signature=MD5 {
- </tmp/file-list
- }
-}
-
-
-#
-# When to do the backups, full backup on first sunday of the month,
-# differential (i.e. incremental since full) every other sunday,
-# and incremental backups other days
-Schedule {
- Name = "WeeklyCycle"
- Run = Full 1st sun at 1:05
- Run = Differential 2nd-5th sun at 1:05
- Run = Incremental mon-sat at 1:05
-}
-
-# Client (File Services) to backup
-Client {
- Name = @hostname@-fd
- Address = @hostname@
- FDPort = 8102
- Catalog = MyCatalog
- Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
- File Retention = 30d # 30 days
- Job Retention = 180d # six months
- AutoPrune = yes # Prune expired Jobs/Files
- Maximum Concurrent Jobs = 4
-}
-
-# Definition of DDS tape storage device
-Storage {
- Name = DDS-4
- Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
- 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
- AutoChanger = yes
-}
-
-
-# Generic catalog service
-Catalog {
- Name = MyCatalog
- dbname = bacula; user = bacula; password = ""
-}
-
-# Reasonable message delivery -- send most everything to email address
-# and to the console
-Messages {
- Name = Standard
- mailcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
- operatorcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
- MailOnError = @job_email@ = all
- operator = @job_email@ = mount
- console = all, !skipped
-#
-# WARNING! the following will create a file that you must cycle from
-# time to time as it will grow indefinitely. However, it will
-# also keep all your messages if the scroll off the console.
-#
- append = "@working_dir@/log" = all, !skipped
-}
-
-
-# Default pool definition
-Pool {
- Name = Default
- Pool Type = Backup
- Recycle = yes # Bacula can automatically recycle Volumes
- AutoPrune = yes # Prune expired volumes
- Volume Retention = 365d # one year
- Accept Any Volume = yes # write on any volume in the pool
-}
+++ /dev/null
-#
-# Default Bacula Storage Daemon Configuration file
-#
-# For Bacula release 1.30 (12 April 2003) -- redhat 7.3
-#
-# You may need to change the name of your tape drive
-# on the "Archive Device" directive in the Device
-# resource. If you change the Name and/or the
-# "Media Type" in the Device resource, please ensure
-# that dird.conf has corresponding changes.
-#
-
-Storage { # definition of myself
- Name = @hostname@-sd
- SDPort = 8103 # Director's port
- WorkingDirectory = "@working_dir@"
- Pid Directory = "@piddir@"
- Subsys Directory = "@subsysdir@"
-}
-
-#
-# List Directors who are permitted to contact Storage daemon
-#
-Director {
- Name = @hostname@-dir
- Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
-}
-
-#
-# Devices supported by this Storage daemon
-# To connect, the Director's bacula-dir.conf must have the
-# same Name and MediaType.
-#
-
-Device {
- Name = DDS-4 #
- Media Type = DDS-4
- Changer Device = @autochanger@
- Changer Command ="@scriptdir@/mtx-changer %c %o %S %a"
- Archive Device = @tape_drive@
- AutomaticMount = yes; # when device opened, read it
- AlwaysOpen = yes;
- RemovableMedia = yes;
-# Maximum File Size = 1000000
-}
-
-#
-# Send all messages to the Director,
-# mount messages also are sent to the email address
-#
-Messages {
- Name = Standard
- director = @hostname@-dir = all
-}
+++ /dev/null
-#
-# Default Bacula Storage Daemon Configuration file
-#
-# For Bacula release 1.32 (20 Sep 2003) -- redhat 9
-#
-# You may need to change the name of your tape drive
-# on the "Archive Device" directive in the Device
-# resource. If you change the Name and/or the
-# "Media Type" in the Device resource, please ensure
-# that dird.conf has corresponding changes.
-#
-
-Storage { # definition of myself
- Name = rufus-sd
- SDPort = 8103 # Director's port
- WorkingDirectory = "/home/kern/bacula/regress/working"
- Pid Directory = "/home/kern/bacula/regress/working"
-}
-
-#
-# List Directors who are permitted to contact Storage daemon
-#
-Director {
- Name = rufus-dir
- Password = "BzlEl8haeFmnv/Lv8V6zDzUBgFFQNsUtny6VkmccQpOy"
-}
-
-#
-# Devices supported by this Storage daemon
-# To connect, the Director's bacula-dir.conf must have the
-# same Name and MediaType.
-#
-
-Device {
- Name = FileStorage
- Media Type = File
- Archive Device = @tmpdir@
- LabelMedia = yes; # lets Bacula label unlabeled media
- Random Access = Yes;
- AutomaticMount = yes; # when device opened, read it
- RemovableMedia = no;
- AlwaysOpen = no;
-}
-
-#Device {
-# Name = DDS-4 #
-# Media Type = DDS-4
-# Archive Device = /dev/nst0
-# AutomaticMount = yes; # when device opened, read it
-# AlwaysOpen = yes;
-# RemovableMedia = yes;
-#}
-
-#
-# A very old Exabyte with no end of media detection
-#
-#Device {
-# Name = "Exabyte 8mm"
-# Media Type = "8mm"
-# Archive Device = /dev/nst0
-# Hardware end of medium = No;
-# AutomaticMount = yes; # when device opened, read it
-# AlwaysOpen = Yes;
-# RemovableMedia = yes;
-#}
-
-#
-# Send all messages to the Director,
-# mount messages also are sent to the email address
-#
-Messages {
- Name = Standard
- director = rufus-dir = all
-}
+++ /dev/null
-#!/bin/sh
-#
-# Cleanup left over files -- both before and after test run
-#
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores /tmp/Small*
-rm -rf tmp/original tmp/bacula-restores tmp/Small* tmp/TestVolume*
-rm -rf tmp/restored tmp/largefile tmp/bscan.bsr tmp/log*.out
-rm -rf /tmp/sed_tmp /tmp/file-list
-rm -rf tmp/build tmp/restore-list
+++ /dev/null
-#!/bin/sh
-#
-# Cleanup left over files -- both before and after test run
-#
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores /tmp/Small*
-rm -rf tmp/original tmp/bacula-restores tmp/Small* tmp/TestVolume*
-rm -rf tmp/restored tmp/largefile tmp/bscan.bsr tmp/log*.out
-
-#
-# If we have an autochanger always load tape in slot 1
-#
-if ! test x@autochanger@ = x/dev/null; then
- drive=`bin/mtx-changer @autochanger@ loaded`
- if ! test x$drive = x1; then
- bin/mtx-changer @autochanger@ unload
- bin/mtx-changer @autochanger@ load 1
- fi
-fi
-
-mt -f @tape_drive@ rewind
-mt -f @tape_drive@ weof
+++ /dev/null
-#!/bin/sh
-/bin/cp -f scripts/bacula-dir.conf bin/bacula-dir.conf
-/bin/cp -f scripts/bacula-sd.conf bin/bacula-sd.conf
-/bin/cp -f scripts/bacula-fd.conf bin/bacula-fd.conf
-/bin/cp -f scripts/console.conf bin/console.conf
+++ /dev/null
-#!/bin/sh
-/bin/cp -f scripts/bacula-dir-tape.conf bin/bacula-dir.conf
-/bin/cp -f scripts/bacula-sd-tape.conf bin/bacula-sd.conf
-/bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf
-/bin/cp -f scripts/test-console.conf bin/console.conf
+++ /dev/null
-#!/bin/sh
-/bin/cp -f scripts/test-bacula-dir.conf bin/bacula-dir.conf
-/bin/cp -f scripts/test-bacula-sd.conf bin/bacula-sd.conf
-/bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf
-/bin/cp -f scripts/test-console.conf bin/console.conf
+++ /dev/null
-#!/bin/sh
-/bin/cp -f scripts/testa-bacula-dir.conf bin/bacula-dir.conf
-/bin/cp -f scripts/test-bacula-sd.conf bin/bacula-sd.conf
-/bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf
-/bin/cp -f scripts/test-console.conf bin/console.conf
+++ /dev/null
-#!/bin/sh
-#
-if test $# != 3 ; then
- echo "First arg must be email name"
- echo " and the second must be a tape drive"
- echo " and the third must be a tape control name or /dev/null"
- exit 1
-fi
-out="/tmp/sed_tmp"
-cwd=`pwd`
-host=`hostname | tr '.' ' ' | cut -f 1 -d ' '`
-if test x$host = x ; then
- host=localhost
-fi
-# Create sed command script
-echo "s%@sbindir@%${cwd}/bin%g" >${out}
-echo "s%@scriptdir@%${cwd}/bin%g" >>${out}
-echo "s%@working_dir@%${cwd}/working%g" >>${out}
-echo "s%@piddir@%${cwd}/working%g" >>${out}
-echo "s%@subsysdir@%${cwd}/working%g" >>${out}
-echo "s%@job_email@%${1}%g" >>${out}
-echo "s%@tape_drive@%${2}%g" >>${out}
-echo "s%@autochanger@%${3}%g" >>${out}
-echo "s%@tmpdir@%${cwd}/tmp%g" >>${out}
-echo "s%@hostname@%${host}%g" >>${out}
-
-# process .in files with sed script
-sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf
-sed -f ${out} ${cwd}/scripts/testa-bacula-dir.conf.in >${cwd}/scripts/testa-bacula-dir.conf
-sed -f ${out} ${cwd}/scripts/test-bacula-fd.conf.in >${cwd}/scripts/test-bacula-fd.conf
-sed -f ${out} ${cwd}/scripts/test-bacula-sd.conf.in >${cwd}/scripts/test-bacula-sd.conf
-sed -f ${out} ${cwd}/scripts/test-console.conf.in >${cwd}/scripts/test-console.conf
-sed -f ${out} ${cwd}/scripts/bacula-dir-tape.conf.in >${cwd}/scripts/bacula-dir-tape.conf
-sed -f ${out} ${cwd}/scripts/bacula-sd-tape.conf.in >${cwd}/scripts/bacula-sd-tape.conf
-sed -f ${out} ${cwd}/scripts/cleanup-tape.in >${cwd}/scripts/cleanup-tape
-cp ${cwd}/bin/bacula-sd.conf /tmp/bac$$
-sed s%/tmp%${cwd}/tmp%g /tmp/bac$$ >${cwd}/bin/bacula-sd.conf
-chmod 777 ${cwd}/scripts/cleanup-tape
-
-rm -f ${out}
-rm -f /tmp/bac$$
+++ /dev/null
-dev/ptmx
-dev/pts
-dev/rd/c5d2
-dev/rd
-dev/shm
+++ /dev/null
-etc/mail/statistics
+++ /dev/null
-lib/ld-2.2.5.so
-lib/libtermcap.so.2.0.8
-lib/libc-2.2.5.so
-lib/libnsl-2.2.5.so
-lib/libnss_files-2.2.5.so
+++ /dev/null
-#!/bin/sh
-#
-# This is the configuration script for regression testing
-#
-
-CFLAGS="-g -O2 -Wall" \
- ./configure \
- --sbindir=$1/bin \
- --sysconfdir=$1/bin \
- --with-pid-dir=$1/working \
- --with-subsys-dir=$1/working \
- --enable-smartalloc \
- --disable-readline \
- --with-sqlite=$2 \
- --with-working-dir=$1/working \
- --with-dump-email=$3 \
- --with-job-email=$3 \
- --with-baseport=8101
-
-exit 0
+++ /dev/null
-#!/bin/sh
-#
-# Script to setup running Bacula regression tests
-#
-cwd=`pwd`
-if [ $# != 3 ] ; then
- echo "Incorrect number of arguments. Need:"
- echo "setup bacula-src depkgs email-address"
- echo " "
- exit 1
-fi
-if [ ! -d $1 ] ; then
- echo "Arg 1 must be a Bacula release directory."
- echo " "
- exit 1
-fi
-if [ ! -d $2 ] ; then
- cd ..
- cwd=`pwd`
- echo "The regression scripts require DEPKGS as arg 2 but not found!"
- echo " "
- exit 1
-fi
-rm -rf build bin
-# Copy new source
-cp -rp $1 build
-cp scripts/regress-config build
-cd build
-rm -f Makefile config.cache
-# Run Bacula configuration, make, install
-./regress-config ${cwd} $2 $3
-make
-make install
-cp src/tools/testls ../bin
-
-cd ..
-bin/bacula stop
-bin/create_sqlite_database
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-# Start and stop Bacula to ensure conf files are OK
-bin/bacula start
-bin/bacula stop
-#
-# Save Bacula default conf files for later use
-#
-cp -f bin/*.conf scripts
+++ /dev/null
-#
-# Default Bacula Director Configuration file
-#
-# The only thing that MUST be changed is to add one or more
-# file or directory names in the Include directive of the
-# FileSet resource.
-#
-# For Bacula release 1.30 (12 April 2003) -- redhat 7.3
-#
-# You might also want to change the default email address
-# from root to your address. See the "mail" and "operator"
-# directives in the Messages resource.
-#
-
-Director { # define myself
- Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
- QueryFile = "@scriptdir@/query.sql"
- WorkingDirectory = "@working_dir@"
- PidDirectory = "@piddir@"
- SubSysDirectory = "@subsysdir@"
- Maximum Concurrent Jobs = 4
- Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password
- Messages = Standard
-}
-
-#
-# Define the main nightly save backup job
-# By default, this job will back up to disk in /tmp
-Job {
- Name = "NightlySave"
- Type = Backup
- Client=@hostname@-fd
- FileSet="Full Set"
- Storage = File
- Messages = Standard
- Pool = Default
- Write Bootstrap = "@working_dir@/NightlySave.bsr"
- Maximum Concurrent Jobs = 4
-}
-
-Job {
- Name = "MonsterSave"
- Type = Backup
- Client=@hostname@-fd
- FileSet="Full Set"
- Storage = File1
- Messages = Standard
- Pool = Default
- Write Bootstrap = "@working_dir@/NightlySave.bsr"
-}
-
-
-Job {
- Name = "VerifyVolume"
- Type = Verify
- Level = VolumeToCatalog
- Client=@hostname@-fd
- FileSet="Full Set"
- Storage = File
- Messages = Standard
- Pool = Default
- Write Bootstrap = "@working_dir@/NightlySave.bsr"
-}
-
-
-Job {
- Name = "SparseTest"
- Type = Backup
- Client=@hostname@-fd
- FileSet="SparseSet"
- Storage = File
- Messages = Standard
- Pool = Default
- Write Bootstrap = "@working_dir@/NightlySave.bsr"
-}
-
-Job {
- Name = "CompressedTest"
- Type = Backup
- Client=@hostname@-fd
- FileSet="CompressedSet"
- Storage = File
- Messages = Standard
- Pool = Default
- Maximum Concurrent Jobs = 4
- Write Bootstrap = "@working_dir@/NightlySave.bsr"
-}
-
-Job {
- Name = "SparseCompressedTest"
- Type = Backup
- Client=@hostname@-fd
- FileSet="SparseCompressedSet"
- Storage = File
- Messages = Standard
- Pool = Default
- Write Bootstrap = "@working_dir@/NightlySave.bsr"
-}
-
-
-# Backup the catalog database (after the nightly save)
-Job {
- Name = "BackupCatalog"
- Type = Backup
- Client=@hostname@-fd
- FileSet="Catalog"
-# Schedule = "WeeklyCycleAfterBackup"
- Storage = File
- Messages = Standard
- Pool = Default
- # This creates an ASCII copy of the catalog
- RunBeforeJob = "@sbindir@/make_catalog_backup -u bacula"
- # This deletes the copy of the catalog
- RunAfterJob = "@sbindir@/delete_catalog_backup"
- Write Bootstrap = "@working_dir@/BackupCatalog.bsr"
-}
-
-# Standard Restore template, to be changed by Console program
-Job {
- Name = "RestoreFiles"
- Type = Restore
- Client=@hostname@-fd
- FileSet="Full Set"
- Storage = File
- Messages = Standard
- Pool = Default
- Where = /tmp/bacula-restores
-}
-
-
-# List of files to be backed up
-FileSet {
- Name = "Full Set"
- Include = signature=MD5 {
- </tmp/file-list
- }
-}
-
-FileSet {
- Name = "SparseSet"
- Include = signature=MD5 sparse=yes {
- </tmp/file-list
- }
-}
-
-FileSet {
- Name = "CompressedSet"
- Include = signature=MD5 compression=GZIP {
- </tmp/file-list
- }
-}
-
-FileSet {
- Name = "SparseCompressedSet"
- Include = signature=MD5 compression=GZIP {
- </tmp/file-list
- }
-}
-
-
-
-#
-# When to do the backups, full backup on first sunday of the month,
-# differential (i.e. incremental since full) every other sunday,
-# and incremental backups other days
-Schedule {
- Name = "WeeklyCycle"
- Run = Full 1st sun at 1:05
- Run = Differential 2nd-5th sun at 1:05
- Run = Incremental mon-sat at 1:05
-}
-
-# This schedule does the catalog. It starts after the WeeklyCycle
-Schedule {
- Name = "WeeklyCycleAfterBackup"
- Run = Full sun-sat at 1:10
-}
-
-# This is the backup of the catalog
-FileSet {
- Name = "Catalog"
- Include = signature=MD5 {
- /home/kern/bacula/regress/bin/working/bacula.sql
- }
-}
-
-# Client (File Services) to backup
-Client {
- Name = @hostname@-fd
- Address = @hostname@
- FDPort = 8102
- Catalog = MyCatalog
- Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
- File Retention = 30d # 30 days
- Job Retention = 180d # six months
- AutoPrune = yes # Prune expired Jobs/Files
- Maximum Concurrent Jobs = 4
-}
-
-# Definiton of file storage device
-Storage {
- Name = File
- Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
- Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
- Device = FileStorage
- Media Type = File
- Maximum Concurrent Jobs = 4
-}
-
-Storage {
- Name = File1
- Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
- Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
- Device = FileStorage1
- Media Type = File1
- Maximum Concurrent Jobs = 4
-}
-
-
-# Definition of DLT tape storage device
-#Storage {
-# Name = DLTDrive
-# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
-# 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
-#}
-
-# Definition of DDS tape storage device
-#Storage {
-# Name = SDT-10000
-# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
-# 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
-#}
-
-# Definition of 8mm tape storage device
-#Storage {
-# Name = "8mmDrive"
-# Address = @hostname@ # N.B. Use a fully qualified name here
-# SDPort = 8103
-# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
-# Device = "Exabyte 8mm"
-# MediaType = "8mm"
-#}
-
-
-# Generic catalog service
-Catalog {
- Name = MyCatalog
- dbname = bacula; user = bacula; password = ""
-}
-
-# Reasonable message delivery -- send most everything to email address
-# and to the console
-Messages {
- Name = Standard
- mailcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
- operatorcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
- MailOnError = @job_email@ = all
- operator = @job_email@ = mount
- console = all, !skipped
-#
-# WARNING! the following will create a file that you must cycle from
-# time to time as it will grow indefinitely. However, it will
-# also keep all your messages if the scroll off the console.
-#
- append = "@working_dir@/log" = all, !skipped
-}
-
-Messages {
- Name = NoEmail
- mailcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
- console = all, !skipped
-#
-# WARNING! the following will create a file that you must cycle from
-# time to time as it will grow indefinitely. However, it will
-# also keep all your messages if the scroll off the console.
-#
- append = "@working_dir@/log" = all, !skipped
-}
-
-
-# Default pool definition
-Pool {
- Name = Default
- Pool Type = Backup
- Recycle = yes # Bacula can automatically recycle Volumes
- AutoPrune = yes # Prune expired volumes
- Volume Retention = 365d # one year
- Accept Any Volume = yes # write on any volume in the pool
-}
+++ /dev/null
-#
-# Default Bacula File Daemon Configuration file
-#
-# For Bacula release 1.30 (12 April 2003) -- redhat 7.3
-#
-# There is not much to change here except perhaps the
-# File daemon Name to
-#
-
-#
-# List Directors who are permitted to contact this File daemon
-#
-Director {
- Name = @hostname@-dir
- Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc"
-}
-
-#
-# "Global" File daemon configuration specifications
-#
-FileDaemon { # this is me
- Name = @hostname@-fd
- FDport = 8102 # where we listen for the director
- WorkingDirectory = "@working_dir@"
- Pid Directory = "@piddir@"
- SubSys Directory = "@subsysdir@"
-}
-
-# Send all messages except skipped files back to Director
-Messages {
- Name = Standard
- director = @hostname@-dir = all
-}
+++ /dev/null
-#
-# Default Bacula Storage Daemon Configuration file
-#
-# For Bacula release 1.30 (12 April 2003) -- redhat 7.3
-#
-# You may need to change the name of your tape drive
-# on the "Archive Device" directive in the Device
-# resource. If you change the Name and/or the
-# "Media Type" in the Device resource, please ensure
-# that dird.conf has corresponding changes.
-#
-
-Storage { # definition of myself
- Name = @hostname@-sd
- SDPort = 8103 # Director's port
- WorkingDirectory = "@working_dir@"
- Pid Directory = "@piddir@"
- Subsys Directory = "@subsysdir@"
-}
-
-#
-# List Directors who are permitted to contact Storage daemon
-#
-Director {
- Name = @hostname@-dir
- Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
-}
-
-#
-# Devices supported by this Storage daemon
-# To connect, the Director's bacula-dir.conf must have the
-# same Name and MediaType.
-#
-
-Device {
- Name = FileStorage
- Media Type = File
- Archive Device = @tmpdir@
- LabelMedia = yes; # lets Bacula label unlabelled media
- Random Access = Yes;
- AutomaticMount = yes; # when device opened, read it
- RemovableMedia = no;
- AlwaysOpen = no;
-}
-
-Device {
- Name = FileStorage1
- Media Type = File1
- Archive Device = @tmpdir@
- LabelMedia = yes; # lets Bacula label unlabelled media
- Random Access = Yes;
- AutomaticMount = yes; # when device opened, read it
- RemovableMedia = no;
- AlwaysOpen = no;
-}
-
-
-#Device {
-# Name = "HP DLT 80"
-# Media Type = DLT8000
-# Archive Device = /dev/nst0
-# AutomaticMount = yes; # when device opened, read it
-# AlwaysOpen = yes;
-# RemovableMedia = yes;
-#}
-
-#Device {
-# Name = SDT-7000 #
-# Media Type = DDS-2
-# Archive Device = /dev/nst0
-# AutomaticMount = yes; # when device opened, read it
-# AlwaysOpen = yes;
-# RemovableMedia = yes;
-#}
-
-#Device {
-# Name = Floppy
-# Media Type = Floppy
-# Archive Device = /mnt/floppy
-# RemovableMedia = yes;
-# Random Access = Yes;
-# AutomaticMount = yes; # when device opened, read it
-# AlwaysOpen = no;
-#}
-
-#
-# A very old Exabyte with no end of media detection
-#
-#Device {
-# Name = "Exabyte 8mm"
-# Media Type = "8mm"
-# Archive Device = /dev/nst0
-# Hardware end of medium = No;
-# AutomaticMount = yes; # when device opened, read it
-# AlwaysOpen = Yes;
-# RemovableMedia = yes;
-#}
-
-#
-# Send all messages to the Director,
-# mount messages also are sent to the email address
-#
-Messages {
- Name = Standard
- director = @hostname@-dir = all
-}
+++ /dev/null
-#
-# Bacula User Agent (or Console) Configuration File
-#
-
-Director {
- Name = @hostname@-dir
- DIRport = 8101
- address = @hostname@
- Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3"
-}
+++ /dev/null
-#
-# TestA Bacula Director Configuration file
-#
-# For Bacula release 1.30 (12 April 2003) -- redhat 7.3
-#
-
-Director { # define myself
- Name = @hostname@-dir
- DIRport = 8101 # where we listen for UA connections
- QueryFile = "@scriptdir@/query.sql"
- WorkingDirectory = "@working_dir@"
- PidDirectory = "@piddir@"
- SubSysDirectory = "@subsysdir@"
- Maximum Concurrent Jobs = 1
- Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password
- Messages = Standard
-}
-
-
-Job {
- Name = "MultiVol"
- Type = Backup
- Client=@hostname@-fd
- Level = Full
- FileSet="Full Set"
- Storage = File
- Messages = Standard
- Write Bootstrap = "@working_dir@/SmallVols.bsr"
- Pool = SmallVols
-}
-
-
-Job {
- Name = "VerifyVolume"
- Type = Verify
- Level = VolumeToCatalog
- Client=@hostname@-fd
- FileSet="Full Set"
- Storage = File
- Messages = Standard
- Pool = Default
- Write Bootstrap = "@working_dir@/NightlySave.bsr"
-}
-
-
-
-# Standard Restore template, to be changed by Console program
-Job {
- Name = "RestoreFiles"
- Type = Restore
- Client=@hostname@-fd
- FileSet="Full Set"
- Storage = File
- Messages = Standard
- Pool = Default
- Where = /tmp/bacula-restores
-}
-
-
-# List of files to be backed up
-FileSet {
- Name = "Full Set"
- Include = signature=SHA1 {
- </tmp/file-list
- }
-}
-
-
-# Client (File Services) to backup
-Client {
- Name = @hostname@-fd
- Address = @hostname@
- FDPort = 8102
- Catalog = MyCatalog
- Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
- File Retention = 30d # 30 days
- Job Retention = 180d # six months
- AutoPrune = yes # Prune expired Jobs/Files
-}
-
-# Definiton of file storage device
-Storage {
- Name = File
- Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
- Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
- Device = FileStorage
- Media Type = File
-}
-
-Storage {
- Name = File1
- Address = @hostname@ # N.B. Use a fully qualified name here
- SDPort = 8103
- Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
- Device = FileStorage1
- Media Type = File1
-}
-
-
-# Generic catalog service
-Catalog {
- Name = MyCatalog
- dbname = bacula; user = bacula; password = ""
-}
-
-# Reasonable message delivery -- send most everything to email address
-# and to the console
-Messages {
- Name = Standard
- mailcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
- operatorcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
- MailOnError = @job_email@ = all
- operator = @job_email@ = mount
- console = all, !skipped
-
- append = "@working_dir@/log" = all, !skipped
-}
-
-Messages {
- Name = NoEmail
- mailcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
- console = all, !skipped
-
- append = "@working_dir@/log" = all, !skipped
-}
-
-
-# Default pool definition
-Pool {
- Name = Default
- Pool Type = Backup
- Recycle = yes # Bacula can automatically recycle Volumes
- AutoPrune = yes # Prune expired volumes
- Volume Retention = 365d # one year
- Accept Any Volume = yes # write on any volume in the pool
-}
-
-Pool {
- Name = SmallVols
- Pool Type = Backup
- Recycle = yes # Bacula can automatically recycle Volumes
- AutoPrune = yes # Prune expired volumes
- Volume Retention = 365d # one year
- Accept Any Volume = yes # write on any volume in the pool
- Maximum Volumes = 10
- MaximumVolumeBytes = 10M
- LabelFormat = Small
-}
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# to a tape then restore it.
-#
-cwd=`pwd`
-bin/bacula stop 2>&1 >/dev/null
-scripts/copy-tape-confs
-scripts/cleanup-tape
-echo "${cwd}/build" >/tmp/file-list
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting Bacula tape test ==="
-echo " === Starting Bacula tape test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0
-run job=NightlySave yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! Bacula tape test Bacula source failed!!! !!!!! "
- echo " !!!!! Bacula tape test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== Bacula tape test Bacula source OK ===== "
- echo " ===== Bacula tape test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# then restore it.
-#
-cwd=`pwd`
-scripts/copy-confs
-scripts/cleanup
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting Backup Bacula Test ==="
-echo " === Starting Backup Bacula Test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label volume=TestVolume001
-run job=Client1 yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! Backup Bacula Test failed!!! !!!!! "
- echo " !!!!! Backup Bacula Test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== Backup Bacula Test OK ===== "
- echo " ===== Backup Bacula Test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory but
-# split the archive into two volumes, then build a BSR with
-# the restore command and use bextract to restore the files.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting bextract-test ==="
-echo " === Starting bextract-test ===" >working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File1 volume=TestVolume001
-label storage=File1 volume=TestVolume002
-update Volume=TestVolume001 MaxVolBytes=3000000
-run job=NightlySave storage=File1 yes
-wait
-messages
-@#
-@# now build the bsr file
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-no
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-mkdir -p ${cwd}/tmp/bacula-restores
-bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! bextract-test Bacula source failed!!! !!!!! "
- echo " !!!!! bextract-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== bextract-test Bacula source OK ===== "
- echo " ===== bextract-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory but
-# split the archive into two volumes then bscan it
-# into the catalog after the backup. It also to a limited
-# extent tests the purge volume and delete volume commands.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting bscan-test ==="
-echo " === Starting bscan-test ===" >working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File1
-TestVolume001
-label storage=File1
-TestVolume002
-update Volume=TestVolume001 MaxVolBytes=3000000
-run job=NightlySave storage=File1
-yes
-wait
-messages
-@output /dev/null
-@#
-@# now purge the Volume
-@#
-purge volume=TestVolume001
-purge volume=TestVolume002
-delete volume=TestVolume001
-yes
-delete volume=TestVolume002
-yes
-messages
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-echo "volume=TestVolume001|TestVolume002" >tmp/bscan.bsr
-bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >/dev/null
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log2.out
-@#
-@# now do a restore
-@#
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! bscan-test Bacula source failed!!! !!!!! "
- echo " !!!!! bscan-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== bscan-test Bacula source OK ===== "
- echo " ===== bscan-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory but
-# split the archive into two volumes, then restore
-# files on only one of the volumes and ensure that
-# the other volume is not used. I.e. bsr optimization
-# works.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting bsr-opt-test ==="
-echo " === Starting bsr-opt-test ===" >working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File1 volume=TestVolume001
-label storage=File1 volume=TestVolume002
-update Volume=TestVolume001 MaxVolBytes=3000000
-run job=NightlySave storage=File1 yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current
-unmark *
-cd ${cwd}/build/src/cats
-mark *
-ls
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep TestVolume001 working/restore.bsr
-bsrstat=$?
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build/src/cats tmp/bacula-restores${cwd}/build/src/cats 2>&1 >/dev/null
-if [ $? != 0 -o $bsrstat != 1 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! bsr-opt-test Bacula source failed!!! !!!!! "
- echo " !!!!! bsr-opt-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== bsr-opt-test Bacula source OK ===== "
- echo " ===== bsr-opt-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory using the compressed option
-# then restore it.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting compressed-test ==="
-echo " === Starting compressed-test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-status all
-status all
-messages
-@output tmp/log1.out
-label storage=File volume=TestVolume001
-run job=CompressedTest yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores
-5
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! compressed-test Bacula source failed!!! !!!!! "
- echo " !!!!! compressed-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== compressed-test Bacula source OK ===== "
- echo " ===== compressed-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run two jobs at the same time
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/tmp/largefile" >/tmp/file-list
-if test -c /dev/urandom ; then
-# 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
-else
- echo "Creating a 56MB file with bacula-dir data ..."
- dd if=bin/bacula-dir of=${cwd}/tmp/1 bs=1024 count=1000
- cat ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 >${cwd}/tmp/2
- rm -f ${cwd}/tmp/1
- cat ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 >>${cwd}/tmp/3
- rm -f ${cwd}/tmp/2
- cat ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 >${cwd}/tmp/largefile
- rm -f ${cwd}/tmp/3
-fi
-
-echo "largefile created"
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting concurrent-jobs-test ==="
-echo " === Starting concurrent-jobs-test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File volume=TestVolume001
-run job=CompressedTest level=Full yes
-run job=CompressedTest level=Full yes
-run job=CompressedTest level=Full yes
-run job=CompressedTest level=Full yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores
-5
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! concurrent-jobs-test Bacula source failed!!! !!!!! "
- echo " !!!!! concurrent-jobs-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== concurrent-jobs-test Bacula source OK ===== "
- echo " ===== concurrent-jobs-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# then restore it.
-#
-echo " "
-echo " "
-echo " === /dev save/restore test ==="
-echo " "
-echo " "
-UID=`/usr/bin/id -u`
-if [ $UID != 0 ] ; then
- echo " "
- echo "You must be root to run this test."
- echo " ===== dev test failed!!! ===== "
- echo " ===== dev test failed!!! ===== " >>test.out
- echo " "
- exit 1
-fi
-cwd=`pwd`
-scripts/copy-test-confs
-echo "/dev" >/tmp/file-list
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-label storage=File
-TestVolume001
-run job=NightlySave
-yes
-wait
-messages
-@#
-@# now do a restore
-@#
-restore
-5
-done
-yes
-@sleep 1
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-cd /
-${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/original
-cd /tmp/bacula-restores
-${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/restored
-diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
-if [ $? != 0 ] ; then
- echo " "
- echo " "
- echo " ===== dev test failed!!! ===== "
- echo " ===== dev test failed!!! ===== " >>test.out
- echo " "
-else
- echo " ===== dev test OK ===== "
- echo " ===== dev test OK ===== " >>test.out
- cd ${cwd}
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# then restore it.
-#
-echo " "
-echo " "
-echo " === /etc save/restore test ==="
-echo " "
-echo " "
-UID=`/usr/bin/id -u`
-if [ $UID != 0 ] ; then
- echo " "
- echo "You must be root to run this test."
- echo " ===== Test4 failed!!! ===== "
- echo " ===== Test4 failed!!! ===== " >>test.out
- echo " "
- exit 1
-fi
-cwd=`pwd`
-scripts/copy-test-confs
-echo "/etc" >/tmp/file-list
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-label storage=File
-TestVolume001
-run job=NightlySave
-yes
-wait
-messages
-@#
-@# now do a restore
-@#
-restore
-5
-done
-yes
-@sleep 1
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-cd /
-${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/original
-cd /tmp/bacula-restores
-${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/restored
-diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
-if [ $? != 0 ] ; then
- echo " "
- echo " "
- echo " ===== Test4 /etc failed!!! ===== "
- echo " ===== Test4 failed!!! ===== " >>test.out
- echo " "
-else
- echo " ===== Test4 /etc OK ===== "
- echo " ===== Test4 OK ===== " >>test.out
- cd ${cwd}
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run two jobs at the same time
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting four-concurrent-jobs-test ==="
-echo " === Starting four-concurrent-jobs-test ===" >>working/log
-echo " "
-
-#bin/bacula start 2>&1 >/dev/null
-bin/bacula start
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File1
-TestVolume001
-label storage=File1
-TestVolume002
-update Volume=TestVolume001
-6
-100000000
-@#50000000
-10
-run job=NightlySave level=Full Storage=File1
-yes
-run job=NightlySave level=Full Storage=File1
-yes
-run job=NightlySave level=Full Storage=File1
-yes
-run job=NightlySave level=Full Storage=File1
-yes
-@sleep 2
-status dir
-@sleep 5
-messages
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores
-5
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! four-concurrent-jobs-test Bacula source failed!!! !!!!! "
- echo " !!!!! four-concurrent-jobs-test failed!!! !!!!! " >>test.out
- echo " "
- exit 1
-else
- echo " ===== four-concurrent-jobs-test Bacula source OK ===== "
- echo " ===== four-concurrent-jobs-test OK ===== " >>test.out
- scripts/cleanup
- exit 0
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# then restore it.
-#
-echo " "
-echo " "
-echo " === /lib save/restore test ==="
-echo " "
-echo " "
-UID=`/usr/bin/id -u`
-if [ $UID != 0 ] ; then
- echo " "
- echo "You must be root to run this test."
- echo " ===== Test5 failed!!! ===== "
- echo " ===== Test5 failed!!! ===== " >>test.out
- echo " "
- exit 1
-fi
-cwd=`pwd`
-scripts/copy-test-confs
-echo "/lib" >/tmp/file-list
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-label storage=File
-TestVolume001
-run job=NightlySave
-yes
-wait
-messages
-@#
-@# now do a restore
-@#
-restore
-5
-done
-yes
-@sleep 1
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-cd /
-${cwd}/bin/testls -e ${cwd}/scripts/exclude-lib-test lib >${cwd}/tmp/original
-cd /tmp/bacula-restores
-${cwd}/bin/testls -e ${cwd}/scripts/exclude-lib-test lib >${cwd}/tmp/restored
-diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
-if [ $? != 0 ] ; then
- echo " "
- echo " "
- echo " ===== Test5 /lib failed!!! ===== "
- echo " ===== Test5 failed!!! ===== " >>test.out
- echo " "
-else
- echo " ===== Test5 /lib OK ===== "
- echo " ===== Test5 OK ===== " >>test.out
- cd ${cwd}
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory but
-# create three volumes and do six backups causing the
-# volumes to be recycled, and cycling through the volumes
-# twice. Tests maxvoljobs and volretention.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting recycle-test ==="
-echo " === Starting recycle-test ===" >working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-label storage=File1 volume=TestVolume001
-label storage=File1 volume=TestVolume002
-label storage=File1 volume=TestVolume003
-update Volume=TestVolume001 volretention=10s
-update Volume=TestVolume001 maxvoljobs=1
-update Volume=TestVolume002 volretention=10s
-update Volume=TestVolume002 maxvoljobs=1
-update Volume=TestVolume003 volretention=10s
-update Volume=TestVolume003 maxvoljobs=1
-list volumes
-run job=NightlySave storage=File1 level=full yes
-wait
-messages
-list volumes
-run job=NightlySave storage=File1 level=full yes
-wait
-messages
-list volumes
-run job=NightlySave storage=File1 level=full yes
-wait
-messages
-list volumes
-@sleep 10
-run job=NightlySave storage=File1 level=full yes
-wait
-messages
-list volumes
-run job=NightlySave storage=File1 level=full yes
-wait
-messages
-@output tmp/log1.out
-list volumes
-run job=NightlySave storage=File1 level=full yes
-wait
-messages
-list volumes
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! recycle-test Bacula source failed!!! !!!!! "
- echo " !!!!! recycle-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== recycle-test Bacula source OK ===== "
- echo " ===== recycle-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory using the compressed option
-# then restore it.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/tmp/build" >/tmp/file-list
-mkdir ${cwd}/tmp/build
-cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
-cd ${cwd}/tmp/build
-ls >../1
-cd ..
-sed s%\^%${cwd}/tmp/build/% 1 >restore-list
-rm -f 1
-cd ${cwd}
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting restore-by-file-test ==="
-echo " === Starting restore-by-file-test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File volume=TestVolume001
-run job=CompressedTest yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores
-7
-<${cwd}/tmp/restore-list
-
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r tmp/build tmp/bacula-restores${cwd}/tmp/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! restore-by-file-test Bacula source failed!!! !!!!! "
- echo " !!!!! restore-by-file-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== restore-by-file-test Bacula source OK ===== "
- echo " ===== restore-by-file-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Create a 60MB file with random bytes. Back it up to 6 Volumes
-# each constrained to 10MB using the automatic labeling feature.
-#
-
-if test ! -c /dev/urandom ; then
- echo "No random device. Test skipped.\n"
- exit 0
-fi
-cwd=`pwd`
-scripts/copy-testa-confs
-scripts/cleanup
-echo "${cwd}/tmp/largefile" >/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
-echo "largefile created"
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting six-vol-test ==="
-echo " === Starting six-vol-test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-run job=MultiVol storage=File yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores
-5
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! six-vol-test Bacula source failed!!! !!!!! "
- echo " !!!!! six-vol-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== six-vol-test Bacula source OK ===== "
- echo " ===== six-vol-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# to a tape where the maximum tape file size is set to 1M
-#
-cwd=`pwd`
-bin/bacula stop 2>&1 >/dev/null
-scripts/copy-tape-confs
-scripts/cleanup-tape
-echo "${cwd}/build" >/tmp/file-list
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-out="tmp/sed_tmp"
-echo "s%# Maximum File Size% Maximum File Size%g" >${out}
-cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
-sed -f ${out} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
-
-echo " "
-echo " "
-echo " === Starting Small File Size test ==="
-echo " === Starting Small File Size test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0
-run job=NightlySave yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! Small File Size test Bacula source failed!!! !!!!! "
- echo " !!!!! Small File Size test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== Small File Size test Bacula source OK ===== "
- echo " ===== Small File Size test OK ===== " >>test.out
-# scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory but
-# split the archive into four volumes, two of which are
-# totally full. I.e. make sure that bsr selects all tapes
-# including those fully spanned.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting span-vol-test ==="
-echo " === Starting span-vol-test ===" >working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File1 volume=TestVolume001
-label storage=File1 volume=TestVolume002
-label storage=File1 volume=TestVolume003
-label storage=File1 volume=TestVolume004
-update Volume=TestVolume001 MaxVolBytes=3000000
-update Volume=TestVolume002 MaxVolBytes=3000000
-update Volume=TestVolume003 MaxVolBytes=3000000
-run job=NightlySave storage=File1 yes
-wait
-list volumes
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! span-vol-test Bacula source failed!!! !!!!! "
- echo " !!!!! span-vol-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== span-vol-test Bacula source OK ===== "
- echo " ===== span-vol-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory using the Sparse option
-# then restore it.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting sparse-compressed-test ==="
-echo " === Starting sparse-compressed-test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File volume=TestVolume001
-run job=SparseCompressedTest yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! sparse-compressed-test Bacula source failed!!! !!!!! "
- echo " !!!!! sparse-compressed-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== sparse-compressed-test Bacula source OK ===== "
- echo " ===== sparse-compressed-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory using the Sparse option
-# then restore it.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting sparse-test ==="
-echo " === Starting sparse-test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File volume=TestVolume001
-run job=SparseTest yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! sparse-test Bacula source failed!!! !!!!! "
- echo " !!!!! sparse-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== sparse-test Bacula source OK ===== "
- echo " ===== sparse-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-echo " " >test.out
-rm -f bin/working/*
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory using the compressed option
-# then backup a second time and finally restore it
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting two-jobs-test ==="
-echo " === Starting two-jobs-test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-estimate job=CompressedTest listing
-estimate job=CompressedTest listing
-estimate job=CompressedTest listing
-messages
-@output tmp/log1.out
-label storage=File volume=TestVolume001
-run job=CompressedTest yes
-wait
-messages
-quit
-END_OF_DATA
-echo "Backup 1 done"
-touch ${cwd}/build/src/dird/*.c
-#
-# run a second job
-#
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-run job=CompressedTest
-yes
-wait
-messages
-@#
-@# now do several restores to ensure we cleanup between jobs
-@#
-@output /dev/null
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! two-jobs-test Bacula source failed!!! !!!!! "
- echo " !!!!! two-jobs-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== two-jobs-test Bacula source OK ===== "
- echo " ===== two-jobs-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory but
-# split the archive into two volumes
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting two-vol-test ==="
-echo " === Starting two-vol-test ===" >working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File1 volume=TestVolume001
-label storage=File1 volume=TestVolume002
-update Volume=TestVolume001
-6
-3000000
-10
-run job=NightlySave storage=File1 yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! two-vol-test Bacula source failed!!! !!!!! "
- echo " !!!!! two-vol-test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== two-vol-test Bacula source OK ===== "
- echo " ===== two-vol-test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# to two tapes where the maximum tape file size is set to 1M
-#
-cwd=`pwd`
-bin/bacula stop 2>&1 >/dev/null
-scripts/copy-tape-confs
-mtx -f /dev/sg0 unload
-mtx -f /dev/sg0 load 1
-mt -f /dev/nst0 rewind
-mt -f /dev/nst0 weof
-mtx -f /dev/sg0 unload
-mtx -f /dev/sg0 load 2
-mt -f /dev/nst0 rewind
-mt -f /dev/nst0 weof
-mtx -f /dev/sg0 unload
-echo "${cwd}/build" >/tmp/file-list
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-out="tmp/sed_tmp"
-echo "s%# Maximum File Size% Maximum File Size%g" >${out}
-cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
-sed -f ${out} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
-
-echo " "
-echo " "
-echo " === Starting Two Volume Tape test ==="
-echo " === Starting Two Volume Tape test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=1
-label storage=DDS-4 volume=TestVolume002 slot=2
-update Volume=TestVolume001 MaxVolBytes=3000000
-run job=NightlySave yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! Two Volume Tape test Bacula source failed!!! !!!!! "
- echo " !!!!! Two Volume Tape test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== Two Volume Tape test Bacula source OK ===== "
- echo " ===== Two Volume Tape test OK ===== " >>test.out
-# scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# then verify the catalog.
-#
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting verify Volume Test ==="
-echo " === Starting verify Volume Test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File volume=TestVolume001
-run job=NightlySave yes
-wait
-messages
-@#
-@# now do a verify volume
-@#
-@output ${cwd}/tmp/original
-run job=VerifyVolume
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-sleep 2
-bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! Verify Volume failed!!! !!!!! "
- echo " !!!!! Verify Volume failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== Verify Volume Test OK ===== "
- echo " ===== Verify Volume Test OK ===== " >>test.out
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# then restore it.
-#
-if test ! -d weird-files ; then
- echo " "
- echo "Weird files not configured. Test not run."
- exit 0
-fi
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/weird-files" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting weird filenames test ==="
-echo " === Starting weird filenames test ===" >>working/log
-echo " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File
-TestVolume001
-run job=NightlySave
-yes
-wait
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-${cwd}/bin/testls weird-files >${cwd}/tmp/original
-cd tmp/bacula-restores${cwd}
-${cwd}/bin/testls weird-files >${cwd}/tmp/restored
-cd ${cwd}
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! Weird files test failed!!! !!!!! "
- echo " !!!!! Weird files test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== Weird files test OK ===== "
- echo " ===== Weird files test OK ===== " >>test.out
- cd ${cwd}
- scripts/cleanup
-fi
+++ /dev/null
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory
-# then restore it.
-#
-if test ! -d weird-files ; then
- echo " "
- echo "weird files not configured. Test not run."
- exit 0
-fi
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-rm -rf weird-files2
-cp -a weird-files weird-files2
-echo "${cwd}/weird-files2" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-
-echo " "
-echo " "
-echo " === Starting weird filenames2 test ==="
-echo " === Starting weird filenames2 test ===" >>working/log
-echo " "
-
-bin/testls weird-files2 >${cwd}/tmp/original
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@output tmp/log1.out
-label storage=File volume=TestVolume001
-run job=NightlySave yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-#
-# Now mess up the a hard link, and a soft link
-#
-cd weird-files2
-rm -f hard-file2
-ln hard-file3 hard-file2
-rm -f soft-file2
-ln -s soft-file3 soft-file2
-cd ${cwd}
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
-messages
-@#
-@# now do a restore
-@#
-@output tmp/log2.out
-restore where=
-5
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
-bin/testls weird-files2 >${cwd}/tmp/restored
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
-rstat=$?
-diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
- echo " "
- echo " "
- echo " !!!!! Weird files2 test failed!!! !!!!! "
- echo " !!!!! Weird files2 test failed!!! !!!!! " >>test.out
- echo " "
-else
- echo " ===== Weird files2 test OK ===== "
- echo " ===== Weird files2 test OK ===== " >>test.out
- cd ${cwd}
- scripts/cleanup
- rm -rf weird-files2
-fi