From: (no author) <(no author)@91ce42f0-d328-0410-95d8-f526ca767f89> Date: Tue, 20 Apr 2004 19:46:36 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create tag X-Git-Tag: Release-1.34.1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=44a3a434a9046cde1aabb29c2acef7e42bc7707e;p=bacula%2Fbacula This commit was manufactured by cvs2svn to create tag 'Release-1.34.1'. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/tags/Release-1.34.1@1257 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 5095fbedeb..f2ebbc0861 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,4 +1,5 @@ +2004-04-20 Version 1.34.1 20Apr04 Release 18Apr04 - Found and fixed SD crash during restore. - Added FreeBSD Bare Metal Recovery documentation by Alex Torres diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index 62f5e152f8..7b7789ac45 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -1,12 +1,17 @@ Release Notes for Bacula 1.34.1 - Bacula code: Total files = 343 Total lines = 98,503 (*.h *.c *.in) + Bacula code: Total files = 344 Total lines = 98,746 (*.h *.c *.in) Changes for 1.34.1: - Autochanger users, please note you must add %d to the end of the changer command line in your Device resource in your bacula-sd.conf file. +- There is a new wx-console program that does restores with a + tree allowing you to visually select what files are to be restored. + It is in a preliminary stage of development, but can be easily + be built under Linux with GTK, and with just a bit more difficulty + under Win32 with MinGW. - Fixed a major race condition in the job scheduler when multiple simultaneous jobs is enabled. This occurred only when on job had blocked another because of resource usage. diff --git a/bacula/src/filed/Makefile.mingw b/bacula/src/filed/Makefile.mingw deleted file mode 100644 index 0b1e154c85..0000000000 --- a/bacula/src/filed/Makefile.mingw +++ /dev/null @@ -1,231 +0,0 @@ -# -# Bacula Makefile for the File daemon -# -# Version $Id$ -# - - -# autoconf/Make.common.in -*- Makefile -*- -# release date (man), LSM date, version number/name, current maintainer -DATE="15 Apr 2004" -LSMDATE=15Apr04 -VERSION=1.35.0 -VERNAME=bacula-$(VERSION)# -MAINT=Kern Sibbald# -MAINTEMAIL=# -WEBMAINT=# -WEBMAINTEMAIL=# -WEBPAGE=# -FTPSITENAME=# -FTPSITEDIR=# -#------------------------------------------------------------------------- - -SHELL = /bin/sh - -# Installation target directories & other installation stuff -prefix = -exec_prefix = -binprefix = -manprefix = -sbindir = /sbin -sysconfdir = /etc/bacula -scriptdir = /etc/bacula -mandir = ${prefix}/man/man1 -manext = 1 - -# Tools & program stuff -CC = gcc -CPP = gcc -E -CXX = g++ -MV = /usr/bin/mv -RM = /usr/bin/rm -RMF = /usr/bin/rm -f -CP = /usr/bin/cp -SED = /usr/bin/sed -AWK = /usr/bin/awk -ECHO = /usr/bin/echo -CMP = /usr/bin/cmp -TBL = /usr/bin/tbl -AR = /usr/bin/ar -RANLIB = /usr/bin/ranlib -INSTALL = /usr/bin/install -c -# add the -s to the following in PRODUCTION mode -INSTALL_PROGRAM = /usr/bin/install -c -m 754 -INSTALL_DATA = /usr/bin/install -c -m 644 -INSTALL_SCRIPT = /usr/bin/install -c -m 754 -INSTALL_CONFIG = /usr/bin/install -c -m 640 - -# Flags & libs -CFLAGS = -g -O2 -CPPFLAGS = -LDFLAGS = -O -TTOOL_LDFLAGS = -DEFS = -DHAVE_WIN32 -DHAVE_MINGW -LIBS = -lpthreadGC -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool \ - -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32 \ - -lmsvcrt -DINCLUDE = -DLIB = -DB_LIBS = - -# Windows (cygwin) flags -WCFLAGS = -mwindows -WLDFLAGS = -mwindows -Wl,--subsystem,windows -mthreads - -# X Include directory -#XINC = @XPM_CFLAGS@ - -# extra libraries needed by X on some systems, X library location -#XLIB = @XPM_LIBS@ -lX11 - -# End of common section of the Makefile -#------------------------------------------------------------------------- - -srcdir = . -VPATH = . -.PATH: . - -# one up -basedir = .. -# top dir -topdir = ../.. -# this dir relative to top dir -thisdir = src/filed - -DEBUG= - -first_rule: all -dummy: - -# -SVRSRCS = filed.c authenticate.c backup.c estimate.c \ - filed_conf.c heartbeat.c job.c \ - restore.c status.c verify.c verify_vol.c -SVROBJS = filed.o authenticate.o backup.o estimate.o \ - filed_conf.o heartbeat.o job.o \ - restore.o status.o verify.o verify_vol.o - -# these are the objects that are changed by the .configure process -EXTRAOBJS = - -FDLIBS = -lz # extra libs for File daemon - -# extra items for linking on Win32 -WIN32OBJS = win32/winmain.o win32/winlib.a win32/winres.res -win32 = $(WIN32OBJS) - -WIN32LIBS = $(win32) - -.SUFFIXES: .c .o -.PHONY: -.DONTCARE: - -# inference rules -.c.o: - $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) -I../win32/compat $(DINCLUDE) $(CFLAGS) $< -#------------------------------------------------------------------------- -all: win32 bacula-fd - @echo "==== Make of filed is good ====" - @echo " " - -win32/winlib.a: - (cd win32; $(MAKE) -f Makefile.mingw DESTDIR=$(DESTDIR)) - @rm -f bacula-fd.exe - -win32/winmain.o: - (cd win32; $(MAKE) -f Makefile.mingw DESTDIR=$(DESTDIR)) - @rm -f bacula-fd.exe - -win32/winres.res: - (cd win32; $(MAKE) -f Makefile.mingw DESTDIR=$(DESTDIR)) - @rm -f bacula-fd.exe - -# win32 libraries if needed -win32: $(WIN32OBJS) - (cd win32; $(MAKE) -f Makefile.mingw DESTDIR=$(DESTDIR)) - @rm -f bacula-fd.exe - -bacula-fd: $(SVROBJS) ../findlib/libfind.a ../lib/libbac.a win32 - $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \ - $(WIN32LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(DLIB) - -static-bacula-fd: $(SVROBJS) ../findlib/libfind.a ../lib/libbac.a win32 - $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \ - $(WIN32LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(DLIB) - strip $@ - -../findlib/libfind.a: ../findlib/*.c - (cd ../findlib/; $(MAKE) -f Makefile.mingw DESTDIR=$(DESTDIR)) - @rm -f bacula-fd.exe - -../lib/libbac.a: ../lib/*.c* - (cd ../lib/; $(MAKE) -f Makefile.mingw DESTDIR=$(DESTDIR)) - @rm -f bacula-fd.exe - -clean: - @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 - @$(RMF) static-bacula-fd - if test -f win32/Makefile; then \ - (cd win32; $(MAKE) clean); \ - fi - -realclean: clean - @$(RMF) tags bacula-fd.conf - -distclean: realclean - if test $(srcdir) = .; then $(MAKE) realclean; fi - (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS) - if test -f win32/Makefile; then \ - (cd win32; $(MAKE) distclean); \ - fi - -devclean: realclean - if test $(srcdir) = .; then $(MAKE) realclean; fi - (cd $(srcdir); $(RMF) Makefile) - if test -f win32/Makefile; then \ - (cd win32; $(MAKE) devclean); \ - fi - -install: all - $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd - @srcconf=bacula-fd.conf; \ - if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \ - destconf=$$srcconf.new; \ - echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \ - else \ - destconf=$$srcconf; \ - fi; \ - echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \ - ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf - @if test -f static-bacula-fd; then \ - $(INSTALL_PROGRAM) static-bacula-fd $(DESTDIR)$(sbindir)/static-bacula-fd; \ - fi - - - -uninstall: - (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd) - (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd.conf) - (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd.conf.new) - - - -# Semi-automatic generation of dependencies: -# Use gcc -MM because X11 `makedepend' doesn't work on all systems -# and it also includes system headers. -# `semi'-automatic since dependencies are generated at distribution time. - -depend: - @$(MV) Makefile Makefile.bak - @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile - @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile - @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile - @if test -f Makefile ; then \ - $(RMF) Makefile.bak; \ - else \ - $(MV) Makefile.bak Makefile; \ - echo -e "Something went wrong\n\a"; \ - fi - -# ----------------------------------------------------------------------- -# DO NOT DELETE: nice dependency list follows diff --git a/bacula/src/filed/win32/Makefile.mingw b/bacula/src/filed/win32/Makefile.mingw deleted file mode 100644 index 978699c2d5..0000000000 --- a/bacula/src/filed/win32/Makefile.mingw +++ /dev/null @@ -1,125 +0,0 @@ -# -# makefile to build Windows specific pieces of the Bacula File daemon -# -# Version $Id$ -# -CFLAGS=-g -O2 -DHAVE_WIN32 -DHAVE_MINGW -WCFLAGS=-mwindows -I../../win32/compat -CC = gcc -CXX = g++ -RANLIB = /usr/bin/ranlib -SHELL = /bin/sh - -# Program to install `make'. -INSTALL_PROGRAM = ${INSTALL} -# Program to install the man page. -INSTALL_DATA = ${INSTALL} -m 644 -# Generic install program. -INSTALL = /usr/bin/install -c - -VERSION = 1.35.0 - - -# this dir -srcdir = . -# main dir -topdir = ../../.. -# this dir relative to top dir -thisdir = src/filed/win32 - -# Common prefix for machine-independent installed files. -prefix = -sysconfdir = /etc/bacula -sbindir = /sbin -piddir = /var/run - -SRCS = shutdown.c - -OBJS = shutdown.o - -BACOBJS = winabout.o winevents.o winservice.o winstat.o wintray.o winmain.o - -all: winlib.a winres.res - -win32: winlib.a - -winlib.a: $(BACOBJS) winres.res - ar rcs $@ $(BACOBJS) - -winres.res: winres.rc bacula.ico winres.h idle.ico running.ico error.ico - windres -DHAVE_MINGW $< -O coff -o $@ - -winmain.o: winmain.cpp winbacula.h - $(CC) -c $(WCFLAGS) $(CFLAGS) $< - -libmymapi32.a: mymapi32.def - dlltool --as=as -k --output-lib $@ --def $< - -Makefile: $(srcdir)/Makefile.in $(topdir)/config.status - cd $(topdir) \ - && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -clean: - rm -f *.exe *.o *.res *.a 1 2 3 - rm -f bin/smtp.exe bin/console.exe - rm -f bin/bacula-fd.exe bin/bsmtp.exe bin/testfind.exe - -distclean: clean - @rm -f Makefile - @rm -rf bin/CVS CVS - -devclean: clean - @rm -f Makefile - -install: - @mkdir -p $(DESTDIR)$(sbindir) $(DESTDIR)/tmp $(DESTDIR)$(sbindir)/../working - @echo "Installing system binary files ..." - @strip ../bacula-fd.exe - @strip ../../tools/bsmtp.exe - @strip ../../tools/testfind.exe - @strip ../../console/bconsole.exe - @cp -f ../bacula-fd.exe bin/ - @cp -f ../../tools/bsmtp.exe bin/ - @cp -f ../../tools/testfind.exe bin/ - @cp -f ../../console/bconsole.exe bin/ - @cp -f bin/* $(DESTDIR)$(sbindir) - @cp -f ../bacula-fd.conf $(DESTDIR)$(sysconfdir)/bacula-fd.conf.new - @cp -f ../../console/bconsole.conf $(DESTDIR)$(sysconfdir)/bconsole.conf.new - -# Make a Win32 binary release -binary-release: - @rm -rf wr - @mkdir -p wr - @mkdir -p wr/$(prefix) wr/$(sbindir) wr/$(sbindir)/../working wr/$(sysconfdir) wr/tmp - @echo "Copying system binary files ..." - @cp bin/* wr/$(sbindir) - @strip ../bacula-fd.exe - @strip ../../tools/bsmtp.exe - @strip ../../tools/testfind.exe - @strip ../../console/bconsole.exe - @echo "Copying executables ..." - @cp -f ../bacula-fd.exe wr/$(sbindir)/bacula-fd.exe - @cp -f ../../tools/bsmtp.exe wr/$(sbindir)/bsmtp.exe - @cp -f ../../tools/testfind.exe wr/$(sbindir)/testfind.exe - @cp -f ../../console/bconsole.exe wr/$(sbindir)/bconsole.exe - @echo "Copying bacula-fd.conf..." - @cp -f ../bacula-fd.conf wr/$(sysconfdir)/bacula-fd.conf.new - @cp -f ../../console/bconsole.conf wr/$(sysconfdir)/bconsole.conf.new -# the two dummy files are necessary to insure that WinZip -# actually creates the directories. - @echo "dummy" >wr/tmp/dummy.txt - @echo "dummy" >wr/$(sbindir)/../working/dummy.txt - @echo "Making tar file ..." - @tar cfz winbacula-${VERSION}.tar.gz -C wr bacula tmp - @mv -f winbacula-${VERSION}.tar.gz $(topdir)/.. - @rm -rf wr - @(cd $(topdir)/..; \ - echo "Tar file in: `pwd`/winbacula-${VERSION}.tar.gz") - -dummy: - -.c.o: - $(CC) -c $(WCFLAGS) $(CFLAGS) $< - -.cpp.o: - $(CXX) -c $(WCFLAGS) $(CFLAGS) $< diff --git a/bacula/src/findlib/Makefile.mingw b/bacula/src/findlib/Makefile.mingw deleted file mode 100644 index 5cc0fdd2c0..0000000000 --- a/bacula/src/findlib/Makefile.mingw +++ /dev/null @@ -1,162 +0,0 @@ -# -# Find files library Makefile -# - -# autoconf/Make.common.in -*- Makefile -*- -# release date (man), LSM date, version number/name, current maintainer -DATE="15 Apr 2004" -LSMDATE=15Apr04 -VERSION=1.35.0 -VERNAME=bacula-$(VERSION)# -MAINT=Kern Sibbald# -MAINTEMAIL=# -WEBMAINT=# -WEBMAINTEMAIL=# -WEBPAGE=# -FTPSITENAME=# -FTPSITEDIR=# -#------------------------------------------------------------------------- - -SHELL = /bin/sh - -# Installation target directories & other installation stuff -prefix = -exec_prefix = -binprefix = -manprefix = -sbindir = /sbin -sysconfdir = /etc/bacula -scriptdir = /etc/bacula -mandir = ${prefix}/man/man1 -manext = 1 - -# Tools & program stuff -CC = gcc -CPP = gcc -E -CXX = g++ -MV = /usr/bin/mv -RM = /usr/bin/rm -RMF = /usr/bin/rm -f -CP = /usr/bin/cp -SED = /usr/bin/sed -AWK = /usr/bin/awk -ECHO = /usr/bin/echo -CMP = /usr/bin/cmp -TBL = /usr/bin/tbl -AR = ar -RANLIB = ranlib -INSTALL = /usr/bin/install -c -# add the -s to the following in PRODUCTION mode -INSTALL_PROGRAM = /usr/bin/install -c -m 754 -INSTALL_DATA = /usr/bin/install -c -m 644 -INSTALL_SCRIPT = /usr/bin/install -c -m 754 -INSTALL_CONFIG = /usr/bin/install -c -m 640 - -# Flags & libs -CFLAGS = -g -O2 -CPPFLAGS = -LDFLAGS = -O -TTOOL_LDFLAGS = -DEFS = -DHAVE_WIN32 -DHAVE_MINGW -LIBS = -lpthread -DINCLUDE = -DLIB = -DB_LIBS = - -# Windows (cygwin) flags -WCFLAGS = -mwindows -WLDFLAGS = -mwindows - -# X Include directory -#XINC = @XPM_CFLAGS@ - -# extra libraries needed by X on some systems, X library location -#XLIB = @XPM_LIBS@ -lX11 - -# End of common section of the Makefile -#------------------------------------------------------------------------- - -srcdir = . -VPATH = . -.PATH: . - -# one up -basedir = .. -# top dir -topdir = ../.. -# this dir relative to top dir -thisdir = src/findlib - -DEBUG= - -first_rule: all -dummy: - -# -LIBSRCS = find.c match.c find_one.c attibs.c create_file.c \ - bfile.c enable_priv.c makepath.c save-cwd.c winapi.c -LIBOBJS = find.o match.o find_one.o attribs.o create_file.o \ - bfile.o enable_priv.o makepath.o save-cwd.o winapi.o - -.SUFFIXES: .c .o -.PHONY: -.DONTCARE: - -# inference rules -.c.o: - $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) -I../win32/compat $(DINCLUDE) $(CFLAGS) $< -#------------------------------------------------------------------------- -all: libfind.a - @echo "==== Make of findlib is good ====" - @echo " " - -libfind.a: $(LIBOBJS) - $(RMF) $@ - $(AR) cr $@ $(LIBOBJS) - $(RANLIB) $@ - -install: - -uninstall: - - -clean: - $(RMF) find core a.out *.a *.o *.bak *~ *.intpro *.extpro 1 2 3 - -realclean: clean - $(RMF) tags - -distclean: realclean - if test $(srcdir) = .; then $(MAKE) realclean; fi - (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS) - -devclean: realclean - if test $(srcdir) = .; then $(MAKE) realclean; fi - (cd $(srcdir); $(RMF) Makefile) - -install: - - -uninstall: - - - -# Semi-automatic generation of dependencies: -# Use gcc -M because X11 `makedepend' doesn't work on all systems -# and it also includes system headers. -# `semi'-automatic since dependencies are generated at distribution time. - -depend: - @$(MV) Makefile Makefile.bak - @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile - @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile - @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile - @if test -f Makefile ; then \ - $(RMF) Makefile.bak; \ - else \ - $(MV) Makefile.bak Makefile; \ - echo -e "Something went wrong\n\a"; \ - fi - -# ----------------------------------------------------------------------- -# DO NOT DELETE: nice dependency list follows diff --git a/bacula/src/version.h b/bacula/src/version.h index 582adec3bd..1b5d48ef8b 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -2,8 +2,8 @@ #undef VERSION #define VERSION "1.34.1" #define VSTRING "1" -#define BDATE "19 Apr 2004" -#define LSMDATE "19Apr04" +#define BDATE "20 Apr 2004" +#define LSMDATE "20Apr04" /* Debug flags */ #undef DEBUG diff --git a/bacula/src/wx-console/CHANGELOG b/bacula/src/wx-console/CHANGELOG index ba42871465..85f446ab90 100644 --- a/bacula/src/wx-console/CHANGELOG +++ b/bacula/src/wx-console/CHANGELOG @@ -1,8 +1,3 @@ -18-04-2004 : - - wxbRestorePanel : wxTreeCtrl::GetParent changed in GetItemParent (thanks to Luca Berra) - - wxbRestorePanel : The user can now change a part of restore - configuration - 17-04-2004 : - wxbRestorePanel modified to use wxbDataParsers - created wxbDataTokenizer, which fetches commands results diff --git a/bacula/src/wx-console/Makefile.mingw b/bacula/src/wx-console/Makefile.mingw index 89612811a3..7b051b2829 100644 --- a/bacula/src/wx-console/Makefile.mingw +++ b/bacula/src/wx-console/Makefile.mingw @@ -1,5 +1,5 @@ -CPP = g++.exe -D__DEBUG__ -DHAVE_MINGW -DHAVE_WIN32 -CC = gcc.exe -D__DEBUG__ -DHAVE_MINGW -DHAVE_WIN32 +CPP = g++.exe -D__DEBUG__ -DHAVE_MINGW +CC = gcc.exe -D__DEBUG__ -DHAVE_MINGW WINDRES = windres.exe RES = wx-console_private.res OBJ = main.o console_thread.o authenticate.o console_conf.o wxbrestorepanel.o wxbmainframe.o wxbtableparser.o wxbtreectrl.o wxblistctrl.o wxbutils.o $(RES) @@ -19,13 +19,9 @@ all: all-before wx-console.exe all-after clean: clean-custom rm -f $(OBJ) $(BIN) -$(BIN): $(OBJ) ../lib/libbac.a +$(BIN): $(OBJ) $(CPP) $(LINKOBJ) -o "wx-console.exe" $(LIBS) -../lib/libbac.a: ../lib/*.c* - (cd ../lib/; $(MAKE) -f Makefile.mingw DESTDIR=$(DESTDIR)) - @rm -f bacula-fd.exe - main.o: main.cpp $(CPP) -c main.cpp -o main.o $(CXXFLAGS) diff --git a/bacula/src/wx-console/TODO b/bacula/src/wx-console/TODO index 002a301193..177ff76f6b 100644 --- a/bacula/src/wx-console/TODO +++ b/bacula/src/wx-console/TODO @@ -3,32 +3,21 @@ FEATURES wxbRestorePanel : Add buttons to mark/unmark directories/files. +wxbRestorePanel : Allow the user to choose where he wants to restore his files + wxbRestorePanel : Add a button to force the refreshing of the whole tree wxbRestorePanel : Add a timeout when waiting for commands results wxbRestorePanel : Check more carefully which job we just have run. -wxbRestorePanel : Check if commands run successfully (cd, mark, mods...). - -wxbRestorePanel : Lock configure items until first configuration is received - -wxbRestorePanel : Remove estimate, which slows the restore process - -GTK : Improve look - -general : Don't concatenate lines in csprint, but in wxbDataTokenizer - (necessary for dot commands) - -general : use dot commands +wxbRestorePanel : Check if commands run successfully (cd, mark...). wxbTableParser : Replace wxHashMap by wxArray console_thread : Allow the user to choose his config file. -wxblistctrl/wxbtreectrl : Find why events are not forwarded correctly - to parent' parent, and correct bad actual implementation. - (remove wxbTreeListPanel) +general : use dot commands BUGS ---- diff --git a/bacula/src/wx-console/wxbrestorepanel.cpp b/bacula/src/wx-console/wxbrestorepanel.cpp index fcefcacdd6..a6e2dea752 100644 --- a/bacula/src/wx-console/wxbrestorepanel.cpp +++ b/bacula/src/wx-console/wxbrestorepanel.cpp @@ -15,33 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Note concerning "done" output (modifiable marked with +) -Run Restore job -JobName: RestoreFiles -Bootstrap: /var/lib/bacula/restore.bsr -+Where: /tmp/bacula-restores -+Replace: always -FileSet: Full Set -Client: tom-fd -Storage: File -+When: 2004-04-18 01:18:56 -+Priority: 10 -OK to run? (yes/mod/no):mod -Parameters to modify: - 1: Level (not appropriate) - 2: Storage (automatic ?) - 3: Job (no) - 4: FileSet (no) - 5: Client (no) - 6: When (yes : "Please enter desired start time as YYYY-MM-DD HH:MM:SS (return for now):") - 7: Priority (yes : "Enter new Priority: (positive integer)") - 8: Bootstrap (?) - 9: Where (yes : "Please enter path prefix for restore (/ for none):") - 10: Replace (yes : "Replace:\n 1: always\n 2: ifnewer\n 3: ifolder\n 4: never\n - Select replace option (1-4):") - 11: JobId (no) -Select parameter to modify (1-11): - */ #include "wxbrestorepanel.h" @@ -70,7 +43,7 @@ class wxbTreeItemData : public wxTreeItemData { ~wxbTreeItemData(); wxString GetPath(); wxString GetName(); - + int GetMarked(); void SetMarked(int marked); void SetMarked(wxString marked); @@ -164,41 +137,20 @@ enum RestoreStart = 1, TreeCtrl = 2, ListCtrl = 3, - ClientChoice = 4, - ConfigOk = 5, - ConfigApply = 6, - ConfigCancel = 7, - ConfigWhere = 8, - ConfigReplace = 9, - ConfigWhen = 10, - ConfigPriority = 11 + ClientChoice = 4 }; BEGIN_EVENT_TABLE(wxbRestorePanel, wxPanel) EVT_BUTTON(RestoreStart, wxbRestorePanel::OnStart) - EVT_CHOICE(ClientChoice, wxbRestorePanel::OnClientChoiceChanged) - EVT_TREE_SEL_CHANGING(TreeCtrl, wxbRestorePanel::OnTreeChanging) EVT_TREE_SEL_CHANGED(TreeCtrl, wxbRestorePanel::OnTreeChanged) EVT_TREE_ITEM_EXPANDING(TreeCtrl, wxbRestorePanel::OnTreeExpanding) EVT_LIST_ITEM_ACTIVATED(ListCtrl, wxbRestorePanel::OnListActivated) - - /*EVT_TREE_MARKED_EVENT(wxID_ANY, wxbRestorePanel::OnTreeMarked) - EVT_LIST_MARKED_EVENT(wxID_ANY, wxbRestorePanel::OnListMarked)*/ - - EVT_TEXT(ConfigWhere, wxbRestorePanel::OnConfigUpdated) - EVT_TEXT(ConfigWhen, wxbRestorePanel::OnConfigUpdated) - EVT_TEXT(ConfigPriority, wxbRestorePanel::OnConfigUpdated) - EVT_CHOICE(ConfigReplace, wxbRestorePanel::OnConfigUpdated) - - EVT_BUTTON(ConfigOk, wxbRestorePanel::OnConfigOk) - EVT_BUTTON(ConfigApply, wxbRestorePanel::OnConfigApply) - EVT_BUTTON(ConfigCancel, wxbRestorePanel::OnConfigCancel) -END_EVENT_TABLE() -BEGIN_EVENT_TABLE(wxbTreeListPanel, wxPanel) - EVT_TREE_MARKED_EVENT(wxID_ANY, wxbTreeListPanel::OnTreeMarked) - EVT_LIST_MARKED_EVENT(wxID_ANY, wxbTreeListPanel::OnListMarked) + EVT_TREE_MARKED_EVENT(wxID_ANY, wxbRestorePanel::OnTreeMarked) + EVT_LIST_MARKED_EVENT(wxID_ANY, wxbRestorePanel::OnListMarked) + + EVT_CHOICE(ClientChoice, wxbRestorePanel::OnClientChoiceChanged) END_EVENT_TABLE() /* @@ -210,9 +162,9 @@ wxbRestorePanel::wxbRestorePanel(wxWindow* parent): wxbPanel(parent) { imagelist->Add(wxIcon(marked_xpm)); imagelist->Add(wxIcon(partmarked_xpm)); - wxFlexGridSizer* mainSizer = new wxFlexGridSizer(3, 1, 10, 10); - mainSizer->AddGrowableCol(0); - mainSizer->AddGrowableRow(1); + wxFlexGridSizer *sizer = new wxFlexGridSizer(3, 1, 10, 10); + sizer->AddGrowableCol(0); + sizer->AddGrowableRow(1); wxBoxSizer *firstSizer = new wxBoxSizer(wxHORIZONTAL); @@ -227,19 +179,17 @@ wxbRestorePanel::wxbRestorePanel(wxWindow* parent): wxbPanel(parent) { jobChoice = new wxChoice(this, -1, wxDefaultPosition, wxSize(150, 30), 0, elist); firstSizer->Add(jobChoice, 1, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 10); - mainSizer->Add(firstSizer, 1, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 10); + sizer->Add(firstSizer, 1, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 10); - treelistPanel = new wxbTreeListPanel(this); - - wxFlexGridSizer* treelistSizer = new wxFlexGridSizer(1, 2, 10, 10); + wxFlexGridSizer *secondSizer = new wxFlexGridSizer(1, 2, 10, 10); - tree = new wxbTreeCtrl(treelistPanel, TreeCtrl, wxDefaultPosition, wxSize(200,50)); - treelistSizer->Add(tree, 1, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 10); + tree = new wxbTreeCtrl(this, TreeCtrl, wxDefaultPosition, wxSize(200,50)); + secondSizer->Add(tree, 1, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 10); tree->SetImageList(imagelist); - - list = new wxbListCtrl(treelistPanel, ListCtrl, wxDefaultPosition, wxDefaultSize); - treelistSizer->Add(list, 1, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 10); + + list = new wxbListCtrl(this, ListCtrl, wxDefaultPosition, wxDefaultSize); + secondSizer->Add(list, 1, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 10); list->SetImageList(imagelist, wxIMAGE_LIST_SMALL); @@ -273,85 +223,19 @@ wxbRestorePanel::wxbRestorePanel(wxWindow* parent): wxbPanel(parent) { info.SetAlign(wxLIST_FORMAT_RIGHT); list->InsertColumn(6, info); - treelistSizer->AddGrowableCol(1); - treelistSizer->AddGrowableRow(0); - - treelistPanel->SetSizer(treelistSizer); - treelistSizer->SetSizeHints(treelistPanel); - - restorePanel = new wxPanel(this, -1); - - wxBoxSizer* restoreSizer = new wxBoxSizer(wxVERTICAL); - - wxGridSizer* cfgSizer = new wxGridSizer(9, 2, 5, 5); - - cfgJobname = new wxStaticText(restorePanel, -1, " ", wxDefaultPosition, wxSize(150, 15), wxALIGN_LEFT); - cfgBootstrap = new wxStaticText(restorePanel, -1, " ", wxDefaultPosition, wxSize(150, 15), wxALIGN_LEFT); - cfgWhere = new wxTextCtrl(restorePanel, ConfigWhere, "", wxDefaultPosition, wxSize(150, 15)); - elist = new wxString[4]; - elist[0] = "always"; - elist[1] = "ifnewer"; - elist[2] = "ifolder"; - elist[3] = "never"; - cfgReplace = new wxChoice(restorePanel, ConfigReplace, wxDefaultPosition, wxSize(150, 15), 4, elist); - cfgFileset = new wxStaticText(restorePanel, -1, " ", wxDefaultPosition, wxSize(150, 15), wxALIGN_LEFT); - cfgClient = new wxStaticText(restorePanel, -1, " ", wxDefaultPosition, wxSize(150, 15), wxALIGN_LEFT); - cfgStorage = new wxStaticText(restorePanel, -1, " ", wxDefaultPosition, wxSize(150, 15), wxALIGN_LEFT); - cfgWhen = new wxTextCtrl(restorePanel, ConfigWhen, "0000-00-00 00:00:00", wxDefaultPosition, wxSize(150, 15)); - cfgPriority = new wxTextCtrl(restorePanel, ConfigPriority, "", wxDefaultPosition, wxSize(50, 15)); - - cfgSizer->Add(new wxStaticText(restorePanel, -1, "Job Name: ", wxDefaultPosition, wxSize(150, 15), wxALIGN_RIGHT), 1, wxEXPAND); - cfgSizer->Add(cfgJobname, 1, wxEXPAND); - cfgSizer->Add(new wxStaticText(restorePanel, -1, "Bootstrap: ", wxDefaultPosition, wxSize(150, 15), wxALIGN_RIGHT), 1, wxEXPAND); - cfgSizer->Add(cfgBootstrap, 1, wxEXPAND); - cfgSizer->Add(new wxStaticText(restorePanel, -1, "Where: ", wxDefaultPosition, wxSize(150, 15), wxALIGN_RIGHT), 1, wxEXPAND); - cfgSizer->Add(cfgWhere, 1, wxEXPAND); - cfgSizer->Add(new wxStaticText(restorePanel, -1, "Replace: ", wxDefaultPosition, wxSize(150, 15), wxALIGN_RIGHT), 1, wxEXPAND); - cfgSizer->Add(cfgReplace, 1, wxEXPAND); - cfgSizer->Add(new wxStaticText(restorePanel, -1, "Fileset: ", wxDefaultPosition, wxSize(150, 15), wxALIGN_RIGHT), 1, wxEXPAND); - cfgSizer->Add(cfgFileset, 1, wxEXPAND); - cfgSizer->Add(new wxStaticText(restorePanel, -1, "Client: ", wxDefaultPosition, wxSize(150, 15), wxALIGN_RIGHT), 1, wxEXPAND); - cfgSizer->Add(cfgClient, 1, wxEXPAND); - cfgSizer->Add(new wxStaticText(restorePanel, -1, "Storage: ", wxDefaultPosition, wxSize(150, 15), wxALIGN_RIGHT), 1, wxEXPAND); - cfgSizer->Add(cfgStorage, 1, wxEXPAND); - cfgSizer->Add(new wxStaticText(restorePanel, -1, "When: ", wxDefaultPosition, wxSize(150, 15), wxALIGN_RIGHT), 1, wxEXPAND); - cfgSizer->Add(cfgWhen, 1, wxEXPAND); - cfgSizer->Add(new wxStaticText(restorePanel, -1, "Priority: ", wxDefaultPosition, wxSize(150, 15), wxALIGN_RIGHT), 1, wxEXPAND); - cfgSizer->Add(cfgPriority, 1, wxEXPAND); - - restoreSizer->Add(cfgSizer, 1, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL, 5); - - wxBoxSizer* restoreBottomSizer = new wxBoxSizer(wxHORIZONTAL); - - cfgOk = new wxButton(restorePanel, ConfigOk, "OK", wxDefaultPosition, wxSize(70, 25)); - restoreBottomSizer->Add(cfgOk, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10); + secondSizer->AddGrowableCol(1); + secondSizer->AddGrowableRow(0); - cfgApply = new wxButton(restorePanel, ConfigApply, "Apply", wxDefaultPosition, wxSize(70, 25)); - restoreBottomSizer->Add(cfgApply, 1, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 10); - - cfgCancel = new wxButton(restorePanel, ConfigCancel, "Cancel", wxDefaultPosition, wxSize(70, 25)); - restoreBottomSizer->Add(cfgCancel, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, 10); - - restoreSizer->Add(restoreBottomSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL, 5); - - restorePanel->SetSizer(restoreSizer); - restoreSizer->SetSizeHints(restorePanel); - - restorePanel->Show(false); - - centerSizer = new wxBoxSizer(wxHORIZONTAL); - //centerSizer->Add(treelistSizer, 1, wxEXPAND); - - mainSizer->Add(centerSizer, 1, wxEXPAND, 10); + sizer->Add(secondSizer, 1, wxEXPAND, 10); gauge = new wxGauge(this, -1, 1, wxDefaultPosition, wxSize(200,20)); - mainSizer->Add(gauge, 1, wxEXPAND, 5); + sizer->Add(gauge, 1, wxEXPAND, 5); gauge->SetValue(0); gauge->Enable(false); - SetSizer(mainSizer); - mainSizer->SetSizeHints(this); + SetSizer(sizer); + sizer->SetSizeHints(this); SetStatus(disabled); @@ -428,7 +312,8 @@ void wxbRestorePanel::CmdStart() { tree->Expand(root); } else if (status == choosing) { - SetStatus(configuring); + SetStatus(restoring); + wxbMainFrame::GetInstance()->SetStatusText("Restoring, please wait..."); totfilemessages = 0; @@ -463,8 +348,6 @@ void wxbRestorePanel::CmdStart() { } } - UpdateConfig(dt); - delete dt; if (totfilemessages == 0) { @@ -473,11 +356,7 @@ void wxbRestorePanel::CmdStart() { SetStatus(finished); return; } - } - else if (status == configuring) { - wxbDataTokenizer* dt; - - SetStatus(restoring); + WaitForEnd("yes\n"); gauge->SetValue(0); @@ -557,86 +436,6 @@ void wxbRestorePanel::CmdStart() { } } -/* Apply configuration changes */ - -/* 1: Level (not appropriate) - * 2: Storage (automatic ?) - * 3: Job (no) - * 4: FileSet (no) - * 5: Client (no) - * 6: When (yes : "Please enter desired start time as YYYY-MM-DD HH:MM:SS (return for now):") - * 7: Priority (yes : "Enter new Priority: (positive integer)") - * 8: Bootstrap (?) - * 9: Where (yes : "Please enter path prefix for restore (/ for none):") - * 10: Replace (yes : "Replace:\n 1: always\n 2: ifnewer\n 3: ifolder\n 4: never\n - * Select replace option (1-4):") - * 11: JobId (no) - */ - -void wxbRestorePanel::CmdConfigApply() { - if (cfgUpdated == 0) return; - - wxbDataTokenizer* dt = NULL; - while (cfgUpdated > 0) { - wxString def; //String to send if can't use our data - if ((cfgUpdated >> ConfigWhere) & 1) { - WaitForEnd("mod\n"); /* TODO: check results */ - WaitForEnd("9\n"); - dt = WaitForEnd(cfgWhere->GetValue() + "\n", true); - def = "/tmp"; - cfgUpdated = cfgUpdated & (~(1 << ConfigWhere)); - } - else if ((cfgUpdated >> ConfigReplace) & 1) { - WaitForEnd("mod\n"); /* TODO: check results */ - WaitForEnd("10\n"); - dt = WaitForEnd(wxString() << (cfgReplace->GetSelection()+1) << "\n", true); - def = "1"; - cfgUpdated = cfgUpdated & (~(1 << ConfigReplace)); - } - else if ((cfgUpdated >> ConfigWhen) & 1) { - WaitForEnd("mod\n"); /* TODO: check results */ - WaitForEnd("6\n"); - dt = WaitForEnd(cfgWhen->GetValue() + "\n", true); - def = ""; - cfgUpdated = cfgUpdated & (~(1 << ConfigWhen)); - } - else if ((cfgUpdated >> ConfigPriority) & 1) { - WaitForEnd("mod\n"); /* TODO: check results */ - WaitForEnd("7\n"); - dt = WaitForEnd(cfgPriority->GetValue() + "\n", true); - def = "10"; - cfgUpdated = cfgUpdated & (~(1 << ConfigPriority)); - } - else { - cfgUpdated = 0; - break; - } - - unsigned int i; - for (i = 0; i < dt->GetCount(); i++) { - if ((*dt)[i].Find("Run Restore job")) { - break; - } - } - - if (i == (dt->GetCount()-1)) { - delete dt; - dt = WaitForEnd(def + "\n"); - } - } - UpdateConfig(dt); /* TODO: Check result */ - - delete dt; -} - -/* Cancel restore */ -void wxbRestorePanel::CmdConfigCancel() { - WaitForEnd("no\n"); - wxbMainFrame::GetInstance()->Print("Restore cancelled.\n", CS_DEBUG); - wxbMainFrame::GetInstance()->SetStatusText("Restore cancelled."); - SetStatus(finished); -} - /* List jobs for a specified client */ void wxbRestorePanel::CmdListJobs() { if (status == entered) { @@ -980,7 +779,7 @@ void wxbRestorePanel::SetTreeItemState(wxTreeItemId item, int newstate) { } } - UpdateTreeItemState(tree->GetItemParent(item)); + UpdateTreeItemState(tree->GetParent(item)); } /* Update a tree item state, and its parents' state */ @@ -1054,7 +853,7 @@ void wxbRestorePanel::UpdateTreeItemState(wxTreeItemId item) { state = 0; } else { // no child, don't change anything - UpdateTreeItemState(tree->GetItemParent(item)); + UpdateTreeItemState(tree->GetParent(item)); return; } @@ -1064,7 +863,7 @@ void wxbRestorePanel::UpdateTreeItemState(wxTreeItemId item) { tree->SetItemImage(item, state, wxTreeItemIcon_Normal); tree->SetItemImage(item, state, wxTreeItemIcon_Selected); - UpdateTreeItemState(tree->GetItemParent(item)); + UpdateTreeItemState(tree->GetParent(item)); } /* @@ -1086,67 +885,6 @@ void wxbRestorePanel::RefreshTree(wxTreeItemId item) { }*/ } -/* - * Update config. - * - * Run Restore job - * JobName: RestoreFiles - * Bootstrap: /var/lib/bacula/restore.bsr - * Where: /tmp/bacula-restores - * Replace: always - * FileSet: Full Set - * Client: tom-fd - * Storage: File - * When: 2004-04-18 01:18:56 - * Priority: 10 - * OK to run? (yes/mod/no): - * - */ -bool wxbRestorePanel::UpdateConfig(wxbDataTokenizer* dt) { - unsigned int i; - for (i = 0; i < dt->GetCount(); i++) { - if ((*dt)[i].Find("Run Restore job") == 0) - break; - } - - if ((i + 10) > dt->GetCount()) { - return false; - } - - int k; - - if ((k = (*dt)[++i].Find("JobName:")) != 0) return false; - cfgJobname->SetLabel((*dt)[i].Mid(10).Trim(false).RemoveLast()); - if ((k = (*dt)[++i].Find("Bootstrap:")) != 0) return false; - cfgBootstrap->SetLabel((*dt)[i].Mid(10).Trim(false).RemoveLast()); - if ((k = (*dt)[++i].Find("Where:")) != 0) return false; - cfgWhere->SetValue((*dt)[i].Mid(10).Trim(false).RemoveLast()); - - if ((k = (*dt)[++i].Find("Replace:")) != 0) return false; - wxString str = (*dt)[i].Mid(10).Trim(false).RemoveLast(); - if (str == "always") cfgReplace->SetSelection(0); - else if (str == "ifnewer") cfgReplace->SetSelection(1); - else if (str == "ifolder") cfgReplace->SetSelection(2); - else if (str == "never") cfgReplace->SetSelection(3); - else cfgReplace->SetSelection(0); - - if ((k = (*dt)[++i].Find("FileSet:")) != 0) return false; - cfgFileset->SetLabel((*dt)[i].Mid(10).Trim(false).RemoveLast()); - if ((k = (*dt)[++i].Find("Client:")) != 0) return false; - cfgClient->SetLabel((*dt)[i].Mid(10).Trim(false).RemoveLast()); - if ((k = (*dt)[++i].Find("Storage:")) != 0) return false; - cfgStorage->SetLabel((*dt)[i].Mid(10).Trim(false).RemoveLast()); - if ((k = (*dt)[++i].Find("When:")) != 0) return false; - cfgWhen->SetValue((*dt)[i].Mid(10).Trim(false).RemoveLast()); - if ((k = (*dt)[++i].Find("Priority:")) != 0) return false; - cfgPriority->SetValue((*dt)[i].Mid(10).Trim(false).RemoveLast()); - cfgUpdated = 0; - - restorePanel->Layout(); - - return true; -} - /*---------------------------------------------------------------------------- Status function ----------------------------------------------------------------------------*/ @@ -1155,12 +893,6 @@ bool wxbRestorePanel::UpdateConfig(wxbDataTokenizer* dt) { void wxbRestorePanel::SetStatus(status_enum newstatus) { switch (newstatus) { case disabled: - centerSizer->Remove(restorePanel); - centerSizer->Remove(treelistPanel); - restorePanel->Show(false); - centerSizer->Add(treelistPanel, 1, wxEXPAND); - treelistPanel->Show(true); - centerSizer->Layout(); start->SetLabel("Enter restore mode"); start->Enable(false); clientChoice->Enable(false); @@ -1170,11 +902,6 @@ void wxbRestorePanel::SetStatus(status_enum newstatus) { gauge->Enable(false); break; case finished: - centerSizer->Remove(restorePanel); - restorePanel->Show(false); - centerSizer->Add(treelistPanel, 1, wxEXPAND); - treelistPanel->Show(true); - centerSizer->Layout(); tree->DeleteAllItems(); list->DeleteAllItems(); clientChoice->Clear(); @@ -1210,21 +937,6 @@ void wxbRestorePanel::SetStatus(status_enum newstatus) { list->Enable(true); working = false; break; - case configuring: - start->Enable(false); - clientChoice->Enable(false); - jobChoice->Enable(false); - tree->Enable(false); - list->Enable(false); - centerSizer->Remove(treelistPanel); - treelistPanel->Show(false); - centerSizer->Add(restorePanel, 1, wxEXPAND); - restorePanel->Show(true); - restorePanel->Layout(); - centerSizer->Layout(); - cfgApply->Enable(false); - cfgOk->Enable(true); - break; case restoring: start->SetLabel("Restoring..."); gauge->Enable(true); @@ -1356,58 +1068,3 @@ void wxbRestorePanel::OnListActivated(wxListEvent& event) { working = false; } -void wxbRestorePanel::OnConfigUpdated(wxCommandEvent& event) { - if (status != configuring) return; - cfgApply->Enable(true); - cfgOk->Enable(false); - cfgUpdated = cfgUpdated | (1 << event.GetId()); -} - -void wxbRestorePanel::OnConfigOk(wxEvent& WXUNUSED(event)) { - if (status != configuring) return; - if (working) { - return; - } - working = true; - CmdStart(); - working = false; -} - -void wxbRestorePanel::OnConfigApply(wxEvent& WXUNUSED(event)) { - if (status != configuring) return; - if (working) { - return; - } - working = true; - CmdConfigApply(); - if (cfgUpdated == 0) { - cfgApply->Enable(false); - cfgOk->Enable(true); - } - working = false; -} - -void wxbRestorePanel::OnConfigCancel(wxEvent& WXUNUSED(event)) { - if (status != configuring) return; - if (working) { - return; - } - working = true; - CmdConfigCancel(); - working = false; -} - -/* TODO : correct that bad implementation of tree marked event forwarding */ - -wxbTreeListPanel::wxbTreeListPanel(wxbRestorePanel* parent): wxPanel(parent, -1) { - this->parent = parent; -} - -void wxbTreeListPanel::OnTreeMarked(wxbTreeMarkedEvent& event) { - parent->OnTreeMarked(event); -} - -void wxbTreeListPanel::OnListMarked(wxbListMarkedEvent& event) { - parent->OnListMarked(event); -} - diff --git a/bacula/src/wx-console/wxbrestorepanel.h b/bacula/src/wx-console/wxbrestorepanel.h index 64f97cd960..c84fcb3ab8 100644 --- a/bacula/src/wx-console/wxbrestorepanel.h +++ b/bacula/src/wx-console/wxbrestorepanel.h @@ -31,15 +31,12 @@ #include #include #include -#include #include "wxbutils.h" #include "wxbtreectrl.h" #include "wxblistctrl.h" -class wxbTreeListPanel; - /* * wxbPanel for restoring files */ @@ -59,12 +56,6 @@ class wxbRestorePanel : public wxbPanel /* The main button has been clicked */ void CmdStart(); - /* Apply configuration changes */ - void CmdConfigApply(); - - /* Cancel restore */ - void CmdConfigCancel(); - /* List jobs for a specified client */ void CmdListJobs(); @@ -105,21 +96,17 @@ class wxbRestorePanel : public wxbPanel /* Refresh a tree item, and all its children. */ void RefreshTree(wxTreeItemId item); - - /* Update config */ - bool UpdateConfig(wxbDataTokenizer* dt); /* Status related */ enum status_enum { - disabled, // The panel is not activatable - activable, // The panel is activable, but not activated - entered, // The panel is activated - choosing, // The user is choosing files to restore - listing, // Dir listing is in progress - configuring, // The user is configuring restore process - restoring, // Bacula is restoring files - finished // Retore done (state will change in activable) + disabled, // The panel is not activatable + activable, // The panel is activable, but not activated + entered, // The panel is activated + choosing, // The user is choosing files to restore + listing, // Dir listing is in progress + restoring, // Bacula is restoring files + finished // Retore done (state will change in activable) }; status_enum status; @@ -140,16 +127,8 @@ class wxbRestorePanel : public wxbPanel void OnListMarked(wxbListMarkedEvent& event); void OnListActivated(wxListEvent& event); void OnClientChoiceChanged(wxCommandEvent& event); - void OnConfigUpdated(wxCommandEvent& event); - void OnConfigOk(wxEvent& WXUNUSED(event)); - void OnConfigApply(wxEvent& WXUNUSED(event)); - void OnConfigCancel(wxEvent& WXUNUSED(event)); /* Components */ - wxBoxSizer *centerSizer; /* Center sizer */ - wxbTreeListPanel *treelistPanel; /* Panel which contains tree and list */ - wxPanel *restorePanel; /* Panel which contains restore options */ - wxImageList* imagelist; //image list for tree and list wxButton* start; @@ -159,35 +138,7 @@ class wxbRestorePanel : public wxbPanel wxbListCtrl* list; wxGauge* gauge; - wxButton* cfgOk; - wxButton* cfgApply; - wxButton* cfgCancel; - - long cfgUpdated; //keeps which config fields are updated - - wxStaticText* cfgJobname; - wxStaticText* cfgBootstrap; - wxTextCtrl* cfgWhere; - wxChoice* cfgReplace; - wxStaticText* cfgFileset; - wxStaticText* cfgClient; - wxStaticText* cfgStorage; - wxTextCtrl* cfgWhen; - wxTextCtrl* cfgPriority; - - friend class wxbTreeListPanel; - - DECLARE_EVENT_TABLE(); -}; - -class wxbTreeListPanel: public wxPanel { -public: - wxbTreeListPanel(wxbRestorePanel* parent); -private: - void OnTreeMarked(wxbTreeMarkedEvent& event); - void OnListMarked(wxbListMarkedEvent& event); - DECLARE_EVENT_TABLE(); - wxbRestorePanel* parent; + DECLARE_EVENT_TABLE(); }; #endif // WXBRESTOREPANEL_H diff --git a/regress/.cvsignore b/regress/.cvsignore deleted file mode 100644 index f29c785374..0000000000 --- a/regress/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -build -bin -test.out -weird-files -weird-files2 -diff -tmp -working -Makefile diff --git a/regress/Makefile.in b/regress/Makefile.in deleted file mode 100644 index a095af158f..0000000000 --- a/regress/Makefile.in +++ /dev/null @@ -1,69 +0,0 @@ -# -# Makefile for Bacula regression testing -# -# Note, Makefile is built from Makefile.in, which you should not really -# need to change, by envoking: -# -# ./config -# e.g. -# -# ./config kern.conf -# -# - -# suck in user's configuration -@CONFIG@ - -WHICHDB?="--with-sqlite=${SQLITE_DIR}" - -first_rule: all - -all: - -setup: bacula - -# -# Some machines cannot handle the sticky bit and other garbage that -# is in weird-files, so we load and run it only on Linux machines. -# -bacula: all - @rm -rf bin build weird-files tmp - (if test x`uname` = xLinux -o x`uname` = xFreeBSD ; then \ - tar xfz weird-files.tar.gz ;\ - fi) - rm -rf tmp working - mkdir tmp working - scripts/setup ${BACULA_SOURCE} ${EMAIL} ${WHICHDB} - scripts/do_sed ${EMAIL} ${TAPE_DRIVE} ${AUTOCHANGER} ${AUTOCHANGER_PATH} - -# Run all non-root userid tests -test: - ./all-non-root-tests - -# run all file and tape tests -full_test: - ./all-tape-and-file-tests - -# These tests require you to run as root -root_test: - ./all-root-tests - -clean: - scripts/cleanup - rm -f /tmp/file-list - rm -f tmp/* working/* - rm -f test.out - rm -f diff - rm -f 1 2 3 scripts/1 scripts/2 scripts/3 tests/1 tests/2 tests/3 - -# Reset our userid after running as root -reset: - chown -R ${USER}:${USER} . tmp working - scripts/cleanup - rm -f /tmp/file-list tmp/file-list - rm -f tmp/* working/* - -distclean: clean - rm -rf bin build weird-files weird-files weird-files2 tmp working - rm -f scripts/*.conf - diff --git a/regress/README b/regress/README deleted file mode 100644 index c63b737ed7..0000000000 --- a/regress/README +++ /dev/null @@ -1,101 +0,0 @@ - Bacula Regression - Kern Sibbald - December 2003 - -This is Bacula's regression script directory. At this time -(December 2003), it is still in development, so all the tests are -not complete. - -To set it up, create your personal configuration file, by -copying prototype.conf to xxx.conf or simply editing prototype.conf -directly. - -Then edit your conf file and define appropriate values -for the variables that are in that file. If you want to see -a real example, look at kern.conf, but please don't use my -email address! - -Make sure that depkgs is pre-built if it isn't -already: (cd your-depkgs; make sqlite). - -Then do: - - ./config xxx.conf - make setup - -You run the above one time. This will build a Makefile from -Makefile.in and your xxx.conf file, copy the Bacula source, -configure, build it, and configure all the Bacula 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 - -Debugging failed tests: -The simplest thing to do is to edit tests/xxxx where xxxx is the name of -a or the test that is failing and change all: - - @output - -to - - @tee - -re-run the test. The output will display on your terminal. In rare cases, -for example to get bacula debug output, you might want to remove the -"2>&1 >/dev/null" from the end of the bin/bacula call or from the end -of the diff call, assuming you want to "see" the diff output. - diff --git a/regress/all-non-root-2tape-tests b/regress/all-non-root-2tape-tests deleted file mode 100755 index 5201731263..0000000000 --- a/regress/all-non-root-2tape-tests +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# -# Run all tape tests -# -tests/test0 -tests/two-volume-tape -tests/incremental-2tape -echo " " -echo " " -echo "2 Tape Test results" -cat test.out -scripts/cleanup diff --git a/regress/all-non-root-tape-tests b/regress/all-non-root-tape-tests deleted file mode 100755 index 53b3f2945b..0000000000 --- a/regress/all-non-root-tape-tests +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# Run all tape tests -# -tests/test0 -tests/backup-bacula-tape -tests/small-file-size-tape -tests/restore-by-file-tape -tests/incremental-tape -tests/four-concurrent-jobs-tape -tests/four-jobs-tape -tests/fixed-block-size-tape -echo " " -echo " " -echo "Test results" -cat test.out -scripts/cleanup diff --git a/regress/all-non-root-tests b/regress/all-non-root-tests deleted file mode 100755 index 3cd0fb92fe..0000000000 --- a/regress/all-non-root-tests +++ /dev/null @@ -1,34 +0,0 @@ -#!/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 -tests/restore2-by-file-test -tests/four-jobs-test -tests/incremental-test -tests/decremental-test -tests/restore-disk-seek-test -tests/query-test -echo " " -echo " " -echo "Test results" -cat test.out -scripts/cleanup diff --git a/regress/all-root-tests b/regress/all-root-tests deleted file mode 100755 index 3f077bba4c..0000000000 --- a/regress/all-root-tests +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# -# Run all root tests -# -rm -f test.out -tests/dev-test-root -tests/etc-test-root -tests/lib-test-root -tests/usr-tape-root -cat test.out -scripts/cleanup diff --git a/regress/all-tape-and-file-tests b/regress/all-tape-and-file-tests deleted file mode 100755 index 9bc3e7676c..0000000000 --- a/regress/all-tape-and-file-tests +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Run all tests -# -./all-non-root-tests -./all-non-root-tape-tests diff --git a/regress/all-tests b/regress/all-tests deleted file mode 100755 index b1b2b35e86..0000000000 --- a/regress/all-tests +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# -# Run all tests -# -./all-non-root-tests -./all-root-tests -cat test.out -scripts/cleanup diff --git a/regress/config b/regress/config deleted file mode 100755 index 4bc4f52703..0000000000 --- a/regress/config +++ /dev/null @@ -1,9 +0,0 @@ -#/bin/sh -# -# First argument is expected to be a user's configuration file -# -if ! test -e $1 ; then - echo "Arg1 must specify a config file (e.g. prototype.conf)" - exit 1 -fi -sed -e "/@CONFIG@/r $1" -e "s/@CONFIG@//" Makefile.in >Makefile diff --git a/regress/do_all b/regress/do_all deleted file mode 100755 index ce86177ef9..0000000000 --- a/regress/do_all +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -make setup -./all-tape-and-file-tests diff --git a/regress/do_all_tapes b/regress/do_all_tapes deleted file mode 100755 index dd07d2ec99..0000000000 --- a/regress/do_all_tapes +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -make setup -./all-non-root-tape-tests diff --git a/regress/kern.conf b/regress/kern.conf deleted file mode 100644 index dbe0c96ca4..0000000000 --- a/regress/kern.conf +++ /dev/null @@ -1,15 +0,0 @@ -# Where to get the source to be tested -BACULA_SOURCE="${HOME}/bacula/k" - -# Where to send email !!!!! Change me !!!!!!! -EMAIL=kern@sibbald.com - -# Full "default" path where to find sqlite (no quotes!) -SQLITE_DIR=${HOME}/bacula/depkgs/sqlite - -TAPE_DRIVE="/dev/nst0" -# if you don't have an autochanger set AUTOCHANGER to /dev/null -AUTOCHANGER="/dev/sg0" - -# This must be the path to the autochanger including its name -AUTOCHANGER_PATH="/usr/local/bin/mtx" diff --git a/regress/prototype.conf b/regress/prototype.conf deleted file mode 100644 index 14592a3f94..0000000000 --- a/regress/prototype.conf +++ /dev/null @@ -1,37 +0,0 @@ -# -# Prototype personal configuration file for the regression -# scripts. Either edit this file directly, or better copy -# it elsewhere so it won't get overwritten. -# - -# -# Where to get the source to be tested -# -BACULA_SOURCE= - -# Where to send email messages -# -EMAIL= - -# Full "default" path where to find sqlite. -# This is only used if you do not specify a database override on the -# make command. -# -# N.B. DON'T PUT QOUTES AROUND THE PATH. -# -SQLITE_DIR=${HOME}/bacula/depkgs/sqlite - -# -# The device name of your tape drive if you have one -# -TAPE_DRIVE=/dev/nst0 - -# -# if you don't have an autochanger set AUTOCHANGER to /dev/null -# -AUTOCHANGER=/dev/sg0 - -# -# This must be the path to the autochanger including its name -# -AUTOCHANGER_PATH=/bin/mtx diff --git a/regress/scripts/.cvsignore b/regress/scripts/.cvsignore deleted file mode 100644 index 8d7e0007c7..0000000000 --- a/regress/scripts/.cvsignore +++ /dev/null @@ -1,16 +0,0 @@ -bacula-dir.conf -bacula-fd.conf -bacula-sd.conf -console.conf -bconsole.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 -bacula-sd-2tape.conf -cleanup-tape -cleanup-2tape -prepare-two-tapes diff --git a/regress/scripts/bacula-dir-tape.conf.in b/regress/scripts/bacula-dir-tape.conf.in deleted file mode 100644 index 8868a24a4d..0000000000 --- a/regress/scripts/bacula-dir-tape.conf.in +++ /dev/null @@ -1,134 +0,0 @@ -# -# 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.33 -# -# 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 - SpoolData = yes -} - - -# 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 { - &1 >/dev/null -if [ $? != 0 ] ; then - echo " " - echo " !!!! Zombie Jobs in Director !!!!" - echo " !!!! Zombie Jobs in Director !!!!" >>test.out - echo " " -fi -grep "No Jobs running." tmp/fd.out 2>&1 >/dev/null -if [ $? != 0 ] ; then - echo " " - echo " !!!! Zombie Jobs in File daemon !!!!" - echo " !!!! Zombie Jobs in File daemon !!!!" >>test.out - echo " " -fi -grep "No Jobs running." tmp/sd.out 2>&1 >/dev/null -if [ $? != 0 ] ; then - echo " " - echo " !!!! Zombie Jobs in Storage daemon !!!!" - echo " !!!! Zombie Jobs in Storage daemon !!!!" >>test.out - echo " " -fi -grep "ERROR" tmp/log*.out 2>&1 >/dev/null -if [ $? = 0 ] ; then - echo " " - echo " !!!! ERROR in log output !!!!" - echo " !!!! ERROR in log output !!!!" >>test.out - echo " " -fi -grep "Fatal Error" tmp/log*.out 2>&1 >/dev/null -if [ $? = 0 ] ; then - echo " " - echo " !!!! Fatal Error in log output !!!!" - echo " !!!! Fatal Error in log output !!!!" >>test.out - echo " " -fi - - diff --git a/regress/scripts/cleanup b/regress/scripts/cleanup deleted file mode 100755 index 2cb9f56efa..0000000000 --- a/regress/scripts/cleanup +++ /dev/null @@ -1,11 +0,0 @@ -#!/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 tmp/restore2-list -rm -rf tmp/fd.out tmp/dir.out tmp/sd.out -rm -rf working/log diff --git a/regress/scripts/cleanup-2tape.in b/regress/scripts/cleanup-2tape.in deleted file mode 100755 index 06583b5f69..0000000000 --- a/regress/scripts/cleanup-2tape.in +++ /dev/null @@ -1,32 +0,0 @@ -#!/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 ! test x@autochanger@ = x/dev/null; then - drive=`bin/mtx-changer @autochanger@ loaded` - if ! test x$drive = x2; then - bin/mtx-changer @autochanger@ unload - bin/mtx-changer @autochanger@ load 2 - fi - mt -f @tape_drive@ rewind - mt -f @tape_drive@ weof -fi - - -# -# 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 diff --git a/regress/scripts/cleanup-tape.in b/regress/scripts/cleanup-tape.in deleted file mode 100755 index debc2a9840..0000000000 --- a/regress/scripts/cleanup-tape.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/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 - -mt -f @tape_drive@ rewind -mt -f @tape_drive@ weof diff --git a/regress/scripts/copy-2tape-confs b/regress/scripts/copy-2tape-confs deleted file mode 100755 index dbf9466330..0000000000 --- a/regress/scripts/copy-2tape-confs +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -/bin/cp -f scripts/bacula-dir-tape.conf bin/bacula-dir.conf -/bin/cp -f scripts/bacula-sd-2tape.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/bconsole.conf diff --git a/regress/scripts/copy-confs b/regress/scripts/copy-confs deleted file mode 100755 index d1e6cc1c36..0000000000 --- a/regress/scripts/copy-confs +++ /dev/null @@ -1,5 +0,0 @@ -#!/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/bconsole.conf bin/bconsole.conf diff --git a/regress/scripts/copy-tape-confs b/regress/scripts/copy-tape-confs deleted file mode 100755 index 588dddc35b..0000000000 --- a/regress/scripts/copy-tape-confs +++ /dev/null @@ -1,5 +0,0 @@ -#!/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/bconsole.conf diff --git a/regress/scripts/copy-test-confs b/regress/scripts/copy-test-confs deleted file mode 100755 index 02a1b702ff..0000000000 --- a/regress/scripts/copy-test-confs +++ /dev/null @@ -1,5 +0,0 @@ -#!/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/bconsole.conf diff --git a/regress/scripts/copy-testa-confs b/regress/scripts/copy-testa-confs deleted file mode 100755 index 6b5f30c3ef..0000000000 --- a/regress/scripts/copy-testa-confs +++ /dev/null @@ -1,5 +0,0 @@ -#!/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/bconsole.conf diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed deleted file mode 100755 index cb92d78344..0000000000 --- a/regress/scripts/do_sed +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# -if test $# != 4 ; 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" - echo " and the fourth must be the full path to the mtx program" - 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} -echo "s%@changer_path@%${4}%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/bacula-sd-2tape.conf.in >${cwd}/scripts/bacula-sd-2tape.conf -sed -f ${out} ${cwd}/scripts/cleanup-tape.in >${cwd}/scripts/cleanup-tape -sed -f ${out} ${cwd}/scripts/cleanup-2tape.in >${cwd}/scripts/cleanup-2tape -sed -f ${out} ${cwd}/scripts/prepare-two-tapes.in >${cwd}/scripts/prepare-two-tapes -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 ${cwd}/scripts/prepare-two-tapes -rm -f /tmp/bac$$ -cp ${cwd}/bin/mtx-changer /tmp/bac$$ -sed "s%^MTX.*$%MTX=${4}%g" /tmp/bac$$ >${cwd}/bin/mtx-changer -chmod 777 ${cwd}/bin/mtx-changer - -# get proper SD tape definitions -if test x`uname` = xLinux ; then \ - cp -f scripts/linux_tape_options bin/tape_options ; \ -fi -if test x`uname` = xFreeBsd ; then \ - cp -f scripts/freebsd_tape_options bin/tape_options ; \ -fi - -rm -f ${out} -rm -f /tmp/bac$$ diff --git a/regress/scripts/exclude-dev-test b/regress/scripts/exclude-dev-test deleted file mode 100644 index 4165ea1ae7..0000000000 --- a/regress/scripts/exclude-dev-test +++ /dev/null @@ -1,5 +0,0 @@ -dev/ptmx -dev/pts -dev/rd/c5d2 -dev/rd -dev/shm diff --git a/regress/scripts/exclude-etc-test b/regress/scripts/exclude-etc-test deleted file mode 100644 index f59ca8df2a..0000000000 --- a/regress/scripts/exclude-etc-test +++ /dev/null @@ -1 +0,0 @@ -etc/mail/statistics diff --git a/regress/scripts/exclude-lib-test b/regress/scripts/exclude-lib-test deleted file mode 100644 index 5be32f443b..0000000000 --- a/regress/scripts/exclude-lib-test +++ /dev/null @@ -1,5 +0,0 @@ -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 diff --git a/regress/scripts/flist b/regress/scripts/flist deleted file mode 100644 index 7e7e1f0bf8..0000000000 --- a/regress/scripts/flist +++ /dev/null @@ -1,16 +0,0 @@ -/build/doc/bacula.pdf -/build/configure -/build/src/stored/bextract -/build/src/tools/testfind -/build/Makefile.in -/build/src/dird/bacula-dir -/build/src/console/bconsole -/build/src/filed/bacula-fd -/build/src/findlib/find_one.c -/build/src/jcr.h -/build/platforms/Makefile.in -/build/platforms/redhat/Makefile.in -/build/scripts/Makefile.in -/build/src/filed/win32/bin/cygwin1.dll -/build/src/filed/win32/winservice.cpp -/build/src/filed/restore.c diff --git a/regress/scripts/freebsd_tape_options b/regress/scripts/freebsd_tape_options deleted file mode 100644 index 8ae713fa38..0000000000 --- a/regress/scripts/freebsd_tape_options +++ /dev/null @@ -1,5 +0,0 @@ -Hardware End of Medium = no -Fast Forward Space File = no -BSF at EOM = yes -Backward Space Record = no -TWO EOF = yes diff --git a/regress/scripts/linux_osst_tape_options b/regress/scripts/linux_osst_tape_options deleted file mode 100644 index 5def0c08cb..0000000000 --- a/regress/scripts/linux_osst_tape_options +++ /dev/null @@ -1,7 +0,0 @@ - Minimum Block Size = 32768 - Maximum Block Size = 32768 - Hardware End of Medium = yes - BSF at EOM = yes - Fast Forward Space File = yes - Two EOF = no - diff --git a/regress/scripts/linux_tape_options b/regress/scripts/linux_tape_options deleted file mode 100644 index 7164059493..0000000000 --- a/regress/scripts/linux_tape_options +++ /dev/null @@ -1 +0,0 @@ -# nothing needed diff --git a/regress/scripts/prepare-two-tapes.in b/regress/scripts/prepare-two-tapes.in deleted file mode 100755 index 44cb7f90c6..0000000000 --- a/regress/scripts/prepare-two-tapes.in +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# Create two blank tapes -# -@changer_path@ -f @autochanger@ unload -@changer_path@ -f @autochanger@ load 1 -mt -f @tape_drive@ rewind -mt -f @tape_drive@ weof -@changer_path@ -f @autochanger@ unload -@changer_path@ -f @autochanger@ load 2 -mt -f @tape_drive@ rewind -mt -f @tape_drive@ weof -@changer_path@ -f @autochanger@ unload diff --git a/regress/scripts/regress-config b/regress/scripts/regress-config deleted file mode 100755 index a1a3f2b85f..0000000000 --- a/regress/scripts/regress-config +++ /dev/null @@ -1,21 +0,0 @@ -#!/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-working-dir=$1/working \ - --with-dump-email=$2 \ - --with-job-email=$2 \ - $3 \ - --with-baseport=8101 \ - --with-tcp-wrappers - -exit 0 diff --git a/regress/scripts/setup b/regress/scripts/setup deleted file mode 100755 index 0b01c0928a..0000000000 --- a/regress/scripts/setup +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# -# Script to setup running Bacula regression tests -# -cwd=`pwd` -if [ $# != 3 ] ; then - echo "Incorrect number of arguments. Got $#. Need:" - echo "setup bacula-src email-address --with-DBNAME" - echo " " - exit 1 -fi -if [ ! -d $1 ] ; then - echo "Arg 1 must be a Bacula release directory." - echo " " - exit 1 -fi -rm -rf build bin -# Copy new source -echo "Copying source from $1" -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 -cd bin -./create_bacula_database -./drop_bacula_tables -./make_bacula_tables -./grant_bacula_privileges -cd .. -# 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 diff --git a/regress/scripts/test-bacula-dir.conf.in b/regress/scripts/test-bacula-dir.conf.in deleted file mode 100644 index 1474f3ef8a..0000000000 --- a/regress/scripts/test-bacula-dir.conf.in +++ /dev/null @@ -1,299 +0,0 @@ -# -# 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.33 -# -# 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 - SpoolData=yes -} - -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 { - &1 >/dev/null -scripts/copy-tape-confs -scripts/cleanup-tape -echo "${cwd}/build" >/tmp/file-list -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting Bacula tape test ===" -echo " === Starting Bacula tape test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/backup-bacula-test b/regress/tests/backup-bacula-test deleted file mode 100755 index c9f038d1d6..0000000000 --- a/regress/tests/backup-bacula-test +++ /dev/null @@ -1,59 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges >/dev/null 2>&1 -cd .. - -echo " " -echo " " -echo " === Starting Backup Bacula Test ===" -echo " === Starting Backup Bacula Test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/bextract-test b/regress/tests/bextract-test deleted file mode 100755 index 3bf459dbef..0000000000 --- a/regress/tests/bextract-test +++ /dev/null @@ -1,63 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting bextract-test ===" -echo " === Starting bextract-test ===" >working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/bscan-test b/regress/tests/bscan-test deleted file mode 100755 index 164439e1bb..0000000000 --- a/regress/tests/bscan-test +++ /dev/null @@ -1,88 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting bscan-test ===" -echo " === Starting bscan-test ===" >working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/bsr-opt-test b/regress/tests/bsr-opt-test deleted file mode 100755 index 82eb76e541..0000000000 --- a/regress/tests/bsr-opt-test +++ /dev/null @@ -1,77 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting bsr-opt-test ===" -echo " === Starting bsr-opt-test ===" >working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -# -# This test is not really reliable. What we want to do is -# to select files on only one Volume, then insure here -# that only one Volume is chosen. -# -grep TestVolume002 working/restore.bsr 2>&1 >/dev/null -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 != 0 -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 diff --git a/regress/tests/compressed-test b/regress/tests/compressed-test deleted file mode 100755 index 983c114e27..0000000000 --- a/regress/tests/compressed-test +++ /dev/null @@ -1,65 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting compressed-test ===" -echo " === Starting compressed-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/concurrent-jobs-test b/regress/tests/concurrent-jobs-test deleted file mode 100755 index 1877e0b200..0000000000 --- a/regress/tests/concurrent-jobs-test +++ /dev/null @@ -1,82 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting concurrent-jobs-test ===" -echo " === Starting concurrent-jobs-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/decremental-test b/regress/tests/decremental-test deleted file mode 100755 index 2e40a3f04e..0000000000 --- a/regress/tests/decremental-test +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory then create some -# new files, do a Decremental and restore those two files. -# -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 -echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list -echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list -cd ${cwd} -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting decremental-test ===" -echo " === Starting decremental-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/build/ficheriro1.txt -echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/build/ficheriro2.txt -bin/bconsole -c bin/bconsole.conf <&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=$? -# -# 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 -if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! decremental-test Bacula source failed!!! !!!!! " - echo " !!!!! decremental-test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== decremental-test Bacula source OK ===== " - echo " ===== decremental-test OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/dev-test-root b/regress/tests/dev-test-root deleted file mode 100755 index abb7823068..0000000000 --- a/regress/tests/dev-test-root +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory -# then restore it. -# -MUID=`/usr/bin/id -u` -if [ $MUID != 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 -scripts/cleanup -echo "/dev" >/tmp/file-list -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. -echo " " -echo " " -echo " === Starting /dev save/restore test ===" -echo " " -echo " " -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -cd / -${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/original -cd ${cwd}/tmp/bacula-restores -${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/restored -cd ${cwd}/tmp -cat >sed.scr <original -# -sed -f sed.scr restored | sort >restored -rm -f sed.scr -# -cd ${cwd} -diff tmp/original tmp/restored 2>&1 1>/dev/null 2>&1 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 - scripts/cleanup -fi diff --git a/regress/tests/etc-test-root b/regress/tests/etc-test-root deleted file mode 100755 index 59ec79755f..0000000000 --- a/regress/tests/etc-test-root +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory -# then restore it. -# -MUID=`/usr/bin/id -u` -if [ $MUID != 0 ] ; then - echo " " - echo "You must be root to run this test." - echo " ===== etc-test-root failed!!! ===== " - echo " ===== etc-test-root failed!!! ===== " >>test.out - echo " " - exit 1 -fi -echo " " -echo " " -echo " === Starting /etc save/restore test ===" -echo " " -echo " " -cwd=`pwd` -scripts/copy-test-confs -scripts/cleanup -echo "/etc" >/tmp/file-list -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -cd / -${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/1 -cd ${cwd}/tmp/bacula-restores -${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/2 -sort <${cwd}/tmp/1 >${cwd}/tmp/original -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 -if [ $? != 0 ] ; then - echo " " - echo " " - echo " ===== etc-test-root failed!!! ===== " - echo " ===== etc-test-root failed!!! ===== " >>test.out - echo " " -else - echo " ===== etc-test-root OK ===== " - echo " ===== etc-test-root OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/fixed-block-size-tape b/regress/tests/fixed-block-size-tape deleted file mode 100755 index 4bfd9ad258..0000000000 --- a/regress/tests/fixed-block-size-tape +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory -# to a tape where we set the minimum and maximum block -# sizes. -# -cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null -scripts/copy-tape-confs -scripts/cleanup-tape -echo "${cwd}/build" >/tmp/file-list -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. -cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1 -echo "s%# Maximum Block Size% Maximum Block Size%" >${cwd}/tmp/2 -echo "s%# Minimum Block Size% Minimum Block Size%" >>${cwd}/tmp/2 -sed -f ${cwd}/tmp/2 ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf -rm -f ${cwd}/tmp/1 ${cwd}/tmp/2 - -echo " " -echo " " -echo " === Starting Fixed Block Size test ===" -echo " === Starting Fixed Block Size test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 " !!!!! Fixed Block Size test Bacula source failed!!! !!!!! " - echo " !!!!! Fixed Block Size test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== Fixed Block Size test Bacula source OK ===== " - echo " ===== Fixed Block Size test OK ===== " >>test.out -# scripts/cleanup -fi diff --git a/regress/tests/four-concurrent-jobs-tape b/regress/tests/four-concurrent-jobs-tape deleted file mode 100755 index 089f28696a..0000000000 --- a/regress/tests/four-concurrent-jobs-tape +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -# -# Run two jobs at the same time -# -cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. -scripts/copy-tape-confs -scripts/cleanup-tape -echo "${cwd}/build" >/tmp/file-list - -echo " " -echo " " -echo " === Starting four-concurrent-jobs-tape ===" -echo " === Starting four-concurrent-jobs-tape ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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-tape Bacula source failed!!! !!!!! " - echo " !!!!! four-concurrent-jobs-tape failed!!! !!!!! " >>test.out - echo " " - exit 1 -else - echo " ===== four-concurrent-jobs-tape Bacula source OK ===== " - echo " ===== four-concurrent-jobs-tape OK ===== " >>test.out - scripts/cleanup - exit 0 -fi diff --git a/regress/tests/four-concurrent-jobs-test b/regress/tests/four-concurrent-jobs-test deleted file mode 100755 index fbcf54798d..0000000000 --- a/regress/tests/four-concurrent-jobs-test +++ /dev/null @@ -1,82 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -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/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/four-jobs-tape b/regress/tests/four-jobs-tape deleted file mode 100755 index 4b082dbe0e..0000000000 --- a/regress/tests/four-jobs-tape +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory using the compressed option -# then backup four times, each with incremental then finally restore. -# It should require at least 4 different bsrs. -# -cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -scripts/copy-tape-confs -scripts/cleanup-tape -echo "${cwd}/build" >/tmp/file-list - -echo " " -echo " " -echo " === Starting four-jobs-tape ===" -echo " === Starting four-jobs-tape ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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-jobs-tape Bacula source failed!!! !!!!! " - echo " !!!!! four-jobs-tape failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== four-jobs-tape Bacula source OK ===== " - echo " ===== four-jobs-tape OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/four-jobs-test b/regress/tests/four-jobs-test deleted file mode 100755 index 65edb56c2d..0000000000 --- a/regress/tests/four-jobs-test +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory using the compressed option -# then backup four times, each with incremental then finally restore. -# It should require at least 4 different bsrs. -# -cwd=`pwd` -scripts/copy-test-confs -scripts/cleanup -echo "${cwd}/build" >/tmp/file-list -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting four-jobs-test ===" -echo " === Starting four-jobs-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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-jobs-test Bacula source failed!!! !!!!! " - echo " !!!!! four-jobs-test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== four-jobs-test Bacula source OK ===== " - echo " ===== four-jobs-test OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/incremental-2tape b/regress/tests/incremental-2tape deleted file mode 100755 index 6ed796897f..0000000000 --- a/regress/tests/incremental-2tape +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory then create some -# new files, do an Incremental and restore those two files. -# -# This script uses the autochanger and two tapes -# -cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -scripts/copy-2tape-confs -scripts/cleanup-2tape -echo "${cwd}/tmp/build" >/tmp/file-list -if test ! -d ${cwd}/tmp/build ; then - mkdir ${cwd}/tmp/build -fi -cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build -cd ${cwd}/tmp -echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list -echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list -cd ${cwd} - -echo " " -echo " " -echo " === Starting incremental-2tape test ===" -echo " === Starting incremental-2tape test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/build/ficheriro1.txt -echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt -bin/bconsole -c bin/bconsole.conf <&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=$? -# -# 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 -if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! incremental-2tape test Bacula source failed!!! !!!!! " - echo " !!!!! incremental-2tape test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== incremental-2tape test Bacula source OK ===== " - echo " ===== incremental-2tape test OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/incremental-tape b/regress/tests/incremental-tape deleted file mode 100755 index 88b4d86980..0000000000 --- a/regress/tests/incremental-tape +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory then create some -# new files, do an Incremental and restore those two files. -# -cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -scripts/copy-tape-confs -scripts/cleanup-tape -echo "${cwd}/tmp/build" >/tmp/file-list -if test ! -d ${cwd}/tmp/build ; then - mkdir ${cwd}/tmp/build -fi -cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build -cd ${cwd}/tmp -echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list -echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list -cd ${cwd} - -echo " " -echo " " -echo " === Starting incremental-tape test ===" -echo " === Starting incremental-tape test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/build/ficheriro1.txt -echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt -bin/bconsole -c bin/bconsole.conf <&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=$? -# -# 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 -if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! incremental-tape test Bacula source failed!!! !!!!! " - echo " !!!!! incremental-tape test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== incremental-tape test Bacula source OK ===== " - echo " ===== incremental-tape test OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/incremental-test b/regress/tests/incremental-test deleted file mode 100755 index af4b922e53..0000000000 --- a/regress/tests/incremental-test +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory then create some -# new files, do an Incremental and restore those two files. -# -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 -echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list -echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list -cd ${cwd} -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting incremental-test ===" -echo " === Starting incremental-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/build/ficheriro1.txt -echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt -bin/bconsole -c bin/bconsole.conf <&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=$? -# -# 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 -if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! incremental-test Bacula source failed!!! !!!!! " - echo " !!!!! incremental-test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== incremental-test Bacula source OK ===== " - echo " ===== incremental-test OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/lib-tape-root b/regress/tests/lib-tape-root deleted file mode 100755 index 8701602d4e..0000000000 --- a/regress/tests/lib-tape-root +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the /lib directory -# then restore it. -# -cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -scripts/copy-tape-confs -scripts/cleanup-tape -echo "/lib" >/tmp/file-list -echo " " -echo " " -echo " === Starting lib-tape-root test ===" -echo " " -echo " " -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -cd / -${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original -cd ${cwd}/tmp/bacula-restores -${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/restored -cd ${cwd}/tmp -sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1 -sort <1 >original -# -sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1 -sort <1 >restored -rm -f 1 -# -cd ${cwd} -diff tmp/original tmp/restored 2>&1 1>/dev/nul -if [ $? != 0 ] ; then - echo " " - echo " " - echo " ===== lib-tape-root failed!!! ===== " - echo " ===== lib-tape-root failed!!! ===== " >>test.out - echo " " -else - echo " ===== lib-tape-root OK ===== " - echo " ===== lib-tape-root OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/lib-test-root b/regress/tests/lib-test-root deleted file mode 100755 index 10b6710378..0000000000 --- a/regress/tests/lib-test-root +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory -# then restore it. -# -MUID=`/usr/bin/id -u` -if [ $MUID != 0 ] ; then - echo " " - echo "You must be root to run this test." - echo " ===== lib-test-root failed!!! ===== " - echo " ===== lib-test-root failed!!! ===== " >>test.out - echo " " - exit 1 -fi -cwd=`pwd` -scripts/copy-test-confs -scripts/cleanup -echo "/lib" >/tmp/file-list -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. -echo " " -echo " " -echo " === Starting /lib save/restore test ===" -echo " " -echo " " -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -cd / -${cwd}/bin/testls -e ${cwd}/scripts/exclude-lib-test lib >${cwd}/tmp/original -cd ${cwd}/tmp/bacula-restores -${cwd}/bin/testls -e ${cwd}/scripts/exclude-lib-test lib >${cwd}/tmp/restored -cd ${cwd}/tmp -sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1 -sort <1 >original -# -sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1 -sort <1 >restored -rm -f 1 -# -cd ${cwd} -diff tmp/original tmp/restored 2>&1 1>/dev/nul -if [ $? != 0 ] ; then - echo " " - echo " " - echo " ===== lib-test-root failed!!! ===== " - echo " ===== lib-test-root failed!!! ===== " >>test.out - echo " " -else - echo " ===== lib-test-root OK ===== " - echo " ===== lib-test-root OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/query-test b/regress/tests/query-test deleted file mode 100755 index 7f371ff2e6..0000000000 --- a/regress/tests/query-test +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory then create some -# new files, do a Decremental then a bunch of query commands -# and finally restore the two files. -# -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 -echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list -echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list -cd ${cwd} -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting query-test ===" -echo " === Starting query-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/build/ficheriro1.txt -echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/build/ficheriro2.txt -bin/bconsole -c bin/bconsole.conf <&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=$? -# -# 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 -if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! query-test Bacula source failed!!! !!!!! " - echo " !!!!! query-test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== query-test Bacula source OK ===== " - echo " ===== query-test OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/recycle-test b/regress/tests/recycle-test deleted file mode 100755 index d20ff409c6..0000000000 --- a/regress/tests/recycle-test +++ /dev/null @@ -1,96 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting recycle-test ===" -echo " === Starting recycle-test ===" >working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/restore-by-file-tape b/regress/tests/restore-by-file-tape deleted file mode 100755 index 10959cdd3f..0000000000 --- a/regress/tests/restore-by-file-tape +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory -# to a tape where the maximum tape file size is set to 1M -# then restore a few files from it. Note, by setting the maximum -# file size to 1M, it runs very slow. There are about 64 files that -# are created during each of the two backups. -# -cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null -scripts/copy-tape-confs -scripts/cleanup-tape -echo "${cwd}/build" >/tmp/file-list -sed s%\^%${cwd}% ${cwd}/scripts/flist >${cwd}/tmp/restore2-list -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. -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 - -echo " " -echo " " -echo " === Starting restore-by-file-tape test ===" -echo " === Starting restore-by-file-tape test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -bin/bacula start 2>&1 >/dev/null -for i in `cat ${cwd}/tmp/restore2-list`; do - diff $i ${cwd}/tmp/bacula-restores$i - if [ $? != 0 ] ; then - dstat=1 - fi -done -grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null -bstat=$? -grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null -rstat=$? -if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! restore-by-file-tape test Bacula source failed!!! !!!!! " - echo " !!!!! restore-by-file-tape test failed!!! !!!!! " >>test.out - echo " " - bin/bacula stop 2>&1 >/dev/null - exit 1 -else - echo " First of two restores OK " -fi -rm -rf ${cwd}/tmp/bacula-restores -# -# Now do a second backup and restore -# -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -for i in `cat ${cwd}/tmp/restore2-list`; do - diff $i ${cwd}/tmp/bacula-restores$i - if [ $? != 0 ] ; then - dstat=1 - fi -done -grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null -bstat=$? -grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null -rstat=$? -if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! restore-by-file-tape test Bacula source failed!!! !!!!! " - echo " !!!!! restore-by-file-tape test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== restore-by-file-tape test Bacula source OK ===== " - echo " ===== restore-by-file-tape test OK ===== " >>test.out -# scripts/cleanup -fi diff --git a/regress/tests/restore-by-file-test b/regress/tests/restore-by-file-test deleted file mode 100755 index a0263631f6..0000000000 --- a/regress/tests/restore-by-file-test +++ /dev/null @@ -1,71 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -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/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/restore-disk-seek-test b/regress/tests/restore-disk-seek-test deleted file mode 100755 index 0b110bbc25..0000000000 --- a/regress/tests/restore-disk-seek-test +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -# -# Run a backup of the full bacula build directory, but with the -# Maximum File Size set. Then do a restore of a few files to kick in -# disk seeking (not yet enabled), and ensure that the restored files -# match. Even though disk seeking is not yet enabled, this is a good test, -# and once it is enabled, this will test it. -# -cwd=`pwd` -scripts/copy-test-confs -scripts/cleanup -echo "${cwd}/tmp/build" >/tmp/file-list -rm -rf ${cwd}/tmp/build -mkdir ${cwd}/tmp/build -# Copy only the .c files (to be restored) -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 -# At this point restore-list contains the list -# of files we will restore -rm -f 1 -cd ${cwd} -# Now backup *everything* -rm -rf ${cwd}/tmp/build -mkdir ${cwd}/tmp/build -cp -fp ${cwd}/build/src/dird/* ${cwd}/tmp/build -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. -# Enable MaximumFileSize -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 - -echo " " -echo " " -echo " === Starting restore-disk-seek-test ===" -echo " === Starting restore-disk-seek-test ===" >>working/log -echo " " - -bin/bacula start -v -v 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -# Now setup a control directory of only what we *should* restore -rm -rf ${cwd}/tmp/build -mkdir ${cwd}/tmp/build -cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build -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-disk-seek-test Bacula source failed!!! !!!!! " - echo " !!!!! restore-disk-seek-test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== restore-disk-seek-test Bacula source OK ===== " - echo " ===== restore-disk-seek-test OK ===== " >>test.out -# scripts/cleanup -# rm -rf ${cwd}/tmp/build -fi diff --git a/regress/tests/restore2-by-file-test b/regress/tests/restore2-by-file-test deleted file mode 100755 index 23570c1900..0000000000 --- a/regress/tests/restore2-by-file-test +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory using the compressed option -# then restore a few selected files. -# -cwd=`pwd` -scripts/copy-test-confs -scripts/cleanup -echo "${cwd}/build" >/tmp/file-list -sed s%\^%${cwd}% ${cwd}/scripts/flist >${cwd}/tmp/restore2-list -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting restore2-by-file-test ===" -echo " === Starting restore2-by-file-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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=$? -dstat=0 -for i in `cat ${cwd}/tmp/restore2-list`; do - diff $i ${cwd}/tmp/bacula-restores$i - if [ $? != 0 ] ; then - dstat=1 - fi -done -if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! restore2-by-file-test Bacula source failed!!! !!!!! " - echo " !!!!! restore2-by-file-test failed!!! !!!!! " >>test.out - echo " " - echo "Backup term status = $bstat" - echo "Restore term status = $rstat" - echo "Diff status = $dstat" - echo " " -else - echo " ===== restore2-by-file-test Bacula source OK ===== " - echo " ===== restore2-by-file-test OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/six-vol-test b/regress/tests/six-vol-test deleted file mode 100755 index 8beaeb8d67..0000000000 --- a/regress/tests/six-vol-test +++ /dev/null @@ -1,71 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting six-vol-test ===" -echo " === Starting six-vol-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/small-file-size-tape b/regress/tests/small-file-size-tape deleted file mode 100755 index 1d63936c90..0000000000 --- a/regress/tests/small-file-size-tape +++ /dev/null @@ -1,65 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. -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 - -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/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/span-vol-test b/regress/tests/span-vol-test deleted file mode 100755 index 6e1682efe6..0000000000 --- a/regress/tests/span-vol-test +++ /dev/null @@ -1,72 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting span-vol-test ===" -echo " === Starting span-vol-test ===" >working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/sparse-compressed-test b/regress/tests/sparse-compressed-test deleted file mode 100755 index 1ae38cbba7..0000000000 --- a/regress/tests/sparse-compressed-test +++ /dev/null @@ -1,60 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting sparse-compressed-test ===" -echo " === Starting sparse-compressed-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/sparse-test b/regress/tests/sparse-test deleted file mode 100755 index 40c84b83b0..0000000000 --- a/regress/tests/sparse-test +++ /dev/null @@ -1,63 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting sparse-test ===" -echo " === Starting sparse-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/test0 b/regress/tests/test0 deleted file mode 100755 index 0d0edd0b85..0000000000 --- a/regress/tests/test0 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -echo " " >test.out -rm -f bin/working/* diff --git a/regress/tests/two-jobs-test b/regress/tests/two-jobs-test deleted file mode 100755 index 2828ea19fa..0000000000 --- a/regress/tests/two-jobs-test +++ /dev/null @@ -1,92 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting two-jobs-test ===" -echo " === Starting two-jobs-test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/two-vol-test b/regress/tests/two-vol-test deleted file mode 100755 index 8297135caa..0000000000 --- a/regress/tests/two-vol-test +++ /dev/null @@ -1,62 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting two-vol-test ===" -echo " === Starting two-vol-test ===" >working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/two-volume-tape b/regress/tests/two-volume-tape deleted file mode 100755 index 2f603f9ee7..0000000000 --- a/regress/tests/two-volume-tape +++ /dev/null @@ -1,66 +0,0 @@ -#!/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-2tape-confs -scripts/prepare-two-tapes -echo "${cwd}/build" >/tmp/file-list -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. -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/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/usr-tape-root b/regress/tests/usr-tape-root deleted file mode 100755 index b4662bcfa8..0000000000 --- a/regress/tests/usr-tape-root +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the /usr directory -# then restore it. -# -cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -scripts/copy-tape-confs -scripts/cleanup-tape -echo "/usr" >/tmp/file-list -echo " " -echo " " -echo " === Starting usr-tape-root test ===" -echo " " -echo " " -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -cd / -${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original -cd ${cwd}/tmp/bacula-restores -${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/restored -cd ${cwd}/tmp -sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1 -sort <1 >original -# -sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1 -sort <1 >restored -rm -f 1 -# -cd ${cwd} -diff tmp/original tmp/restored 2>&1 1>/dev/nul -if [ $? != 0 ] ; then - echo " " - echo " " - echo " ===== usr-tape-root failed!!! ===== " - echo " ===== usr-tape-root failed!!! ===== " >>test.out - echo " " -else - echo " ===== usr-tape-root OK ===== " - echo " ===== usr-tape-root OK ===== " >>test.out - scripts/cleanup -fi diff --git a/regress/tests/verify-vol-test b/regress/tests/verify-vol-test deleted file mode 100755 index eea92ce232..0000000000 --- a/regress/tests/verify-vol-test +++ /dev/null @@ -1,59 +0,0 @@ -#!/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 -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting verify Volume Test ===" -echo " === Starting verify Volume Test ===" >>working/log -echo " " - -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/tests/weird-files-test b/regress/tests/weird-files-test deleted file mode 100755 index 00c5fb3734..0000000000 --- a/regress/tests/weird-files-test +++ /dev/null @@ -1,80 +0,0 @@ -#!/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 -# -# Note, we save the weird-files directory twice on purpose -# because this causes problems with hard linked files -# 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 -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo " " -echo " " -echo " === Starting weird filenames test ===" -echo " === Starting weird filenames test ===" >>working/log -echo " " - -# bin/bacula start 2>&1 >/dev/null -bin/bacula start -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -${cwd}/bin/testls weird-files | sort >${cwd}/tmp/original -cd tmp/bacula-restores${cwd} -${cwd}/bin/testls weird-files | sort >${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 diff --git a/regress/tests/weird-files2-test b/regress/tests/weird-files2-test deleted file mode 100755 index e44bcb6c6d..0000000000 --- a/regress/tests/weird-files2-test +++ /dev/null @@ -1,91 +0,0 @@ -#!/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 -Rp weird-files weird-files2 -echo "${cwd}/weird-files2" >/tmp/file-list -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -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/bconsole -c bin/bconsole.conf <&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 diff --git a/regress/weird-files.tar.gz b/regress/weird-files.tar.gz deleted file mode 100644 index d1b3a21226..0000000000 Binary files a/regress/weird-files.tar.gz and /dev/null differ