From 04ad34b06e517d6af0e0bc5a7a4ef1cb81bb8b57 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 26 Nov 2005 09:38:16 +0000 Subject: [PATCH] Updates --- docs/developers/Makefile.in | 6 +- docs/manual-de/autochangers.tex | 22 +++ docs/manual-de/console.tex | 262 +++++++++++++++++--------------- docs/manual-de/disk.tex | 142 ++++++++++++++--- docs/manual-de/fileset.tex | 94 +++++++++++- docs/manual-de/install.tex | 24 +++ docs/manual-de/monitorconf.tex | 42 +++-- docs/manual-de/sqlite.tex | 34 ++++- docs/manual/Makefile.in | 23 ++- docs/manual/autochangers.tex | 22 +++ docs/manual/console.tex | 262 +++++++++++++++++--------------- docs/manual/disk.tex | 142 ++++++++++++++--- docs/manual/fileset.tex | 94 +++++++++++- docs/manual/install.tex | 24 +++ docs/manual/monitorconf.tex | 42 +++-- docs/manual/sqlite.tex | 34 ++++- 16 files changed, 931 insertions(+), 338 deletions(-) diff --git a/docs/developers/Makefile.in b/docs/developers/Makefile.in index 1da44871..375f57a1 100644 --- a/docs/developers/Makefile.in +++ b/docs/developers/Makefile.in @@ -72,7 +72,11 @@ web: -contents_in_nav -toc_stars -white -notransparent developers >/dev/null ./translate_images.pl --to_meaningful_names developers/Developers_Guide.html @cp -f developers/Developers_Guide.html developers/index.html - @rm -f *.eps *.gif *.jpg developers/*.eps *.old + @rm -f *.eps *.gif *.jpg developers/*.eps *.old + @rm -f developers/idle.png + @rm -f developers/win32-*.png developers/wx-console*.png developers/xp-*.png + @rm -f developers/*.pl developers/*.log developers/*.aux developers/*.idx + @rm -f developers/*.out WARNINGS texcheck: ./check_tex.pl developers.tex diff --git a/docs/manual-de/autochangers.tex b/docs/manual-de/autochangers.tex index 13df3ec6..e05fb068 100644 --- a/docs/manual-de/autochangers.tex +++ b/docs/manual-de/autochangers.tex @@ -121,6 +121,28 @@ the Bacula {\bf Changer Device = } directive. Please check that your Storage daemon has permission to access this device. +The following tip for FreeBSD users comes from Danny Butroyd: +n reboot bacula will NOT have permissions to +control the device /dev/pass0 (assuming this is your changer device). +To get around this just edit the /etc/devfs.conf file and add the +following to the bottom of the config file: +\footnotesize +\begin{verbatim} +own pass0 root:bacula +perm pass0 0666 +own nsa0.0 root:bacula +perm nsa0.0 0666 +\end{verbatim} +\normalsize +I have given the bacula group permission to write to the nsa0.0 device +too just to be on the safe side. To bring these changes into effect +just run:- + +/etc/rc.d/devfs restart + +Basically this will stop you having to change permissions on these +devices to make bacula work when operating the AutoChanger after a reboot. + \label{scripts} \subsection*{Example Scripts} diff --git a/docs/manual-de/console.tex b/docs/manual-de/console.tex index cb6bca96..6b68dfc6 100644 --- a/docs/manual-de/console.tex +++ b/docs/manual-de/console.tex @@ -5,10 +5,12 @@ \label{_ConsoleChapter} \index[general]{Console!Bacula } \index[general]{Bacula Console } +\index[console]{Console!Bacula } +\index[console]{Bacula Console } \addcontentsline{toc}{section}{Bacula Console} \subsection*{General} -\index[general]{General } +\index[general]{General} \addcontentsline{toc}{subsection}{General} The {\bf Bacula Console} (sometimes called the User Agent) is a program that @@ -34,9 +36,12 @@ for Bacula to be able to write on more than one tape, because when Bacula requests a new tape, it waits until the user, via the Console program, indicates that the new tape is mounted. -\subsection*{Configuration} -\index[general]{Configuration } -\addcontentsline{toc}{subsection}{Configuration} +\subsection*{Console Configuration} +\index[general]{Console Configuration} +\index[general]{Configuration!Console} +\index[console]{Console Configuration} +\index[console]{Configuration!Console} +\addcontentsline{toc}{subsection}{Console Configuration} When the Console starts, it reads a standard Bacula configuration file named {\bf bconsole.conf} or {\bf gnome-console.conf} in the case of the GNOME @@ -50,6 +55,8 @@ this document. \subsection*{Running the Console Program} \index[general]{Running the Console Program } \index[general]{Program!Running the Console } +\index[console]{Running the Console Program } +\index[console]{Program!Running the Console } \addcontentsline{toc}{subsection}{Running the Console Program} After launching the Console program (bconsole), it will prompt you for the @@ -95,6 +102,8 @@ will display all the Pool resource records. \subsection*{Stopping the Console Program} \index[general]{Program!Stopping the Console } \index[general]{Stopping the Console Program } +\index[console]{Program!Stopping the Console } +\index[console]{Stopping the Console Program } \addcontentsline{toc}{subsection}{Stopping the Console Program} Normally, you simply enter {\bf quit} or {\bf exit} and the Console program @@ -116,6 +125,8 @@ will most likely be able to cancel at the next prompt. \subsection*{Alphabetic List of Console Commands} \index[general]{Commands!Alphabetic List of Console } \index[general]{Alphabetic List of Console Commands } +\index[console]{Commands!Alphabetic List of Console } +\index[console]{Alphabetic List of Console Commands } \addcontentsline{toc}{subsection}{Alphabetic List of Console Commands} The following commands are currently implemented: @@ -123,7 +134,7 @@ The following commands are currently implemented: \begin{description} \item [{add [pool=\lt{}pool-name\gt{} storage=\lt{}storage\gt{} jobid=\lt{}JobId\gt{}]} ] - \index[console]{add [pool } + \index[console]{add} This command is used to add Volumes to an existing Pool. The Volume names entered are placed in the Catalog and thus become available for backup operations. Normally, the {\bf label} command is used rather than this @@ -137,74 +148,77 @@ if you are importing a tape from another site. Please see the {\bf label} command below for the list of legal characters in a Volume name. \item [autodisplay on/off] - \index[console]{autodisplay on/off } - This command accepts {\bf on} or {\bf off} as an argument, and turns -auto-display of messages on or off respectively. The default for the console -program is {\bf off}, which means that you will be notified when there are -console messages pending, but they will not automatically be displayed. The -default for the gnome-console program is {\bf on}, which means that messages -will be displayed when they are received (usually within 5 seconds of them -being generated). - -When autodisplay is turned off, you must explicitly retrieve the messages -with the {\bf messages} command. When autodisplay is turned on, the messages -will be displayed on the console as they are received. + \index[console]{autodisplay on/off} + This command accepts {\bf on} or {\bf off} as an argument, and turns + auto-display of messages on or off respectively. The default for the + console program is {\bf off}, which means that you will be notified when + there are console messages pending, but they will not automatically be + displayed. The default for the gnome-console program is {\bf on}, which + means that messages will be displayed when they are received (usually + within 5 seconds of them being generated). + + When autodisplay is turned off, you must explicitly retrieve the + messages with the {\bf messages} command. When autodisplay is turned + on, the messages will be displayed on the console as they are received. \item [automount on/off] - \index[console]{automount on/off } - This command accepts {\bf on} or {\bf off} as the argument, and turns -auto-mounting of the tape after a {\bf label} command on or off respectively. -The default is {\bf on}. If {\bf automount} is turned off, you must -explicitly {\bf mount} the tape after a label command to use it. + \index[console]{automount on/off} + This command accepts {\bf on} or {\bf off} as the argument, and turns + auto-mounting of the tape after a {\bf label} command on or off + respectively. The default is {\bf on}. If {\bf automount} is turned + off, you must explicitly {\bf mount} the tape after a label command to + use it. \item [{cancel [jobid=\lt{}number\gt{} job=\lt{}job-name\gt{}]}] - \index[console]{cancel [jobid } - This command is used to cancel a job and accepts {\bf jobid=nnn} or {\bf -job=xxx} as an argument where nnn is replaced by the JobId and xxx is -replaced by the job name. If you do not specify a keyword, the Console -program will prompt you with the names of all the active jobs allowing you to -choose one. + \index[console]{cancel jobid} + This command is used to cancel a job and accepts {\bf jobid=nnn} or {\bf + job=xxx} as an argument where nnn is replaced by the JobId and xxx is + replaced by the job name. If you do not specify a keyword, the Console + program will prompt you with the names of all the active jobs allowing + you to choose one. -Once a Job is marked to be canceled, it may take a bit of time (generally -within a minute) before it actually terminates, depending on what operations -it is doing. + Once a Job is marked to be canceled, it may take a bit of time + (generally within a minute) before it actually terminates, depending on + what operations it is doing. \item [{ create [pool=\lt{}pool-name\gt{}]}] - \index[console]{create [pool } - This command is used to create a Pool record in the database using the Pool -resource record defined in the Director's configuration file. So in a sense, -this command simply transfers the information from the Pool resource in the -configuration file into the Catalog. Normally this command is done -automatically for you when the Director starts providing the Pool is -referenced within a Job resource. If you use this command on an existing -Pool, it will automatically update the Catalog to have the same information -as the Pool resource. After creating a Pool, you will most likely use the -{\bf label} command to label one or more volumes and add their names to the -Media database. - -When starting a Job, if Bacula determines that there is no Pool record in the -database, but there is a Pool resource of the appropriate name, it will -create it for you. If you want the Pool record to appear in the database -immediately, simply use this command to force it to be created. + \index[console]{create pool} + This command is used to create a Pool record in the database using the + Pool resource record defined in the Director's configuration file. So + in a sense, this command simply transfers the information from the Pool + resource in the configuration file into the Catalog. Normally this + command is done automatically for you when the Director starts providing + the Pool is referenced within a Job resource. If you use this command + on an existing Pool, it will automatically update the Catalog to have + the same information as the Pool resource. After creating a Pool, you + will most likely use the {\bf label} command to label one or more + volumes and add their names to the Media database. + + When starting a Job, if Bacula determines that there is no Pool record + in the database, but there is a Pool resource of the appropriate name, + it will create it for you. If you want the Pool record to appear in the + database immediately, simply use this command to force it to be created. \item [{ delete [volume=\lt{}vol-name\gt{} pool=\lt{}pool-name\gt{} job jobid=\lt{}id\gt{}] }] - \index[console]{delete } -The delete command is used to delete a Volume, Pool or Job record from the -Catalog as well as all associated Volume records that were created. This -command operates only on the Catalog database and has no effect on the actual -data written to a Volume. This command can be dangerous and we strongly -recommend that you do not use it unless you know what you are doing. - -If the keyword {\bf Volume} appears on the command line, the named Volume -will be deleted from the catalog, if the keyword {\bf Pool} appears on the -command line, a Pool will be deleted, and if the keyword {\bf Job} appears on -the command line, a Job and all its associated records (File and JobMedia) -will be deleted from the catalog. The full form of this command is: + \index[console]{delete} + The delete command is used to delete a Volume, Pool or Job record from + the Catalog as well as all associated catalog Volume records that were + created. This command operates only on the Catalog database and has no + effect on the actual data written to a Volume. This command can be + dangerous and we strongly recommend that you do not use it unless you + know what you are doing. + + If the keyword {\bf Volume} appears on the command line, the named + Volume will be deleted from the catalog, if the keyword {\bf Pool} + appears on the command line, a Pool will be deleted, and if the keyword + {\bf Job} appears on the command line, a Job and all its associated + records (File and JobMedia) will be deleted from the catalog. The full + form of this command is: delete pool=\lt{}pool-name\gt{} -or + or delete volume=\lt{}volume-name\gt{} pool=\lt{}pool-name\gt{} or @@ -212,11 +226,12 @@ delete JobId=\lt{}job-id\gt{} JobId=\lt{}job-id2\gt{} ... or delete Job JobId=n,m,o-r,t ... -The first form deletes a Pool record from the catalog database. The second -form deletes a Volume record from the specified pool in the catalog database. -The third form deletes the specified Job record from the catalog database. -The last form deletes JobId records for JobIds n,m,o,p, q,r, and t. Where each -one of the n,m,... is, of course, a number. + The first form deletes a Pool record from the catalog database. The + second form deletes a Volume record from the specified pool in the + catalog database. The third form deletes the specified Job record from + the catalog database. The last form deletes JobId records for JobIds + n,m,o,p, q,r, and t. Where each one of the n,m,... is, of course, a + number. \label{estimate} \item [estimate] @@ -241,8 +256,9 @@ one of the n,m,... is, of course, a number. estimate job=\lt{}job-name\gt{} listing client=\lt{}client-name\gt{} fileset=\lt{}fileset-name\gt{} level=\lt{}level-name\gt{} -Specification of the {\bf job} is sufficient, but you can also override the -client, fileset and/or level by specifying them on the estimate command line. + Specification of the {\bf job} is sufficient, but you can also override + the client, fileset and/or level by specifying them on the estimate + command line. As an example, you might do: @@ -274,22 +290,23 @@ NightlySave} during an Incremental save and put it in the file {\bf label storage=\lt{}storage-name\gt{} volume=\lt{}volume-name\gt{} slot=\lt{}slot\gt{} -If you leave out any part, you will be prompted for it. The media type is -automatically taken from the Storage resource definition that you supply. -Once the necessary information is obtained, the Console program contacts the -specified Storage daemon and requests that the tape be labeled. If the tape -labeling is successful, the Console program will create a Volume record in -the appropriate Pool. + If you leave out any part, you will be prompted for it. The media type + is automatically taken from the Storage resource definition that you + supply. Once the necessary information is obtained, the Console program + contacts the specified Storage daemon and requests that the tape be + labeled. If the tape labeling is successful, the Console program will + create a Volume record in the appropriate Pool. -The Volume name is restricted to letters, numbers, and the special characters -hyphen ({\bf -}), underscore ({\bf \_}), colon ({\bf :}), and period ({\bf -.}). All other characters including a space are illegal. This restriction is -to ensure good readability of Volume names to reduce operator errors. + The Volume name is restricted to letters, numbers, and the special + characters hyphen ({\bf -}), underscore ({\bf \_}), colon ({\bf :}), and + period ({\bf .}). All other characters including a space are illegal. + This restriction is to ensure good readability of Volume names to reduce + operator errors. -Please note, when labeling a blank tape, Bacula will get {\bf read I/O error} when -it attempts to ensure that the tape is already labeled. If you wish to avoid -getting these messages, please write and EOF mark on your tape before -attempting to label it: + Please note, when labeling a blank tape, Bacula will get {\bf read I/O + error} when it attempts to ensure that the tape is already labeled. If + you wish to avoid getting these messages, please write and EOF mark on + your tape before attempting to label it: \footnotesize \begin{verbatim} @@ -304,11 +321,11 @@ The label command can fail for a number of reasons: \begin{enumerate} \item The Volume name you specify is already in the Volume database. \item The Storage daemon has a tape already mounted on the device, in which -case you must {\bf unmount} the device, insert a blank tape, then do the -{\bf label} command. + case you must {\bf unmount} the device, insert a blank tape, then do the + {\bf label} command. \item The tape in the device is already a Bacula labeled tape. (Bacula will -never relabel a Bacula labeled tape unless it is recycled and you use the -{\bf relabel} command). + never relabel a Bacula labeled tape unless it is recycled and you use the + {\bf relabel} command). \item There is no tape in the drive. \end{enumerate} @@ -361,10 +378,10 @@ update storage=xxx pool=yyy slots=1-5,10 barcodes \normalsize \item [list] - \index[console]{list } - The list command lists the requested contents of the Catalog. The various - fields of each record are listed on a single line. The various forms - of the list command are: + \index[console]{list} + The list command lists the requested contents of the Catalog. The + various fields of each record are listed on a single line. The various + forms of the list command are: \footnotesize \begin{verbatim} list jobs @@ -544,7 +561,7 @@ python restart \label{ManualPruning} \item [prune] - \index[console]{prune } + \index[console]{prune} The Prune command allows you to safely remove expired database records from Jobs and Volumes. This command works only on the Catalog database and does not affect data written to Volumes. In all cases, the Prune @@ -560,7 +577,7 @@ volume=\lt{}volume-name\gt{} Append, otherwise the pruning will not take place. \item [purge] - \index[console]{purge } + \index[console]{purge} The Purge command will delete associated Catalog database records from Jobs and Volumes without considering the retention period. {\bf Purge} works only on the Catalog database and does not affect data written to @@ -599,7 +616,7 @@ relabel storage=\lt{}storage-name\gt{} oldvolume=\lt{}old-volume-name\gt{} on the Volume is lost and cannot be recovered. \item [release] - \index[console]{release } + \index[console]{release} This command is used to cause the Storage daemon to rewind (release) the current tape in the drive, and to re-read the Volume label the next time the tape is used. @@ -641,7 +658,7 @@ release storage=\lt{}storage-name\gt{} \item [restore] - \index[console]{restore } + \index[console]{restore} The restore command allows you to select one or more Jobs (JobIds) to be restored using various methods. Once the JobIds are selected, the File records for those Jobs are placed in an internal Bacula directory tree, @@ -663,7 +680,7 @@ restore storage=\lt{}storage-name\gt{} client=\lt{}client-name\gt{} manual. \item [run] - \index[console]{run } + \index[console]{run} This command allows you to schedule jobs to be run immediately. The full form of the command is: @@ -754,7 +771,7 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | file. You must explicitly delete the file when you are done. \item [show] - \index[console]{show } + \index[console]{show} The show command will list the Director's resource records as defined in the Director's configuration file (normally {\bf bacula-dir.conf}). This command is used mainly for debugging purposes by developers. The @@ -764,7 +781,7 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | with the {\bf list}, which displays the contents of the catalog. \item [sqlquery] - \index[dir]{sqlquery } + \index[dir]{sqlquery} The sqlquery command puts the Console program into SQL query mode where each line you enter is concatenated to the previous line until a semicolon (;) is seen. The semicolon terminates the command, which is @@ -784,7 +801,7 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | SQLite documentation. \item [status] - \index[dir]{status } + \index[dir]{status} This command will display the status of the next jobs that are scheduled during the next twenty-four hours as well as the status of currently running jobs. The full form of this command is: @@ -826,7 +843,7 @@ status [all | dir=\lt{}dir-name\gt{} | director | time, hence it is simply "waiting execution" \item [unmount] - \index[console]{unmount } + \index[console]{unmount} This command causes the indicated Bacula Storage daemon to unmount the specified device. The forms of the command are the same as the mount command: \footnotesize @@ -839,7 +856,7 @@ unmount [ jobid=\lt{}id\gt{} | job=\lt{}job-name\gt{} ] \label{UpdateCommand} \item [update] - \index[console]{update } + \index[console]{update} This command will update the catalog for either a specific Pool record, a Volume record, or the Slots in an autochanger with barcode capability. In the case of updating a Pool record, the new information will be automatically taken @@ -875,29 +892,30 @@ wish to change. The following Volume parameters may be changed: \end{verbatim} \normalsize -For slots {\bf update slots}, Bacula will obtain a list of slots and their -barcodes from the Storage daemon, and for each barcode found, it will -automatically update the slot in the catalog Media record to correspond to -the new value. This is very useful if you have moved cassettes in the -magazine, or if you have removed the magazine and inserted a different one. -As the slot of each Volume is updated, the InChanger flag for that Volume -will also be set, and any other Volumes in the Pool will have their InChanger -flag turned off. This permits Bacula to know what magazine (tape holder) is -currently in the autochanger. - -If you do not have barcodes, you can accomplish the same thing in version -1.33 and later by using the {\bf update slots scan} command. The {\bf scan} -keyword tells Bacula to physically mount each tape and to read its -VolumeName. - -For Pool {\bf update pool}, Bacula will move the Volume record from its -existing pool to the pool specified. - -For {\bf Volume from Pool} and {\bf All Volumes from Pool}, the following -values are updated from the Pool record: Recycle, VolRetention, -VolUseDuration, MaxVolJobs, MaxVolFiles, and MaxVolBytes. - -The full form of the update command with all command line arguments is: + For slots {\bf update slots}, Bacula will obtain a list of slots and + their barcodes from the Storage daemon, and for each barcode found, it + will automatically update the slot in the catalog Media record to + correspond to the new value. This is very useful if you have moved + cassettes in the magazine, or if you have removed the magazine and + inserted a different one. As the slot of each Volume is updated, the + InChanger flag for that Volume will also be set, and any other Volumes + in the Pool will have their InChanger flag turned off. This permits + Bacula to know what magazine (tape holder) is currently in the + autochanger. + + If you do not have barcodes, you can accomplish the same thing in + version 1.33 and later by using the {\bf update slots scan} command. + The {\bf scan} keyword tells Bacula to physically mount each tape and to + read its VolumeName. + + For Pool {\bf update pool}, Bacula will move the Volume record from its + existing pool to the pool specified. + + For {\bf Volume from Pool} and {\bf All Volumes from Pool}, the + following values are updated from the Pool record: Recycle, + VolRetention, VolUseDuration, MaxVolJobs, MaxVolFiles, and MaxVolBytes. + + The full form of the update command with all command line arguments is: \footnotesize \begin{verbatim} diff --git a/docs/manual-de/disk.tex b/docs/manual-de/disk.tex index 90495327..dda7a1ce 100644 --- a/docs/manual-de/disk.tex +++ b/docs/manual-de/disk.tex @@ -75,6 +75,12 @@ Although this is quite simple, there are a number of problems. The first is that unless you specify otherwise, Bacula will always write to the same volume until you run out of disk space. This problem is addressed below. +In addition, if you want to use concurrent jobs that write to several +different volumes at the same time, you will need to understand a number +of other details. An example of such a configuration is given +at the end of this chapter under \ilink{Concurrent Disk +Jobs}{ConcurrentDiskJobs}. + \subsubsection*{Pool Options to Limit the Volume Usage} \index[general]{Usage!Pool Options to Limit the Volume } \index[general]{Pool Options to Limit the Volume Usage } @@ -282,6 +288,48 @@ also be done by setting {\bf Recycle Oldest Volume = yes} or {\bf Recycle Current Volume = yes}. In this case, when Bacula needs a new Volume, it will prune the specified volume. +\label{ConcurrentDiskJobs} +\subsection*{Concurrent Disk Jobs} +\index[general]{Concurrent Disk Jobs} +\addcontentsline{toc}{subsection}{Concurrent Disk Jobs} +Above, we discussed how you could have a single device named {\bf +FileBackup} that writes to volumes in {\bf /home/bacula/backups}. +You can, in fact, run multiple concurrent jobs using the +Storage definition given with this example, and all the jobs will +simultaneously write into the Volume that is being written. + +Now suppose you want to use multiple Pools, which means multiple +Volumes, or suppose you want each client to have its own Volume +and perhaps its own directory such as {\bf /home/bacula/client1} +and {\bf /home/bacula/client2} ... With the single Storage and Device +definition above, neither of these two is possible. Why? Because +Bacula disk storage follows the same rules as tape devices. Only +one Volume can be mounted on any Device at any time. If you want +to simultaneously write multiple Volumes, you will need multiple +Device resources in your bacula-sd.conf file, and thus multiple +Storage resources in your bacula-dir.conf. + +OK, so now you should understand that you need multiple Device definitions +in the case of different directorys or different Pools, but you also +need to know that the catalog data that Bacula keeps contains only +the Media Type and not the specific storage device. This permits a tape +for example to be re-read on any compatible tape drive. The compatibility +being determined by the Media Type. The same applies to disk storage. +Since a volume that is written by a Device in say directory {\bf +/home/bacula/backups} cannot be read by a Device with an Archive Device +definition of {\bf /home/bacula/client1}, you will not be able to +restore all your files if you give both those devices +{\bf Media Type = File}. During the restore, Bacula will simply choose +the first available device, which may not be the correct one. If this +is confusing, just remember that the Directory has only the Media Type +and the Volume name. It does not know the {\bf Archive Device} (or the +full path) that is specified in the Storage daemon. Thus you must +explicitly tie your Volumes to the correct Device by using the Media Type. + +The example shown below shows a case where there are two clients, each +using its own Pool and storing their Volumes in different directories. + + \label{Example2} \subsection*{An Example} \index[general]{Example } @@ -289,9 +337,14 @@ prune the specified volume. The following example is not very practical, but can be used to demonstrate the proof of concept in a relatively short period of time. The example -consists of a single client that is backed up to a set of 12 archive files -(Volumes). Each Volume is used (written) only once, and there are four Full -saves done every hour (so the whole thing cycles around after three hours). +consists of a two clients that are backed up to a set of 12 archive files +(Volumes) for each client into different directories on the Storage +maching. Each Volume is used (written) only once, and there are four Full +saves done every hour (so the whole thing cycles around after three hours). + +What is key here is that each physical device on the Storage daemon +has a different Media Type. This allows the Director to choose the +correct device for restores ... The Director's configuration file is as follows: @@ -306,10 +359,10 @@ Director { } Schedule { Name = "FourPerHour" - Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:05 - Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:20 - Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:35 - Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:50 + Run = Level=Full hourly at 0:05 + Run = Level=Full hourly at 0:20 + Run = Level=Full hourly at 0:35 + Run = Level=Full hourly at 0:50 } Job { Name = "RecycleExample" @@ -322,6 +375,19 @@ Job { Pool = Recycle Schedule = FourPerHour } + +Job { + Name = "RecycleExample2" + Type = Backup + Level = Full + Client = Roxie + FileSet= "Example FileSet" + Messages = Standard + Storage = FileStorage1 + Pool = Recycle1 + Schedule = FourPerHour +} + FileSet { Name = "Example FileSet" Include = compression=GZIP signature=SHA1 { @@ -334,6 +400,14 @@ Client { Catalog = BackupDB Password = client_password } + +Client { + Name = Roxie + Address = roxie + Catalog = BackupDB + Password = client1_password +} + Storage { Name = FileStorage Address = rufus @@ -341,6 +415,15 @@ Storage { Device = RecycleDir Media Type = File } + +Storage { + Name = FileStorage1 + Address = rufus + Password = local_storage_password + Device = RecycleDir1 + Media Type = File1 +} + Catalog { Name = BackupDB dbname = bacula; user = bacula; password = "" @@ -353,12 +436,24 @@ Pool { Name = Recycle Use Volume Once = yes Pool Type = Backup - LabelFormat = "Vol" + LabelFormat = "Recycle-" AutoPrune = yes VolumeRetention = 2h Maximum Volumes = 12 Recycle = yes } + +Pool { + Name = Recycle1 + Use Volume Once = yes + Pool Type = Backup + LabelFormat = "Recycle1-" + AutoPrune = yes + VolumeRetention = 2h + Maximum Volumes = 12 + Recycle = yes +} + \end{verbatim} \normalsize @@ -386,6 +481,18 @@ Device { RemovableMedia = no; AlwaysOpen = no; } + +Device { + Name = RecycleDir1 + Media Type = File1 + Archive Device = /home/bacula/backups1 + LabelMedia = yes; + Random Access = Yes; + AutomaticMount = yes; + RemovableMedia = no; + AlwaysOpen = no; +} + Messages { Name = Standard director = my-dir = all @@ -393,12 +500,6 @@ Messages { \end{verbatim} \normalsize -In this example, the Jobs will be backed up to directory {\bf -/home/bacula/backups} with Volume names Vol0001, Vol0002, ... Vol0012. Every -backup Job will write a new volume cycling through the volume numbers, and two -hours after a job has started, the volume will be pruned {\bf Volume Retention -= 2h}. - With a little bit of work, you can change the above example into a weekly or monthly cycle (take care about the amount of archive disk space used). @@ -510,7 +611,7 @@ Storage resource in the Director when doing a restore. \label{MultipleClients} \subsection*{Considerations for Multiple Clients} \index[general]{Clients!Considerations for Multiple } -\index[general]{Considerations for Multiple Clients } +\index[general]{Multiple Clients} \addcontentsline{toc}{subsection}{Considerations for Multiple Clients} If we take the above example and add a second Client, here are a few @@ -591,20 +692,21 @@ Client { Catalog = BackupDB Password = client2_password } -# Two Storage definitions permits different directories +# Two Storage definitions with differen Media Types +# permits different directories Storage { Name = File1 Address = rufus Password = local_storage_password Device = client1 - Media Type = File + Media Type = File1 } Storage { Name = File2 Address = rufus Password = local_storage_password Device = client2 - Media Type = File + Media Type = File2 } Catalog { Name = BackupDB @@ -657,7 +759,7 @@ Director { # Archive directory for Client1 Device { Name = client1 - Media Type = File + Media Type = File1 Archive Device = /home/bacula/client1 LabelMedia = yes; Random Access = Yes; @@ -668,7 +770,7 @@ Device { # Archive directory for Client2 Device { Name = client2 - Media Type = File + Media Type = File2 Archive Device = /home/bacula/client2 LabelMedia = yes; Random Access = Yes; diff --git a/docs/manual-de/fileset.tex b/docs/manual-de/fileset.tex index 57968166..c76fbd36 100644 --- a/docs/manual-de/fileset.tex +++ b/docs/manual-de/fileset.tex @@ -22,13 +22,13 @@ Bacula will ensure that the next backup is always a Full save. \begin{description} \item [FileSet] -\index[dir]{FileSet } +\index[dir]{FileSet} Start of the FileSet resource. One {\bf FileSet} resource must be defined for each Backup job. \item [Name = \lt{}name\gt{}] -\index[dir]{Name } -The name of the FileSet resource. This directive is required. +\index[dir]{Name} + The name of the FileSet resource. This directive is required. \item [Ignore FileSet Changes = \lt{}yes|no\gt{}] \index[dir]{Ignore FileSet Changes} @@ -69,7 +69,7 @@ subdirectories of any directory in the Include File list will be backed up. Note, see below for the definition of \lt{}file-list\gt{}. The Include resource may also contain one or more Options resources that specify options such as compression to be applied to all or any subset of -the files found for backup. +the files found when processing the file-list for backup. There can be any number of {\bf Include} resources within the FileSet, each having its own list of directories or files to be backed up and the backup @@ -77,6 +77,13 @@ options defined by one or more Options resources. The {\bf file-list} consists of one file or directory name per line. Directory names should be specified without a trailing slash with Unix path notation. +Windows users, please take note to specify directories (even c:/...) in +Unix path notation. If you use Windows conventions, you will most likely +not be able to restore your files due to the fact that the Windows +path separator was defined as an escape character long before Windows +existed, and Bacula adheres to that convention (i.e. \\ means the next character +appears as itself). + You should always specify a full path for every directory and file that you list in the FileSet. In addition, on Windows machines, you should {\bf always} prefix the directory or filename with the drive specification in @@ -139,6 +146,11 @@ the filenames to determine if and how the file should be backed up. The Options resources are applied in the order they are specified in the FileSet until the first one that matches. +A key point is that in the absence of an Option or no other Option is +matched, every file is accepted for backing up. This means that if +you want to exclude something, you must explicitly specify an Option +with an {\bf exclude = yes} and some pattern matching. + Once Bacula determines that the Options resource matches the file under consideration, that file will be saved without looking at any other Options resources that may be present. This means that any wild cards must appear @@ -148,7 +160,8 @@ If for some reason, Bacula applies all the Options resources to a file under consideration for backup, but there are no matches (generally because of wild cards that don't match), Bacula as a default will then backup the file. This is quite logical if you consider the case of no Options, where -you want everything to be backed up. +you want everything to be backed up, and it is important to keep in +mind when excluding as mentioned above. However, one additional point is that in the case that no match was found, Bacula will use the options found in @@ -482,6 +495,8 @@ Change: 2005-11-06 12:36:48.000000000 +0100 specified, and they will be applied in turn until the first one that matches. It is recommended to enclose the string in double quotes. + An example of excluding with the WildFile option on Win32 machines is + presented below. \item [wilddir=\lt{}string\gt{}] \index[dir]{wilddir } @@ -494,6 +509,8 @@ Change: 2005-11-06 12:36:48.000000000 +0100 matches. Note, if you exclude a directory, no files or directories below it will be matched. It is recommended to enclose the string in double quotes. + An example of excluding with the WildDir option on Win32 machines is + presented below. \item [regex=\lt{}string\gt{}] @@ -1053,6 +1070,73 @@ you will be backing up an NFS mounted partition ({\bf /mnt/matou}), and since case, you will get yourself into a recursive loop and the backup will never end. +As a final example, let's say that you have only one or two +subdirectories of /home that you want to backup. For example, +you want to backup only subdirectories beginning with the letter +a and the letter b -- i.e. /home/a* and /home/b*. Now, you might first +try: +\footnotesize +\begin{verbatim} +FileSet { + Name = "Full Set" + Include { + Options { + wilddir = "/home/a*" + wilddir = "/home/b*" + } + File = /home + } +} +\end{verbatim} +\normalsize + +The problem is that the above will include everything in /home. To get +things to work correctly, you need to start with the idea of exclusion +instead of inclusion. So, you could simply exclude all directories +except the two you want using: +\footnotesize +\begin{verbatim} +FileSet { + Name = "Full Set" + Include { + Options { + RegexDir = "^/home/[c-z]" + exclude = yes + } + File = /home + } +} +\end{verbatim} +\normalsize + +And assuming that all subdirectories start with a lowercase letter, this +would work. + +An alternative would be to include the two subdirectories desired and +exclude everything else: +\footnotesize +\begin{verbatim} +FileSet { + Name = "Full Set" + Include { + Options { + wilddir = "/home/a*" + wilddir = "/home/b*" + } + Options { + RegexDir = "^.?*$" + exclude = yes + } + File = /home + } +} +\end{verbatim} +\normalsize + +I haven't actually tried the above two examples, so you may need to +tweak them to get them to work right. + + \subsubsection*{Backing up Raw Partitions} \index[general]{Backing up!Partitions } \index[general]{Backing up Raw Partitions } diff --git a/docs/manual-de/install.tex b/docs/manual-de/install.tex index 187775c3..481fabeb 100644 --- a/docs/manual-de/install.tex +++ b/docs/manual-de/install.tex @@ -1014,6 +1014,30 @@ if they do not exist, but it will not automatically create the pid-dir, subsys-dir, or working-dir, so you must ensure that they exist before running Bacula for the first time. +Note, you may need to install the following packages to build Bacula +from source: +\footnotesize +\begin{verbatim} +SUNWbinutils, +SUNWarc, +SUNWhea, +SUNWGcc, +SUNWGnutls +SUNWGnutls-devel +SUNWGmake +SUNWgccruntime +SUNWlibgcrypt +SUNWzlib +SUNWzlibs +SUNWbinutilsS +SUNWGmakeS +SUNWlibm + +export +PATH=/usr/bin::/usr/ccs/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/usr/ucb:/usr/sbin +\end{verbatim} +\normalsize + \subsection*{FreeBSD} \index[general]{FreeBSD } \addcontentsline{toc}{subsection}{FreeBSD} diff --git a/docs/manual-de/monitorconf.tex b/docs/manual-de/monitorconf.tex index 0d12b23f..2c9162e1 100644 --- a/docs/manual-de/monitorconf.tex +++ b/docs/manual-de/monitorconf.tex @@ -219,17 +219,39 @@ resource of the Storage daemon's configuration file. This record is required. \end{description} -\subsection*{Sample Monitor configuration file and related daemons' -configuration records.} +\subsection*{Tray Monitor Security} +\index[general]{Tray Monitor Security} +\addcontentsline{toc}{subsection}{Tray Monitor Security} + +There is no security problem in relaxing the permissions on +tray-monitor.conf as long as FD, SD and DIR are configured properly, so +the passwords contained in this file only gives access to the status of +the daemons. It could be a security problem if you consider the status +information as potentially dangereous (I don't think it is the case). + +Concerning Director's configuration: \\ +In tray-monitor.conf, the password in the Monitor resource must point to +a restricted console in bacula-dir.conf (see the documentation). So, if +you use this password with bconsole, you'll only have access to the +status of the director (commands status and .status). +It could be a security problem if there is a bug in the ACL code of the +director. + +Concerning File and Storage Daemons' configuration:\\ +In tray-monitor.conf, the Name in the Monitor resource must point to a +Director resource in bacula-fd/sd.conf, with the Monitor directive set +to Yes (once again, see the documentation). +It could be a security problem if there is a bug in the code which check +if a command is valid for a Monitor (this is very unlikely as the code +is pretty simple). + + +\subsection*{Sample Tray Monitor configuration} \label{SampleConfiguration1} -\index[general]{Sample Monitor configuration file and related daemons' -configuration records. } -\index[general]{Records!Sample Monitor configuration file and related daemons' -configuration } -\addcontentsline{toc}{subsection}{Sample Monitor configuration file and -related daemons' configuration records.} - -An example Monitor configuration file might be the following: +\index[general]{Sample Tray Monitor configuration} +\addcontentsline{toc}{subsection}{Sample Tray Monitor configuration} + +An example Tray Monitor configuration file might be the following: \footnotesize \begin{verbatim} diff --git a/docs/manual-de/sqlite.tex b/docs/manual-de/sqlite.tex index 43b1825e..2c52a526 100644 --- a/docs/manual-de/sqlite.tex +++ b/docs/manual-de/sqlite.tex @@ -35,18 +35,18 @@ Installing and Configuring is quite easy. {\bf tar xvfz depkgs.tar.gz} -Note, the above command requires GNU tar. If you do not have GNU tar, a -command such as: + Note, the above command requires GNU tar. If you do not have GNU tar, a + command such as: -{\bf zcat depkgs.tar.gz | tar xvf -} + {\bf zcat depkgs.tar.gz | tar xvf -} -will probably accomplish the same thing. + will probably accomplish the same thing. \item {\bf cd depkgs} \item {\bf make sqlite} - \end{enumerate} +\end{enumerate} At this point, you should return to completing the installation of {\bf Bacula}. @@ -83,9 +83,9 @@ At this point, you can create the SQLite database and tables: \item ./make\_sqlite\_tables This script creates the SQLite database as well as the tables used by {\bf -Bacula}. This script will be automatically setup by the {\bf ./configure} -program to create a database named {\bf bacula.db} in {\bf Bacula's} working -directory. + Bacula}. This script will be automatically setup by the {\bf ./configure} + program to create a database named {\bf bacula.db} in {\bf Bacula's} working + directory. \end{enumerate} \subsection*{Linking Bacula with SQLite} @@ -108,6 +108,24 @@ several users have reported corrupted databases while using SQLite. For that reason, we do not recommend it for production use. +If Bacula crashes with the following type of error when it is started: +\footnotesize +\begin{verbatim} +Using default Catalog name=MyCatalog DB=bacula +Could not open database "bacula". +sqlite.c:151 Unable to open Database=/var/lib/bacula/bacula.db. +ERR=malformed database schema - unable to open a temporary database file +for storing temporary tables +\end{verbatim} +\normalsize + +this is most likely caused by the fact that some versions of +SQLite attempt to create a temporary file in the current directory. +If that fails, because Bacula does not have write permission on +the current directory, then you may get this errr. The solution is +to start Bacula in a current directory where it has write permission. + + \subsection*{Re-initializing the Catalog Database} \index[general]{Database!Re-initializing the Catalog } \index[general]{Re-initializing the Catalog Database } diff --git a/docs/manual/Makefile.in b/docs/manual/Makefile.in index 1435dc46..f3a795c3 100644 --- a/docs/manual/Makefile.in +++ b/docs/manual/Makefile.in @@ -17,7 +17,7 @@ IMAGES=../images first_rule: bacula -bacula: tex web html dvipdf +bacula: tex web html dvipdf mini-clean .SUFFIXES: .tex .html .PHONY: @@ -37,19 +37,16 @@ tex: makeindex bacula.sdx -o bacula.snd >/dev/null 2>/dev/null makeindex bacula.cdx -o bacula.cnd >/dev/null 2>/dev/null -latex -interaction=batchmode bacula.tex - @rm -f *.eps *.old pdf: @echo "Making pdfm" @cp -fp ${IMAGES}/hires/*.eps . dvipdfm -p a4 bacula.dvi - @rm -f *.eps *.old dvipdf: @echo "Making dvi to pdf" @cp -fp ${IMAGES}/hires/*.eps . dvipdf bacula.dvi bacula.pdf - @rm -f *.eps *.old html: @echo " " @@ -62,7 +59,6 @@ html: latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl bacula >tex.out 2>&1 ./translate_images.pl --to_meaningful_names bacula.html - @rm -f *.eps *.gif *.jpg @echo "Done making html" web: @@ -79,9 +75,7 @@ web: -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent bacula >tex.out 2>&1 ./translate_images.pl --to_meaningful_names bacula/Bacula_Users_Guide.html cp -f bacula/Bacula_Freque_Asked_Questi.html bacula/faq.html - @rm -f *.eps *.gif *.jpg bacula/*.eps *.old bacula/*.old @echo "Done making web" - show: xdvi bacula @@ -91,6 +85,21 @@ texcheck: main_configs: pic2graph -density 100 main_configs.png +mini-clean: + @rm -f 1 2 3 *.tex~ + @rm -f *.gif *.jpg *.eps + @rm -f *.aux *.cp *.fn *.ky *.log *.pg + @rm -f *.backup *.ilg *.lof *.lot + @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd + @rm -f *.dnd *.old *.out + @rm -f bacula/*.gif bacula/*.jpg bacula/*.eps + @rm -f bacula/*.aux bacula/*.cp bacula/*.fn bacula/*.ky bacula/*.log bacula/*.pg + @rm -f bacula/*.backup bacula/*.ilg bacula/*.lof bacula/*.lot + @rm -f bacula/*.cdx bacula/*.cnd bacula/*.ddx bacula/*.ddn bacula/*.fdx bacula/*.fnd bacula/*.ind bacula/*.sdx bacula/*.snd + @rm -f bacula/*.dnd bacula/*.old bacula/*.out + @rm -f bacula/WARNINGS + + clean: @rm -f 1 2 3 *.tex~ @rm -f *.png *.gif *.jpg *.eps diff --git a/docs/manual/autochangers.tex b/docs/manual/autochangers.tex index 13df3ec6..e05fb068 100644 --- a/docs/manual/autochangers.tex +++ b/docs/manual/autochangers.tex @@ -121,6 +121,28 @@ the Bacula {\bf Changer Device = } directive. Please check that your Storage daemon has permission to access this device. +The following tip for FreeBSD users comes from Danny Butroyd: +n reboot bacula will NOT have permissions to +control the device /dev/pass0 (assuming this is your changer device). +To get around this just edit the /etc/devfs.conf file and add the +following to the bottom of the config file: +\footnotesize +\begin{verbatim} +own pass0 root:bacula +perm pass0 0666 +own nsa0.0 root:bacula +perm nsa0.0 0666 +\end{verbatim} +\normalsize +I have given the bacula group permission to write to the nsa0.0 device +too just to be on the safe side. To bring these changes into effect +just run:- + +/etc/rc.d/devfs restart + +Basically this will stop you having to change permissions on these +devices to make bacula work when operating the AutoChanger after a reboot. + \label{scripts} \subsection*{Example Scripts} diff --git a/docs/manual/console.tex b/docs/manual/console.tex index cb6bca96..6b68dfc6 100644 --- a/docs/manual/console.tex +++ b/docs/manual/console.tex @@ -5,10 +5,12 @@ \label{_ConsoleChapter} \index[general]{Console!Bacula } \index[general]{Bacula Console } +\index[console]{Console!Bacula } +\index[console]{Bacula Console } \addcontentsline{toc}{section}{Bacula Console} \subsection*{General} -\index[general]{General } +\index[general]{General} \addcontentsline{toc}{subsection}{General} The {\bf Bacula Console} (sometimes called the User Agent) is a program that @@ -34,9 +36,12 @@ for Bacula to be able to write on more than one tape, because when Bacula requests a new tape, it waits until the user, via the Console program, indicates that the new tape is mounted. -\subsection*{Configuration} -\index[general]{Configuration } -\addcontentsline{toc}{subsection}{Configuration} +\subsection*{Console Configuration} +\index[general]{Console Configuration} +\index[general]{Configuration!Console} +\index[console]{Console Configuration} +\index[console]{Configuration!Console} +\addcontentsline{toc}{subsection}{Console Configuration} When the Console starts, it reads a standard Bacula configuration file named {\bf bconsole.conf} or {\bf gnome-console.conf} in the case of the GNOME @@ -50,6 +55,8 @@ this document. \subsection*{Running the Console Program} \index[general]{Running the Console Program } \index[general]{Program!Running the Console } +\index[console]{Running the Console Program } +\index[console]{Program!Running the Console } \addcontentsline{toc}{subsection}{Running the Console Program} After launching the Console program (bconsole), it will prompt you for the @@ -95,6 +102,8 @@ will display all the Pool resource records. \subsection*{Stopping the Console Program} \index[general]{Program!Stopping the Console } \index[general]{Stopping the Console Program } +\index[console]{Program!Stopping the Console } +\index[console]{Stopping the Console Program } \addcontentsline{toc}{subsection}{Stopping the Console Program} Normally, you simply enter {\bf quit} or {\bf exit} and the Console program @@ -116,6 +125,8 @@ will most likely be able to cancel at the next prompt. \subsection*{Alphabetic List of Console Commands} \index[general]{Commands!Alphabetic List of Console } \index[general]{Alphabetic List of Console Commands } +\index[console]{Commands!Alphabetic List of Console } +\index[console]{Alphabetic List of Console Commands } \addcontentsline{toc}{subsection}{Alphabetic List of Console Commands} The following commands are currently implemented: @@ -123,7 +134,7 @@ The following commands are currently implemented: \begin{description} \item [{add [pool=\lt{}pool-name\gt{} storage=\lt{}storage\gt{} jobid=\lt{}JobId\gt{}]} ] - \index[console]{add [pool } + \index[console]{add} This command is used to add Volumes to an existing Pool. The Volume names entered are placed in the Catalog and thus become available for backup operations. Normally, the {\bf label} command is used rather than this @@ -137,74 +148,77 @@ if you are importing a tape from another site. Please see the {\bf label} command below for the list of legal characters in a Volume name. \item [autodisplay on/off] - \index[console]{autodisplay on/off } - This command accepts {\bf on} or {\bf off} as an argument, and turns -auto-display of messages on or off respectively. The default for the console -program is {\bf off}, which means that you will be notified when there are -console messages pending, but they will not automatically be displayed. The -default for the gnome-console program is {\bf on}, which means that messages -will be displayed when they are received (usually within 5 seconds of them -being generated). - -When autodisplay is turned off, you must explicitly retrieve the messages -with the {\bf messages} command. When autodisplay is turned on, the messages -will be displayed on the console as they are received. + \index[console]{autodisplay on/off} + This command accepts {\bf on} or {\bf off} as an argument, and turns + auto-display of messages on or off respectively. The default for the + console program is {\bf off}, which means that you will be notified when + there are console messages pending, but they will not automatically be + displayed. The default for the gnome-console program is {\bf on}, which + means that messages will be displayed when they are received (usually + within 5 seconds of them being generated). + + When autodisplay is turned off, you must explicitly retrieve the + messages with the {\bf messages} command. When autodisplay is turned + on, the messages will be displayed on the console as they are received. \item [automount on/off] - \index[console]{automount on/off } - This command accepts {\bf on} or {\bf off} as the argument, and turns -auto-mounting of the tape after a {\bf label} command on or off respectively. -The default is {\bf on}. If {\bf automount} is turned off, you must -explicitly {\bf mount} the tape after a label command to use it. + \index[console]{automount on/off} + This command accepts {\bf on} or {\bf off} as the argument, and turns + auto-mounting of the tape after a {\bf label} command on or off + respectively. The default is {\bf on}. If {\bf automount} is turned + off, you must explicitly {\bf mount} the tape after a label command to + use it. \item [{cancel [jobid=\lt{}number\gt{} job=\lt{}job-name\gt{}]}] - \index[console]{cancel [jobid } - This command is used to cancel a job and accepts {\bf jobid=nnn} or {\bf -job=xxx} as an argument where nnn is replaced by the JobId and xxx is -replaced by the job name. If you do not specify a keyword, the Console -program will prompt you with the names of all the active jobs allowing you to -choose one. + \index[console]{cancel jobid} + This command is used to cancel a job and accepts {\bf jobid=nnn} or {\bf + job=xxx} as an argument where nnn is replaced by the JobId and xxx is + replaced by the job name. If you do not specify a keyword, the Console + program will prompt you with the names of all the active jobs allowing + you to choose one. -Once a Job is marked to be canceled, it may take a bit of time (generally -within a minute) before it actually terminates, depending on what operations -it is doing. + Once a Job is marked to be canceled, it may take a bit of time + (generally within a minute) before it actually terminates, depending on + what operations it is doing. \item [{ create [pool=\lt{}pool-name\gt{}]}] - \index[console]{create [pool } - This command is used to create a Pool record in the database using the Pool -resource record defined in the Director's configuration file. So in a sense, -this command simply transfers the information from the Pool resource in the -configuration file into the Catalog. Normally this command is done -automatically for you when the Director starts providing the Pool is -referenced within a Job resource. If you use this command on an existing -Pool, it will automatically update the Catalog to have the same information -as the Pool resource. After creating a Pool, you will most likely use the -{\bf label} command to label one or more volumes and add their names to the -Media database. - -When starting a Job, if Bacula determines that there is no Pool record in the -database, but there is a Pool resource of the appropriate name, it will -create it for you. If you want the Pool record to appear in the database -immediately, simply use this command to force it to be created. + \index[console]{create pool} + This command is used to create a Pool record in the database using the + Pool resource record defined in the Director's configuration file. So + in a sense, this command simply transfers the information from the Pool + resource in the configuration file into the Catalog. Normally this + command is done automatically for you when the Director starts providing + the Pool is referenced within a Job resource. If you use this command + on an existing Pool, it will automatically update the Catalog to have + the same information as the Pool resource. After creating a Pool, you + will most likely use the {\bf label} command to label one or more + volumes and add their names to the Media database. + + When starting a Job, if Bacula determines that there is no Pool record + in the database, but there is a Pool resource of the appropriate name, + it will create it for you. If you want the Pool record to appear in the + database immediately, simply use this command to force it to be created. \item [{ delete [volume=\lt{}vol-name\gt{} pool=\lt{}pool-name\gt{} job jobid=\lt{}id\gt{}] }] - \index[console]{delete } -The delete command is used to delete a Volume, Pool or Job record from the -Catalog as well as all associated Volume records that were created. This -command operates only on the Catalog database and has no effect on the actual -data written to a Volume. This command can be dangerous and we strongly -recommend that you do not use it unless you know what you are doing. - -If the keyword {\bf Volume} appears on the command line, the named Volume -will be deleted from the catalog, if the keyword {\bf Pool} appears on the -command line, a Pool will be deleted, and if the keyword {\bf Job} appears on -the command line, a Job and all its associated records (File and JobMedia) -will be deleted from the catalog. The full form of this command is: + \index[console]{delete} + The delete command is used to delete a Volume, Pool or Job record from + the Catalog as well as all associated catalog Volume records that were + created. This command operates only on the Catalog database and has no + effect on the actual data written to a Volume. This command can be + dangerous and we strongly recommend that you do not use it unless you + know what you are doing. + + If the keyword {\bf Volume} appears on the command line, the named + Volume will be deleted from the catalog, if the keyword {\bf Pool} + appears on the command line, a Pool will be deleted, and if the keyword + {\bf Job} appears on the command line, a Job and all its associated + records (File and JobMedia) will be deleted from the catalog. The full + form of this command is: delete pool=\lt{}pool-name\gt{} -or + or delete volume=\lt{}volume-name\gt{} pool=\lt{}pool-name\gt{} or @@ -212,11 +226,12 @@ delete JobId=\lt{}job-id\gt{} JobId=\lt{}job-id2\gt{} ... or delete Job JobId=n,m,o-r,t ... -The first form deletes a Pool record from the catalog database. The second -form deletes a Volume record from the specified pool in the catalog database. -The third form deletes the specified Job record from the catalog database. -The last form deletes JobId records for JobIds n,m,o,p, q,r, and t. Where each -one of the n,m,... is, of course, a number. + The first form deletes a Pool record from the catalog database. The + second form deletes a Volume record from the specified pool in the + catalog database. The third form deletes the specified Job record from + the catalog database. The last form deletes JobId records for JobIds + n,m,o,p, q,r, and t. Where each one of the n,m,... is, of course, a + number. \label{estimate} \item [estimate] @@ -241,8 +256,9 @@ one of the n,m,... is, of course, a number. estimate job=\lt{}job-name\gt{} listing client=\lt{}client-name\gt{} fileset=\lt{}fileset-name\gt{} level=\lt{}level-name\gt{} -Specification of the {\bf job} is sufficient, but you can also override the -client, fileset and/or level by specifying them on the estimate command line. + Specification of the {\bf job} is sufficient, but you can also override + the client, fileset and/or level by specifying them on the estimate + command line. As an example, you might do: @@ -274,22 +290,23 @@ NightlySave} during an Incremental save and put it in the file {\bf label storage=\lt{}storage-name\gt{} volume=\lt{}volume-name\gt{} slot=\lt{}slot\gt{} -If you leave out any part, you will be prompted for it. The media type is -automatically taken from the Storage resource definition that you supply. -Once the necessary information is obtained, the Console program contacts the -specified Storage daemon and requests that the tape be labeled. If the tape -labeling is successful, the Console program will create a Volume record in -the appropriate Pool. + If you leave out any part, you will be prompted for it. The media type + is automatically taken from the Storage resource definition that you + supply. Once the necessary information is obtained, the Console program + contacts the specified Storage daemon and requests that the tape be + labeled. If the tape labeling is successful, the Console program will + create a Volume record in the appropriate Pool. -The Volume name is restricted to letters, numbers, and the special characters -hyphen ({\bf -}), underscore ({\bf \_}), colon ({\bf :}), and period ({\bf -.}). All other characters including a space are illegal. This restriction is -to ensure good readability of Volume names to reduce operator errors. + The Volume name is restricted to letters, numbers, and the special + characters hyphen ({\bf -}), underscore ({\bf \_}), colon ({\bf :}), and + period ({\bf .}). All other characters including a space are illegal. + This restriction is to ensure good readability of Volume names to reduce + operator errors. -Please note, when labeling a blank tape, Bacula will get {\bf read I/O error} when -it attempts to ensure that the tape is already labeled. If you wish to avoid -getting these messages, please write and EOF mark on your tape before -attempting to label it: + Please note, when labeling a blank tape, Bacula will get {\bf read I/O + error} when it attempts to ensure that the tape is already labeled. If + you wish to avoid getting these messages, please write and EOF mark on + your tape before attempting to label it: \footnotesize \begin{verbatim} @@ -304,11 +321,11 @@ The label command can fail for a number of reasons: \begin{enumerate} \item The Volume name you specify is already in the Volume database. \item The Storage daemon has a tape already mounted on the device, in which -case you must {\bf unmount} the device, insert a blank tape, then do the -{\bf label} command. + case you must {\bf unmount} the device, insert a blank tape, then do the + {\bf label} command. \item The tape in the device is already a Bacula labeled tape. (Bacula will -never relabel a Bacula labeled tape unless it is recycled and you use the -{\bf relabel} command). + never relabel a Bacula labeled tape unless it is recycled and you use the + {\bf relabel} command). \item There is no tape in the drive. \end{enumerate} @@ -361,10 +378,10 @@ update storage=xxx pool=yyy slots=1-5,10 barcodes \normalsize \item [list] - \index[console]{list } - The list command lists the requested contents of the Catalog. The various - fields of each record are listed on a single line. The various forms - of the list command are: + \index[console]{list} + The list command lists the requested contents of the Catalog. The + various fields of each record are listed on a single line. The various + forms of the list command are: \footnotesize \begin{verbatim} list jobs @@ -544,7 +561,7 @@ python restart \label{ManualPruning} \item [prune] - \index[console]{prune } + \index[console]{prune} The Prune command allows you to safely remove expired database records from Jobs and Volumes. This command works only on the Catalog database and does not affect data written to Volumes. In all cases, the Prune @@ -560,7 +577,7 @@ volume=\lt{}volume-name\gt{} Append, otherwise the pruning will not take place. \item [purge] - \index[console]{purge } + \index[console]{purge} The Purge command will delete associated Catalog database records from Jobs and Volumes without considering the retention period. {\bf Purge} works only on the Catalog database and does not affect data written to @@ -599,7 +616,7 @@ relabel storage=\lt{}storage-name\gt{} oldvolume=\lt{}old-volume-name\gt{} on the Volume is lost and cannot be recovered. \item [release] - \index[console]{release } + \index[console]{release} This command is used to cause the Storage daemon to rewind (release) the current tape in the drive, and to re-read the Volume label the next time the tape is used. @@ -641,7 +658,7 @@ release storage=\lt{}storage-name\gt{} \item [restore] - \index[console]{restore } + \index[console]{restore} The restore command allows you to select one or more Jobs (JobIds) to be restored using various methods. Once the JobIds are selected, the File records for those Jobs are placed in an internal Bacula directory tree, @@ -663,7 +680,7 @@ restore storage=\lt{}storage-name\gt{} client=\lt{}client-name\gt{} manual. \item [run] - \index[console]{run } + \index[console]{run} This command allows you to schedule jobs to be run immediately. The full form of the command is: @@ -754,7 +771,7 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | file. You must explicitly delete the file when you are done. \item [show] - \index[console]{show } + \index[console]{show} The show command will list the Director's resource records as defined in the Director's configuration file (normally {\bf bacula-dir.conf}). This command is used mainly for debugging purposes by developers. The @@ -764,7 +781,7 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | with the {\bf list}, which displays the contents of the catalog. \item [sqlquery] - \index[dir]{sqlquery } + \index[dir]{sqlquery} The sqlquery command puts the Console program into SQL query mode where each line you enter is concatenated to the previous line until a semicolon (;) is seen. The semicolon terminates the command, which is @@ -784,7 +801,7 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | SQLite documentation. \item [status] - \index[dir]{status } + \index[dir]{status} This command will display the status of the next jobs that are scheduled during the next twenty-four hours as well as the status of currently running jobs. The full form of this command is: @@ -826,7 +843,7 @@ status [all | dir=\lt{}dir-name\gt{} | director | time, hence it is simply "waiting execution" \item [unmount] - \index[console]{unmount } + \index[console]{unmount} This command causes the indicated Bacula Storage daemon to unmount the specified device. The forms of the command are the same as the mount command: \footnotesize @@ -839,7 +856,7 @@ unmount [ jobid=\lt{}id\gt{} | job=\lt{}job-name\gt{} ] \label{UpdateCommand} \item [update] - \index[console]{update } + \index[console]{update} This command will update the catalog for either a specific Pool record, a Volume record, or the Slots in an autochanger with barcode capability. In the case of updating a Pool record, the new information will be automatically taken @@ -875,29 +892,30 @@ wish to change. The following Volume parameters may be changed: \end{verbatim} \normalsize -For slots {\bf update slots}, Bacula will obtain a list of slots and their -barcodes from the Storage daemon, and for each barcode found, it will -automatically update the slot in the catalog Media record to correspond to -the new value. This is very useful if you have moved cassettes in the -magazine, or if you have removed the magazine and inserted a different one. -As the slot of each Volume is updated, the InChanger flag for that Volume -will also be set, and any other Volumes in the Pool will have their InChanger -flag turned off. This permits Bacula to know what magazine (tape holder) is -currently in the autochanger. - -If you do not have barcodes, you can accomplish the same thing in version -1.33 and later by using the {\bf update slots scan} command. The {\bf scan} -keyword tells Bacula to physically mount each tape and to read its -VolumeName. - -For Pool {\bf update pool}, Bacula will move the Volume record from its -existing pool to the pool specified. - -For {\bf Volume from Pool} and {\bf All Volumes from Pool}, the following -values are updated from the Pool record: Recycle, VolRetention, -VolUseDuration, MaxVolJobs, MaxVolFiles, and MaxVolBytes. - -The full form of the update command with all command line arguments is: + For slots {\bf update slots}, Bacula will obtain a list of slots and + their barcodes from the Storage daemon, and for each barcode found, it + will automatically update the slot in the catalog Media record to + correspond to the new value. This is very useful if you have moved + cassettes in the magazine, or if you have removed the magazine and + inserted a different one. As the slot of each Volume is updated, the + InChanger flag for that Volume will also be set, and any other Volumes + in the Pool will have their InChanger flag turned off. This permits + Bacula to know what magazine (tape holder) is currently in the + autochanger. + + If you do not have barcodes, you can accomplish the same thing in + version 1.33 and later by using the {\bf update slots scan} command. + The {\bf scan} keyword tells Bacula to physically mount each tape and to + read its VolumeName. + + For Pool {\bf update pool}, Bacula will move the Volume record from its + existing pool to the pool specified. + + For {\bf Volume from Pool} and {\bf All Volumes from Pool}, the + following values are updated from the Pool record: Recycle, + VolRetention, VolUseDuration, MaxVolJobs, MaxVolFiles, and MaxVolBytes. + + The full form of the update command with all command line arguments is: \footnotesize \begin{verbatim} diff --git a/docs/manual/disk.tex b/docs/manual/disk.tex index 90495327..dda7a1ce 100644 --- a/docs/manual/disk.tex +++ b/docs/manual/disk.tex @@ -75,6 +75,12 @@ Although this is quite simple, there are a number of problems. The first is that unless you specify otherwise, Bacula will always write to the same volume until you run out of disk space. This problem is addressed below. +In addition, if you want to use concurrent jobs that write to several +different volumes at the same time, you will need to understand a number +of other details. An example of such a configuration is given +at the end of this chapter under \ilink{Concurrent Disk +Jobs}{ConcurrentDiskJobs}. + \subsubsection*{Pool Options to Limit the Volume Usage} \index[general]{Usage!Pool Options to Limit the Volume } \index[general]{Pool Options to Limit the Volume Usage } @@ -282,6 +288,48 @@ also be done by setting {\bf Recycle Oldest Volume = yes} or {\bf Recycle Current Volume = yes}. In this case, when Bacula needs a new Volume, it will prune the specified volume. +\label{ConcurrentDiskJobs} +\subsection*{Concurrent Disk Jobs} +\index[general]{Concurrent Disk Jobs} +\addcontentsline{toc}{subsection}{Concurrent Disk Jobs} +Above, we discussed how you could have a single device named {\bf +FileBackup} that writes to volumes in {\bf /home/bacula/backups}. +You can, in fact, run multiple concurrent jobs using the +Storage definition given with this example, and all the jobs will +simultaneously write into the Volume that is being written. + +Now suppose you want to use multiple Pools, which means multiple +Volumes, or suppose you want each client to have its own Volume +and perhaps its own directory such as {\bf /home/bacula/client1} +and {\bf /home/bacula/client2} ... With the single Storage and Device +definition above, neither of these two is possible. Why? Because +Bacula disk storage follows the same rules as tape devices. Only +one Volume can be mounted on any Device at any time. If you want +to simultaneously write multiple Volumes, you will need multiple +Device resources in your bacula-sd.conf file, and thus multiple +Storage resources in your bacula-dir.conf. + +OK, so now you should understand that you need multiple Device definitions +in the case of different directorys or different Pools, but you also +need to know that the catalog data that Bacula keeps contains only +the Media Type and not the specific storage device. This permits a tape +for example to be re-read on any compatible tape drive. The compatibility +being determined by the Media Type. The same applies to disk storage. +Since a volume that is written by a Device in say directory {\bf +/home/bacula/backups} cannot be read by a Device with an Archive Device +definition of {\bf /home/bacula/client1}, you will not be able to +restore all your files if you give both those devices +{\bf Media Type = File}. During the restore, Bacula will simply choose +the first available device, which may not be the correct one. If this +is confusing, just remember that the Directory has only the Media Type +and the Volume name. It does not know the {\bf Archive Device} (or the +full path) that is specified in the Storage daemon. Thus you must +explicitly tie your Volumes to the correct Device by using the Media Type. + +The example shown below shows a case where there are two clients, each +using its own Pool and storing their Volumes in different directories. + + \label{Example2} \subsection*{An Example} \index[general]{Example } @@ -289,9 +337,14 @@ prune the specified volume. The following example is not very practical, but can be used to demonstrate the proof of concept in a relatively short period of time. The example -consists of a single client that is backed up to a set of 12 archive files -(Volumes). Each Volume is used (written) only once, and there are four Full -saves done every hour (so the whole thing cycles around after three hours). +consists of a two clients that are backed up to a set of 12 archive files +(Volumes) for each client into different directories on the Storage +maching. Each Volume is used (written) only once, and there are four Full +saves done every hour (so the whole thing cycles around after three hours). + +What is key here is that each physical device on the Storage daemon +has a different Media Type. This allows the Director to choose the +correct device for restores ... The Director's configuration file is as follows: @@ -306,10 +359,10 @@ Director { } Schedule { Name = "FourPerHour" - Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:05 - Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:20 - Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:35 - Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:50 + Run = Level=Full hourly at 0:05 + Run = Level=Full hourly at 0:20 + Run = Level=Full hourly at 0:35 + Run = Level=Full hourly at 0:50 } Job { Name = "RecycleExample" @@ -322,6 +375,19 @@ Job { Pool = Recycle Schedule = FourPerHour } + +Job { + Name = "RecycleExample2" + Type = Backup + Level = Full + Client = Roxie + FileSet= "Example FileSet" + Messages = Standard + Storage = FileStorage1 + Pool = Recycle1 + Schedule = FourPerHour +} + FileSet { Name = "Example FileSet" Include = compression=GZIP signature=SHA1 { @@ -334,6 +400,14 @@ Client { Catalog = BackupDB Password = client_password } + +Client { + Name = Roxie + Address = roxie + Catalog = BackupDB + Password = client1_password +} + Storage { Name = FileStorage Address = rufus @@ -341,6 +415,15 @@ Storage { Device = RecycleDir Media Type = File } + +Storage { + Name = FileStorage1 + Address = rufus + Password = local_storage_password + Device = RecycleDir1 + Media Type = File1 +} + Catalog { Name = BackupDB dbname = bacula; user = bacula; password = "" @@ -353,12 +436,24 @@ Pool { Name = Recycle Use Volume Once = yes Pool Type = Backup - LabelFormat = "Vol" + LabelFormat = "Recycle-" AutoPrune = yes VolumeRetention = 2h Maximum Volumes = 12 Recycle = yes } + +Pool { + Name = Recycle1 + Use Volume Once = yes + Pool Type = Backup + LabelFormat = "Recycle1-" + AutoPrune = yes + VolumeRetention = 2h + Maximum Volumes = 12 + Recycle = yes +} + \end{verbatim} \normalsize @@ -386,6 +481,18 @@ Device { RemovableMedia = no; AlwaysOpen = no; } + +Device { + Name = RecycleDir1 + Media Type = File1 + Archive Device = /home/bacula/backups1 + LabelMedia = yes; + Random Access = Yes; + AutomaticMount = yes; + RemovableMedia = no; + AlwaysOpen = no; +} + Messages { Name = Standard director = my-dir = all @@ -393,12 +500,6 @@ Messages { \end{verbatim} \normalsize -In this example, the Jobs will be backed up to directory {\bf -/home/bacula/backups} with Volume names Vol0001, Vol0002, ... Vol0012. Every -backup Job will write a new volume cycling through the volume numbers, and two -hours after a job has started, the volume will be pruned {\bf Volume Retention -= 2h}. - With a little bit of work, you can change the above example into a weekly or monthly cycle (take care about the amount of archive disk space used). @@ -510,7 +611,7 @@ Storage resource in the Director when doing a restore. \label{MultipleClients} \subsection*{Considerations for Multiple Clients} \index[general]{Clients!Considerations for Multiple } -\index[general]{Considerations for Multiple Clients } +\index[general]{Multiple Clients} \addcontentsline{toc}{subsection}{Considerations for Multiple Clients} If we take the above example and add a second Client, here are a few @@ -591,20 +692,21 @@ Client { Catalog = BackupDB Password = client2_password } -# Two Storage definitions permits different directories +# Two Storage definitions with differen Media Types +# permits different directories Storage { Name = File1 Address = rufus Password = local_storage_password Device = client1 - Media Type = File + Media Type = File1 } Storage { Name = File2 Address = rufus Password = local_storage_password Device = client2 - Media Type = File + Media Type = File2 } Catalog { Name = BackupDB @@ -657,7 +759,7 @@ Director { # Archive directory for Client1 Device { Name = client1 - Media Type = File + Media Type = File1 Archive Device = /home/bacula/client1 LabelMedia = yes; Random Access = Yes; @@ -668,7 +770,7 @@ Device { # Archive directory for Client2 Device { Name = client2 - Media Type = File + Media Type = File2 Archive Device = /home/bacula/client2 LabelMedia = yes; Random Access = Yes; diff --git a/docs/manual/fileset.tex b/docs/manual/fileset.tex index 57968166..c76fbd36 100644 --- a/docs/manual/fileset.tex +++ b/docs/manual/fileset.tex @@ -22,13 +22,13 @@ Bacula will ensure that the next backup is always a Full save. \begin{description} \item [FileSet] -\index[dir]{FileSet } +\index[dir]{FileSet} Start of the FileSet resource. One {\bf FileSet} resource must be defined for each Backup job. \item [Name = \lt{}name\gt{}] -\index[dir]{Name } -The name of the FileSet resource. This directive is required. +\index[dir]{Name} + The name of the FileSet resource. This directive is required. \item [Ignore FileSet Changes = \lt{}yes|no\gt{}] \index[dir]{Ignore FileSet Changes} @@ -69,7 +69,7 @@ subdirectories of any directory in the Include File list will be backed up. Note, see below for the definition of \lt{}file-list\gt{}. The Include resource may also contain one or more Options resources that specify options such as compression to be applied to all or any subset of -the files found for backup. +the files found when processing the file-list for backup. There can be any number of {\bf Include} resources within the FileSet, each having its own list of directories or files to be backed up and the backup @@ -77,6 +77,13 @@ options defined by one or more Options resources. The {\bf file-list} consists of one file or directory name per line. Directory names should be specified without a trailing slash with Unix path notation. +Windows users, please take note to specify directories (even c:/...) in +Unix path notation. If you use Windows conventions, you will most likely +not be able to restore your files due to the fact that the Windows +path separator was defined as an escape character long before Windows +existed, and Bacula adheres to that convention (i.e. \\ means the next character +appears as itself). + You should always specify a full path for every directory and file that you list in the FileSet. In addition, on Windows machines, you should {\bf always} prefix the directory or filename with the drive specification in @@ -139,6 +146,11 @@ the filenames to determine if and how the file should be backed up. The Options resources are applied in the order they are specified in the FileSet until the first one that matches. +A key point is that in the absence of an Option or no other Option is +matched, every file is accepted for backing up. This means that if +you want to exclude something, you must explicitly specify an Option +with an {\bf exclude = yes} and some pattern matching. + Once Bacula determines that the Options resource matches the file under consideration, that file will be saved without looking at any other Options resources that may be present. This means that any wild cards must appear @@ -148,7 +160,8 @@ If for some reason, Bacula applies all the Options resources to a file under consideration for backup, but there are no matches (generally because of wild cards that don't match), Bacula as a default will then backup the file. This is quite logical if you consider the case of no Options, where -you want everything to be backed up. +you want everything to be backed up, and it is important to keep in +mind when excluding as mentioned above. However, one additional point is that in the case that no match was found, Bacula will use the options found in @@ -482,6 +495,8 @@ Change: 2005-11-06 12:36:48.000000000 +0100 specified, and they will be applied in turn until the first one that matches. It is recommended to enclose the string in double quotes. + An example of excluding with the WildFile option on Win32 machines is + presented below. \item [wilddir=\lt{}string\gt{}] \index[dir]{wilddir } @@ -494,6 +509,8 @@ Change: 2005-11-06 12:36:48.000000000 +0100 matches. Note, if you exclude a directory, no files or directories below it will be matched. It is recommended to enclose the string in double quotes. + An example of excluding with the WildDir option on Win32 machines is + presented below. \item [regex=\lt{}string\gt{}] @@ -1053,6 +1070,73 @@ you will be backing up an NFS mounted partition ({\bf /mnt/matou}), and since case, you will get yourself into a recursive loop and the backup will never end. +As a final example, let's say that you have only one or two +subdirectories of /home that you want to backup. For example, +you want to backup only subdirectories beginning with the letter +a and the letter b -- i.e. /home/a* and /home/b*. Now, you might first +try: +\footnotesize +\begin{verbatim} +FileSet { + Name = "Full Set" + Include { + Options { + wilddir = "/home/a*" + wilddir = "/home/b*" + } + File = /home + } +} +\end{verbatim} +\normalsize + +The problem is that the above will include everything in /home. To get +things to work correctly, you need to start with the idea of exclusion +instead of inclusion. So, you could simply exclude all directories +except the two you want using: +\footnotesize +\begin{verbatim} +FileSet { + Name = "Full Set" + Include { + Options { + RegexDir = "^/home/[c-z]" + exclude = yes + } + File = /home + } +} +\end{verbatim} +\normalsize + +And assuming that all subdirectories start with a lowercase letter, this +would work. + +An alternative would be to include the two subdirectories desired and +exclude everything else: +\footnotesize +\begin{verbatim} +FileSet { + Name = "Full Set" + Include { + Options { + wilddir = "/home/a*" + wilddir = "/home/b*" + } + Options { + RegexDir = "^.?*$" + exclude = yes + } + File = /home + } +} +\end{verbatim} +\normalsize + +I haven't actually tried the above two examples, so you may need to +tweak them to get them to work right. + + \subsubsection*{Backing up Raw Partitions} \index[general]{Backing up!Partitions } \index[general]{Backing up Raw Partitions } diff --git a/docs/manual/install.tex b/docs/manual/install.tex index 187775c3..481fabeb 100644 --- a/docs/manual/install.tex +++ b/docs/manual/install.tex @@ -1014,6 +1014,30 @@ if they do not exist, but it will not automatically create the pid-dir, subsys-dir, or working-dir, so you must ensure that they exist before running Bacula for the first time. +Note, you may need to install the following packages to build Bacula +from source: +\footnotesize +\begin{verbatim} +SUNWbinutils, +SUNWarc, +SUNWhea, +SUNWGcc, +SUNWGnutls +SUNWGnutls-devel +SUNWGmake +SUNWgccruntime +SUNWlibgcrypt +SUNWzlib +SUNWzlibs +SUNWbinutilsS +SUNWGmakeS +SUNWlibm + +export +PATH=/usr/bin::/usr/ccs/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/usr/ucb:/usr/sbin +\end{verbatim} +\normalsize + \subsection*{FreeBSD} \index[general]{FreeBSD } \addcontentsline{toc}{subsection}{FreeBSD} diff --git a/docs/manual/monitorconf.tex b/docs/manual/monitorconf.tex index 0d12b23f..2c9162e1 100644 --- a/docs/manual/monitorconf.tex +++ b/docs/manual/monitorconf.tex @@ -219,17 +219,39 @@ resource of the Storage daemon's configuration file. This record is required. \end{description} -\subsection*{Sample Monitor configuration file and related daemons' -configuration records.} +\subsection*{Tray Monitor Security} +\index[general]{Tray Monitor Security} +\addcontentsline{toc}{subsection}{Tray Monitor Security} + +There is no security problem in relaxing the permissions on +tray-monitor.conf as long as FD, SD and DIR are configured properly, so +the passwords contained in this file only gives access to the status of +the daemons. It could be a security problem if you consider the status +information as potentially dangereous (I don't think it is the case). + +Concerning Director's configuration: \\ +In tray-monitor.conf, the password in the Monitor resource must point to +a restricted console in bacula-dir.conf (see the documentation). So, if +you use this password with bconsole, you'll only have access to the +status of the director (commands status and .status). +It could be a security problem if there is a bug in the ACL code of the +director. + +Concerning File and Storage Daemons' configuration:\\ +In tray-monitor.conf, the Name in the Monitor resource must point to a +Director resource in bacula-fd/sd.conf, with the Monitor directive set +to Yes (once again, see the documentation). +It could be a security problem if there is a bug in the code which check +if a command is valid for a Monitor (this is very unlikely as the code +is pretty simple). + + +\subsection*{Sample Tray Monitor configuration} \label{SampleConfiguration1} -\index[general]{Sample Monitor configuration file and related daemons' -configuration records. } -\index[general]{Records!Sample Monitor configuration file and related daemons' -configuration } -\addcontentsline{toc}{subsection}{Sample Monitor configuration file and -related daemons' configuration records.} - -An example Monitor configuration file might be the following: +\index[general]{Sample Tray Monitor configuration} +\addcontentsline{toc}{subsection}{Sample Tray Monitor configuration} + +An example Tray Monitor configuration file might be the following: \footnotesize \begin{verbatim} diff --git a/docs/manual/sqlite.tex b/docs/manual/sqlite.tex index 43b1825e..2c52a526 100644 --- a/docs/manual/sqlite.tex +++ b/docs/manual/sqlite.tex @@ -35,18 +35,18 @@ Installing and Configuring is quite easy. {\bf tar xvfz depkgs.tar.gz} -Note, the above command requires GNU tar. If you do not have GNU tar, a -command such as: + Note, the above command requires GNU tar. If you do not have GNU tar, a + command such as: -{\bf zcat depkgs.tar.gz | tar xvf -} + {\bf zcat depkgs.tar.gz | tar xvf -} -will probably accomplish the same thing. + will probably accomplish the same thing. \item {\bf cd depkgs} \item {\bf make sqlite} - \end{enumerate} +\end{enumerate} At this point, you should return to completing the installation of {\bf Bacula}. @@ -83,9 +83,9 @@ At this point, you can create the SQLite database and tables: \item ./make\_sqlite\_tables This script creates the SQLite database as well as the tables used by {\bf -Bacula}. This script will be automatically setup by the {\bf ./configure} -program to create a database named {\bf bacula.db} in {\bf Bacula's} working -directory. + Bacula}. This script will be automatically setup by the {\bf ./configure} + program to create a database named {\bf bacula.db} in {\bf Bacula's} working + directory. \end{enumerate} \subsection*{Linking Bacula with SQLite} @@ -108,6 +108,24 @@ several users have reported corrupted databases while using SQLite. For that reason, we do not recommend it for production use. +If Bacula crashes with the following type of error when it is started: +\footnotesize +\begin{verbatim} +Using default Catalog name=MyCatalog DB=bacula +Could not open database "bacula". +sqlite.c:151 Unable to open Database=/var/lib/bacula/bacula.db. +ERR=malformed database schema - unable to open a temporary database file +for storing temporary tables +\end{verbatim} +\normalsize + +this is most likely caused by the fact that some versions of +SQLite attempt to create a temporary file in the current directory. +If that fails, because Bacula does not have write permission on +the current directory, then you may get this errr. The solution is +to start Bacula in a current directory where it has write permission. + + \subsection*{Re-initializing the Catalog Database} \index[general]{Database!Re-initializing the Catalog } \index[general]{Re-initializing the Catalog Database } -- 2.39.5