]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manuals/en/main/newfeatures.tex
Tweak new features
[bacula/docs] / docs / manuals / en / main / newfeatures.tex
index f2c0812be8c9754982292918f5af4515138fad2f..47303e0e502b9b06583a26534664a06bcb96528f 100644 (file)
-%%
+\chapter{New Features in 5.1.x}
+This chapter presents the new features that have been added to the
+current version of Bacula that is under development. This version will be
+released at some later date, probably near the end of April 2011.
+
+\section{Restart Incomplete Job}
+
+
+\medskip
+This project was funded by Bacula Systems and is available with Bacula
+Enterprise Edition and Community Edition.
+
+\section{New Tray Monitor}
+
+Since the old integrated Windows tray monitor doesn't work anymore with
+recent Windows versions, we have written a new Qt Tray Monitor that is available
+for both Linux and Windows.  This new version allows you to run Backup from
+the tray monitor menu.
+
+\begin{figure}[htbp]
+  \centering
+  \includegraphics[width=10cm]{\idir tray-monitor}
+  \label{fig:traymonitor}
+  \caption{New tray monitor}
+\end{figure}
+
+\begin{figure}[htbp]
+  \centering
+  \includegraphics[width=10cm]{\idir tray-monitor1}
+  \label{fig:traymonitor1}
+  \caption{Run a Job through the new tray monitor}
+\end{figure}
+
+\medskip
+This project was funded by Bacula Systems and is available with Bacula
+the Enterprise Edition and the Community Edition.
+
+\section{Purge Migration Job}
+
+The new {\bf Purge Migration Job} directive may be added to the Migration
+Job definition in the Director's configuration file. When it is enabled 
+the Job that was migrated during a migration will be purged at
+the end of the migration job.
+
+For example:
+\begin{verbatim}
+Job {
+  Name = "migrate-job"
+  Type = Migrate
+  Level = Full
+  Client = localhost-fd
+  FileSet = "Full Set"
+  Messages = Standard
+  Storage = DiskChanger
+  Pool = Default
+  Selection Type = Job
+  Selection Pattern = ".*Save"
+...
+  Purge Migrated Job = yes
+}
+\end{verbatim}
+
+\medskip
+
+This project was submited by Dunlap Blake, testing and documentation was funded
+by Bacula Systems.
+
+\section{Job Bandwidth Limitation}
+
+The new {\bf Job Bandwidth Limitation} directive may be added to the File
+daemon's and/or Director's configuration to limit the bandwidth used by a Job on a
+Client.  It can be set in the File daemon's conf file for all Jobs run
+in that File daemon, or it can be set for each Job in the
+Director's conf file.
+
+For example:
+\begin{verbatim}
+FileDaemon {
+  Name = localhost-fd
+  Working Directory = /some/path
+  Pid Directory = /some/path
+  ...
+  Maximum Bandwidth Per Job = 5MB/s
+}
+\end{verbatim}
+
+The above example would cause any jobs running with the FileDaemon to not
+exceed 5MB/s of throughput when sending data to the Storage Daemon.
+
+You can specify the speed parameter in k/s, KB/s, m/s, MB/s.
+
+For example:
+\begin{verbatim}
+Job {
+  Name = locahost-data
+  FileSet = FS_localhost
+  Accurate = yes
+  ...
+  Maximum Bandwidth = 5MB/s
+  ...
+}
+\end{verbatim}
+
+The above example would cause Job \texttt{localhost-data} to not exceed 5MB/s
+of throughput when sending data from the File daemon to the Storage daemon.
+
+A new console command \texttt{setbandwidth} permits to set dynamically the
+maximum throughput of a running Job or for future jobs of a Client.
+
+\begin{verbatim}
+* setbandwidth limit=1000000 jobid=10
+\end{verbatim}
+
+The \texttt{limit} parameter is in KB/s.
+
+\medskip
+This project was funded by Bacula Systems and is available in
+the Enterprise Edition and the Community Edition.
+
+\section{Support for MSSQL Block Level Backup}
+
+This project was funded by Bacula Systems and is available with the Bacula
+Enterprise Edition.
+
+\section{Support for NDMP protocol}
+
+The new \texttt{ndmp} Plugin is able to backup a NAS through NDMP protocol
+using \textbf{Filer to server} approach, where the Filer is backing up across
+the LAN to your Bacula server.
+
+Accurate option should be turned on in the Job resource.
+\begin{verbatim}
+Job {
+ Accurate = yes
+ FileSet = NDMPFS
+ ...
+}
+
+FileSet {
+ Name = NDMPFS
+ ...
+ Include {
+   Plugin = "ndmp:host=nasbox user=root pass=root file=/vol/vol1"
+ }
+}
+\end{verbatim}
+
+This project was funded by Bacula Systems and is available with the Bacula
+Enterprise Edition.
+
+\section{Incremental/Differential Block Level Difference Backup}
+
+The new \texttt{delta} Plugin is able to compute and apply signature-based file
+differences. It can be used to backup only changes in a big binary file like
+Outlook PST, VirtualBox/VmWare images or database files.
+
+It supports both Incremental and Differential backups and stores signatures
+database in the File Daemon working directory. This plugin is available on all
+plateform including Windows 32 and 64bit.
+
+Accurate option should be turned on in the Job resource.
+\begin{verbatim}
+Job {
+ Accurate = yes
+ FileSet = DeltaFS
+ ...
+}
+
+FileSet {
+ Name = DeltaFS
+ ...
+ Include {
+   Plugin = "delta:/home/eric/.VirtualBox/HardDisks/lenny-i386.vdi"
+ }
+}
+\end{verbatim}
+
+This project was funded by Bacula Systems and is available with the Bacula
+Enterprise Edition.
+
+\section{Include All Windows Drives in FileSet}
+
+The \texttt{alldrives} Windows Plugin allows you to include all local drives
+with a simple directive. This plugin is available for Windows 64 and 32 bit.
+
+\begin{verbatim}
+FileSet {
+ Name = EverythingFS
+ ...
+ Include {
+   Plugin = "alldrives"
+ }
+}
+\end{verbatim}
+
+You exclude some specific drives with the \texttt{exclude} option.
+
+\begin{verbatim}
+FileSet {
+ Name = EverythingFS
+ ...
+ Include {
+   Plugin = "alldrives: exclude=D,E"
+ }
+}
+\end{verbatim}
+
+
+This project was funded by Bacula Systems and is available with the Bacula
+Enterprise Edition.
+
+\section{SQL Catalog Enhancements}
+
+% TODO: Marco can explain more things
+Bacula uses a new catalog backend structure, it allows to build all SQL drivers
+with the same \texttt{./configure ; make} session.
+
+We also added cursor support for PostgreSQL backend, this improves memory usage
+for large installation.
+
+\section{Changes in Bvfs (Bacula Virtual FileSystem)}
+
+Bat has now a bRestore panel that uses Bvfs to display files and
+directories. It's still experimental.
+
+\begin{figure}[htbp]
+  \centering
+  \includegraphics[width=12cm]{\idir bat-brestore}
+  \label{fig:batbrestore}
+  \caption{Bat Brestore Panel}
+\end{figure}
+
+\texttt{Important}, the Bvfs module is not currently compatible with BaseJobs,
+Copy and Migration jobs.
+
+\medskip
+This project was funded by Bacula Systems.
+
+\subsection*{General notes}
+
+\begin{itemize}
+\item All fields are separated by a tab
+\item You can specify \texttt{limit=} and \texttt{offset=} to list smoothly
+  records in very big directories
+\item All operations (except cache creation) are designed to run instantly
+\item At this time, Bvfs works faster on PostgreSQL than MySQL catalog. If you
+  can contribute new faster SQL queries we will be happy, else don't complain
+  about speed.
+\item The cache creation is dependent of the number of directories. As Bvfs
+  shares information accross jobs, the first creation can be slow
+\item All fields are separated by a tab
+\item Due to potential encoding problem, it's advised to allways use pathid in
+  queries.
+\end{itemize}
+
+\subsection*{Get dependent jobs from a given JobId}
+
+Bvfs allows you to query the catalog against any combination of jobs. You
+can combine all Jobs and all FileSet for a Client in a single session.
+
+To get all JobId needed to restore a particular job, you can use the
+\texttt{.bvfs\_get\_jobids} command.
+
+\begin{verbatim}
+.bvfs_get_jobids jobid=num [all]
+\end{verbatim}
+
+\begin{verbatim}
+.bvfs_get_jobids jobid=10
+1,2,5,10
+.bvfs_get_jobids jobid=10 all
+1,2,3,5,10
+\end{verbatim}
+
+In this example, a normal restore will need to use JobIds 1,2,5,10 to
+compute a complete restore of the system.
+
+With the \texttt{all} option, the Director will use all defined FileSet for
+this client.
+
+\subsection*{Generating Bvfs cache}
+
+The \texttt{.bvfs\_update} command computes the directory cache for jobs
+specified in argument, or for all jobs if unspecified.
+
+\begin{verbatim}
+.bvfs_update [jobid=numlist]
+\end{verbatim}
+
+Example:
+\begin{verbatim}
+.bvfs_update jobid=1,2,3
+\end{verbatim}
+
+You can run the cache update process in a RunScript after the catalog backup.
+
+\subsection*{Get all versions of a specific file}
+
+Bvfs allows you to find all versions of a specific file for a given Client with
+the \texttt{.bvfs\_version} command. To avoid problems with encoding, this
+function uses only PathId and FilenameId. The jobid argument is mandatory but
+unused.
+
+\begin{verbatim}
+.bvfs_versions client=filedaemon pathid=num filenameid=num jobid=1
+PathId FilenameId FileId JobId LStat Md5 VolName Inchanger
+PathId FilenameId FileId JobId LStat Md5 VolName Inchanger
+...
+\end{verbatim}
+
+Example:
+
+\begin{verbatim}
+.bvfs_versions client=localhost-fd pathid=1 fnid=47 jobid=1
+1  47  52  12  gD HRid IGk D Po Po A P BAA I A   /uPgWaxMgKZlnMti7LChyA  Vol1  1
+\end{verbatim}
+
+\subsection*{List directories}
+
+Bvfs allows you to list directories in a specific path.
+\begin{verbatim}
+.bvfs_lsdirs pathid=num path=/apath jobid=numlist limit=num offset=num
+PathId  FilenameId  FileId  JobId  LStat  Path
+PathId  FilenameId  FileId  JobId  LStat  Path
+PathId  FilenameId  FileId  JobId  LStat  Path
+...
+\end{verbatim}
+
+You need to \texttt{pathid} or \texttt{path}. Using \texttt{path=""} will list
+``/'' on Unix and all drives on Windows.  If FilenameId is 0, the record
+listed is a directory.
+
+\begin{verbatim}
+.bvfs_lsdirs pathid=4 jobid=1,11,12
+4       0       0       0       A A A A A A A A A A A A A A     .
+5       0       0       0       A A A A A A A A A A A A A A     ..
+3       0       0       0       A A A A A A A A A A A A A A     regress/
+\end{verbatim}
+
+In this example, to list directories present in \texttt{regress/}, you can use
+\begin{verbatim}
+.bvfs_lsdirs pathid=3 jobid=1,11,12
+3       0       0       0       A A A A A A A A A A A A A A     .
+4       0       0       0       A A A A A A A A A A A A A A     ..
+2       0       0       0       A A A A A A A A A A A A A A     tmp/
+\end{verbatim}
+
+\subsection*{List files}
+
+Bvfs allows you to list files in a specific path.
+\begin{verbatim}
+.bvfs_lsfiles pathid=num path=/apath jobid=numlist limit=num offset=num
+PathId  FilenameId  FileId  JobId  LStat  Path
+PathId  FilenameId  FileId  JobId  LStat  Path
+PathId  FilenameId  FileId  JobId  LStat  Path
+...
+\end{verbatim}
+
+You need to \texttt{pathid} or \texttt{path}. Using \texttt{path=""} will list
+``/'' on Unix and all drives on Windows. If FilenameId is 0, the record listed
+is a directory.
+
+\begin{verbatim}
+.bvfs_lsfiles pathid=4 jobid=1,11,12
+4       0       0       0       A A A A A A A A A A A A A A     .
+5       0       0       0       A A A A A A A A A A A A A A     ..
+1       0       0       0       A A A A A A A A A A A A A A     regress/
+\end{verbatim}
+
+In this example, to list files present in \texttt{regress/}, you can use
+\begin{verbatim}
+.bvfs_lsfiles pathid=1 jobid=1,11,12
+1   47   52   12    gD HRid IGk BAA I BMqcPH BMqcPE BMqe+t A     titi
+1   49   53   12    gD HRid IGk BAA I BMqe/K BMqcPE BMqe+t B     toto
+1   48   54   12    gD HRie IGk BAA I BMqcPH BMqcPE BMqe+3 A     tutu
+1   45   55   12    gD HRid IGk BAA I BMqe/K BMqcPE BMqe+t B     ficheriro1.txt
+1   46   56   12    gD HRie IGk BAA I BMqe/K BMqcPE BMqe+3 D     ficheriro2.txt
+\end{verbatim}
+
+\subsection*{Restore set of files}
+
+Bvfs allows you to create a SQL table that contains files that you want to
+restore. This table can be provided to a restore command with the file option.
+
+\begin{verbatim}
+.bvfs_restore fileid=numlist dirid=numlist hardlink=numlist path=b2num
+OK
+restore file=?b2num ...
+\end{verbatim}
+
+To include a directory (with \texttt{dirid}), Bvfs needs to run a query to
+select all files. This query could be time consuming.
+
+\texttt{hardlink} list is always composed of a serie of two numbers (jobid,
+fileindex). This information can be found in the LinkFI field of the LStat
+packet.
+
+The \texttt{path} argument represents the name of the table that Bvfs will
+store results. The format of this table is \texttt{b2[0-9]+}. (Should start by
+b2 and followed by digits).
+
+Example:
+
+\begin{verbatim}
+.bvfs_restore fileid=1,2,3,4 hardlink=10,15,10,20 jobid=10 path=b20001
+OK
+\end{verbatim}
+
+\subsection*{Cleanup after restore}
+
+To drop the table used by the restore command, you can use the
+\texttt{.bvfs\_cleanup} command.
+
+\begin{verbatim}
+.bvfs_cleanup path=b20001
+\end{verbatim}
+
+\section{Changes in the pruning algorithm}
+
+We rewrote the job pruning algorithm in this version. Previously, in some users
+reported that the pruning process at the end of jobs was very long. It should
+not be longer the case. Now, Bacula won't prune automatically a Job if this
+particular Job is needed to restore data. Example:
+
+\begin{verbatim}
+JobId: 1  Level: Full
+JobId: 2  Level: Incremental
+JobId: 3  Level: Incremental
+JobId: 4  Level: Differential
+.. Other incrementals up to now
+\end{verbatim}
+
+In this example, if the Job Retention defined in the Pool or in the Client
+resource causes that Jobs with Jobid in 1,2,3,4 can be pruned, Bacula will
+detect that JobId 1 and 4 are essential to restore data at the current state
+and will prune only JobId 2 and 3.
+
+\texttt{Important}, this change affect only the automatic pruning step after a
+Job and the \texttt{prune jobs} Bconsole command. If a volume expires after the
+\texttt{VolumeRetention} period, important jobs can be pruned.
+
+\section{Ability to Verify any specified Job}
+You now have the ability to tell Bacula which Job should verify instead of
+automatically verify just the last one.
+
+This feature can be used with VolumeToCatalog, DiskToCatalog and Catalog level.
+
+To verify a given job, just specify the Job jobid in argument when starting the
+job.
+\begin{verbatim}
+*run job=VerifyVolume jobid=1 level=VolumeToCatalog
+Run Verify job
+JobName:     VerifyVolume
+Level:       VolumeToCatalog
+Client:      127.0.0.1-fd
+FileSet:     Full Set
+Pool:        Default (From Job resource)
+Storage:     File (From Job resource)
+Verify Job:  VerifyVol.2010-09-08_14.17.17_03
+Verify List: /tmp/regress/working/VerifyVol.bsr
+When:        2010-09-08 14:17:31
+Priority:    10
+OK to run? (yes/mod/no):
+\end{verbatim}
+
+\medskip
+This project was funded by Bacula Systems and is available with Bacula
+Enterprise Edition and Community Edition.
+
+\section{Additions to RunScript variables}
+You can have access to JobBytes and JobFiles using \%b and \%f in your runscript
+command. The Client address is now available through \%h.
+
+\begin{verbatim}
+RunAfterJob = "/bin/echo Job=%j JobBytes=%b JobFiles=%f ClientAddress=%h"
+\end{verbatim}
+
+%\section{Changes in drivetype.exe}
+%
+%Now the \texttt{drivetype.exe} program allows you to list all local hard
+%drives. It can help to build dynamic FileSet on Windows.
+%
+%\begin{verbatim}
+%File = "\\|\"c:/program files/bacula/bin32/drivetype\" -l -a"
+%\end{verbatim}
+%
+
+\section{ACL/Extended Attributes}
+
+We added support for NFSv4 ACLs on FreeBSD 8.1 and IRIX extended attributes.
+
+This project was funded by Marco van Wieringen.
+
+\section{Additions to the Plugin API}
+The bfuncs structure has been extended to include a number of
+new entrypoints.
+
+\subsection{bfuncs}
+The bFuncs structure defines the callback entry points within Bacula
+that the plugin can use register events, get Bacula values, set
+Bacula values, and send messages to the Job output or debug output.
+
+The exact definition as of this writing is:
+\begin{verbatim}
+typedef struct s_baculaFuncs {
+   uint32_t size;
+   uint32_t version;
+   bRC (*registerBaculaEvents)(bpContext *ctx, ...);
+   bRC (*getBaculaValue)(bpContext *ctx, bVariable var, void *value);
+   bRC (*setBaculaValue)(bpContext *ctx, bVariable var, void *value);
+   bRC (*JobMessage)(bpContext *ctx, const char *file, int line,
+       int type, utime_t mtime, const char *fmt, ...);
+   bRC (*DebugMessage)(bpContext *ctx, const char *file, int line,
+       int level, const char *fmt, ...);
+   void *(*baculaMalloc)(bpContext *ctx, const char *file, int line,
+       size_t size);
+   void (*baculaFree)(bpContext *ctx, const char *file, int line, void *mem);
+   
+   /* New functions follow */
+   bRC (*AddExclude)(bpContext *ctx, const char *file);
+   bRC (*AddInclude)(bpContext *ctx, const char *file);
+   bRC (*AddIncludeOptions)(bpContext *ctx, const char *opts);
+   bRC (*AddRegex)(bpContext *ctx, const char *item, int type);
+   bRC (*AddWild)(bpContext *ctx, const char *item, int type);
+   bRC (*checkChanges)(bpContext *ctx, struct save_pkt *sp);
+
+} bFuncs;
+\end{verbatim}
+
+\begin{description}
+\item [AddExclude] can be called to exclude a file. The file
+  string passed may include wildcards that will be interpreted by
+  the {\bf fnmatch} subroutine. This function can be called 
+  multiple times, and each time the file specified will be added
+  to the list of files to be excluded. Note, this function only
+  permits adding excludes of specific file or directory names,
+  or files matched by the rather simple fnmatch mechanism.
+  See below for information on doing wild-card and regex excludes.
+
+\item [NewInclude] can be called to create a new Include block. This
+  block will be added before any user defined Include blocks. This
+  function can be called multiple times, but each time, it will create
+  a new Include section (not normally needed). This function should
+  be called only if you want to add an entirely new Include block.
+
+\item [AddInclude] can be called to add new files/directories to
+  be included.  They are added to the current Include block. If
+  NewInclude has not been included, the current Include block is
+  the last one that the user created. This function
+  should be used only if you want to add totally new files/directories
+  to be included in the backup. 
+
+\item [NewOptions] adds a new Options block to the current Include
+  in front of any other Options blocks. This permits the plugin to
+  add exclude directives (wild-cards and regexes) in front of the
+  user Options, and thus prevent certain files from being backed up.
+  This can be useful if the plugin backs up files, and they should
+  not be also backed up by the main Bacula code.  This function
+  may be called multiple times, and each time, it creates a new
+  prepended Options block. Note: normally you want to call this 
+  entry point prior to calling AddOptions, AddRegex, or AddWild.
+  
+\item [AddOptions] allows the plugin it set options in
+  the current Options block, which is normally created with the
+  NewOptions call just prior to adding Include Options.
+  The permitted options are passed as a character string, where
+  each character has a specific meaning as defined below:
+
+  \begin{description}
+  \item [a] always replace files (default).
+  \item [e] exclude rather than include.
+  \item [h] no recursion into subdirectories.
+  \item [H] do not handle hard links.
+  \item [i] ignore case in wildcard and regex matches.
+  \item [M] compute an MD5 sum.
+  \item [p] use a portable data format on Windows (not recommended).
+  \item [R] backup resource forks and Findr Info.
+  \item [r] read from a fifo
+  \item [S1] compute an SHA1 sum.
+  \item [S2] compute an SHA256 sum.
+  \item [S3] comput an SHA512 sum.
+  \item [s] handle sparse files.
+  \item [m] use st\_mtime only for file differences.
+  \item [k] restore the st\_atime after accessing a file.
+  \item [A] enable ACL backup.
+  \item [Vxxx:] specify verify options. Must terminate with :
+  \item [Cxxx:] specify accurate options. Must terminate with :
+  \item [Jxxx:] specify base job Options. Must terminate with :
+  \item [Pnnn:] specify integer nnn paths to strip. Must terminate with :
+  \item [w] if newer
+  \item [Zn] specify gzip compression level n.
+  \item [K] do not use st\_atime in backup decision.
+  \item [c] check if file changed during backup.
+  \item [N] honor no dump flag.
+  \item [X] enable backup of extended attributes.
+  \end{description}
+
+\item [AddRegex] adds a regex expression to the current Options block.
+  The fillowing options are permitted:
+  \begin{description}
+  \item [ ] (a blank) regex applies to whole path and filename.
+  \item [F] regex applies only to the filename (directory or path stripped).
+  \item [D] regex applies only to the directory (path) part of the name.
+  \end{description}
+
+\item [AddWild] adds a wildcard expression to the current Options block.
+  The fillowing options are permitted:
+  \begin{description}
+  \item [ ] (a blank) regex applies to whole path and filename.
+  \item [F] regex applies only to the filename (directory or path stripped).
+  \item [D] regex applies only to the directory (path) part of the name.
+  \end{description}
+
+\item [checkChanges] call the \texttt{check\_changes()} function in Bacula code
+  that can use Accurate code to compare the file information in argument with
+  the previous file information. The \texttt{delta\_seq} attribute of the
+  \texttt{save\_pkt} will be updated, and the call will return
+  \texttt{bRC\_Seen} if the core code wouldn't decide to backup it.
+  
+\end{description}
+  
+
+\subsection{Bacula events}
+The list of events has been extended to include:
+
+\begin{verbatim}
+typedef enum {
+  bEventJobStart        = 1,
+  bEventJobEnd          = 2,
+  bEventStartBackupJob  = 3,
+  bEventEndBackupJob    = 4,
+  bEventStartRestoreJob = 5,
+  bEventEndRestoreJob   = 6,
+  bEventStartVerifyJob  = 7,
+  bEventEndVerifyJob    = 8,
+  bEventBackupCommand   = 9,
+  bEventRestoreCommand  = 10,
+  bEventLevel           = 11,
+  bEventSince           = 12,
+   
+  /* New events */
+  bEventCancelCommand                   = 13,
+  bEventVssBackupAddComponents          = 14,
+  bEventVssRestoreLoadComponentMetadata = 15,
+  bEventVssRestoreSetComponentsSelected = 16,
+  bEventRestoreObject                   = 17,
+  bEventEndFileSet                      = 18,
+  bEventPluginCommand                   = 19,
+  bEventVssBeforeCloseRestore           = 20,
+  bEventVssPrepareSnapshot              = 21
+
+} bEventType;
+\end{verbatim}
+
+\begin{description}
+\item [bEventCancelCommand] is called whenever the currently
+  running Job is cancelled */
+
+\item [bEventVssBackupAddComponents] 
+
+\item [bEventVssPrepareSnapshot] is called before creating VSS snapshots, it
+  provides a char[27] table where the plugin can add Windows drives that will
+  be used during the Job. You need to add them without duplicates, and you can
+  use in \texttt{fd\_common.h} \texttt{add\_drive()} and \texttt{copy\_drives()}
+  for this purpose.
+\end{description}
+
+\chapter{Release Version 5.0.3}
+
+There are no new features in version 5.0.2.  This version simply fixes a
+number of bugs found in version 5.0.1 during the onging development
+process.
+
+\chapter{Release Version 5.0.2}
+
+There are no new features in version 5.0.2.  This version simply fixes a
+number of bugs found in version 5.0.1 during the onging development
+process.
 
+%%
 %%
 
-\chapter{New Features in 3.1.4 (Development Version}
-\label{NewFeaturesChapter}
+\chapter{New Features in 5.0.1}
 
-This chapter presents the new features that are currently under development
-in the 3.1.x versions to be released as Bacula version 3.2.0 sometime in
-late 2009 or early 2010.
+This chapter presents the new features that are in the released Bacula version
+5.0.1. This version mainly fixes a number of bugs found in version 5.0.0 during
+the onging development process.
 
-\section{Truncate volume after purge}
+\section{Truncate Volume after Purge}
 \label{sec:actiononpurge}
 
 The Pool directive \textbf{ActionOnPurge=Truncate} instructs Bacula to truncate
-the volume when it is purged. It is useful to prevent disk based volumes from
-consuming too much space. 
+the volume when it is purged with the new command \texttt{purge volume
+  action}. It is useful to prevent disk based volumes from consuming too much
+space.
 
 \begin{verbatim}
 Pool {
@@ -24,6 +702,54 @@ Pool {
 }
 \end{verbatim}
 
+As usual you can also set this property with the \texttt{update volume} command
+\begin{verbatim}
+*update volume=xxx ActionOnPurge=Truncate
+*update volume=xxx actiononpurge=None
+\end{verbatim}
+
+To ask Bacula to truncate your \texttt{Purged} volumes, you need to use the
+following command in interactive mode or in a RunScript as shown after:
+\begin{verbatim}
+*purge volume action=truncate storage=File allpools
+# or by default, action=all
+*purge volume action storage=File pool=Default
+\end{verbatim}
+
+This is possible to specify the volume name, the media type, the pool, the
+storage, etc\dots (see \texttt{help purge}) Be sure that your storage device is
+idle when you decide to run this command.
+
+\begin{verbatim}
+Job {
+ Name = CatalogBackup
+ ...
+ RunScript {
+   RunsWhen=After
+   RunsOnClient=No
+   Console = "purge volume action=all allpools storage=File"
+ }
+}
+\end{verbatim}
+
+\textbf{Important note}: This feature doesn't work as
+expected in version 5.0.0. Please do not use it before version 5.0.1.
+
+\section{Allow Higher Duplicates}
+This directive did not work correctly and has been depreciated
+(disabled) in version 5.0.1. Please remove it from your bacula-dir.conf
+file as it will be removed in a future rlease.
+
+\section{Cancel Lower Level Duplicates}
+This directive was added in Bacula version 5.0.1.  It compares the
+level of a new backup job to old jobs of the same name, if any,
+and will kill the job which has a lower level than the other one.
+If the levels are the same (i.e. both are Full backups), then 
+nothing is done and the other Cancel XXX Duplicate directives
+will be examined.
+
+\chapter{New Features in 5.0.0}
+
 \section{Maximum Concurent Jobs for Devices}
 \label{sec:maximumconcurentjobdevice}
 
@@ -35,6 +761,8 @@ Maximum Concurrent Jobs limit is reached, the Storage Daemon will start new
 Jobs on any other available compatible drive.  This facilitates writing to
 multiple drives with multiple Jobs that all use the same Pool.
 
+This project was funded by Bacula Systems.
+
 \section{Restore from Multiple Storage Daemons}
 \index[general]{Restore}
 
@@ -68,48 +796,7 @@ Now for the OS part, a Base job will be backed up once, and rather than making
 100 copies of the OS, there will be only one.  If one or more of the systems
 have some files updated, no problem, they will be automatically restored.
 
-A new Job directive \texttt{Base=Jobx, Joby...} permits to specify the list of
-files that will be used during Full backup as base.
-
-\begin{verbatim}
-Job {
-   Name = BackupLinux
-   Level= Base
-   ...
-}
-
-Job {
-   Name = BackupZog4
-   Base = BackupZog4, BackupLinux
-   Accurate = yes
-   ...
-}
-\end{verbatim}
-
-In this example, the job \texttt{BackupZog4} will use the most recent version
-of all files contained in \texttt{BackupZog4} and \texttt{BackupLinux}
-jobs. Base jobs should have run with \texttt{level=Base} to be used.
-
-By default, Bacula will compare permissions bits, user and group fields,
-modification time, size and the checksum of the file to choose between the
-current backup and the BaseJob file list. You can change this behavior with the
-\texttt{BaseJob} FileSet option. This option works like the \texttt{verify=}
-one, that is described in the \ilink{FileSet}{FileSetResource} chapter.
-
-\begin{verbatim}
-FileSet {
-  Name = Full
-  Include = {
-    Options {
-       BaseJob  = pmugcs5
-       Accurate = mcs5
-       Verify   = pin5
-    }
-    File = /
-  }
-}
-\end{verbatim}
-
+See the \ilink{Base Job Chapter}{basejobs} for more information.
 
 This project was funded by Bacula Systems.
 
@@ -155,7 +842,7 @@ FileSet {
   Name = Full
   Include = {
     Options {
-       Accurate = mcs5
+       Accurate = mcs
        Verify   = pin5
     }
     File = /
@@ -164,41 +851,18 @@ FileSet {
 \end{verbatim}
 
 \begin{description}  
-\item {\bf i}
-  compare the inodes  
-  
-\item {\bf p}
-  compare the permission bits  
-  
-\item {\bf n}
-  compare the number of links  
-  
-\item {\bf u}
-  compare the user id  
-  
-\item {\bf g}
-  compare the group id  
-  
-\item {\bf s}
-  compare the size  
-  
-\item {\bf a}
-  compare the access time  
-  
-\item {\bf m}
-  compare the modification time (st\_mtime)  
-  
-\item {\bf c}
-  compare the change time (st\_ctime)  
-  
-\item {\bf d}
-  report file size decreases  
-  
-\item {\bf 5}
-  compare the MD5 signature  
-  
-\item {\bf 1}
-  compare the SHA1 signature  
+\item {\bf i}  compare the inodes  
+\item {\bf p}  compare the permission bits  
+\item {\bf n}  compare the number of links  
+\item {\bf u}  compare the user id  
+\item {\bf g}  compare the group id  
+\item {\bf s}  compare the size  
+\item {\bf a}  compare the access time  
+\item {\bf m}  compare the modification time (st\_mtime)  
+\item {\bf c}  compare the change time (st\_ctime)  
+\item {\bf d}  report file size decreases  
+\item {\bf 5}  compare the MD5 signature  
+\item {\bf 1}  compare the SHA1 signature  
 \end{description}
 
 \textbf{Important note:} If you decide to use checksum in Accurate jobs,
@@ -207,6 +871,8 @@ be saved.  This increases the I/O load, but also the accuracy of the
 deduplication.  By default, Bacula will check modification/creation time
 and size.
 
+This project was funded by Bacula Systems.
+
 \section{Tab-completion for Bconsole}
 \label{sec:tabcompletion}
 
@@ -223,6 +889,40 @@ your system, and use the following option in configure.
 
 The new bconsole won't be able to tab-complete with older directors.
 
+This project was funded by Bacula Systems.
+
+\section{Pool File and Job Retention}
+\label{sec:poolfilejobretention}
+
+We added two new Pool directives, \texttt{FileRetention} and
+\texttt{JobRetention}, that take precedence over Client directives of the same
+name. It allows you to control the Catalog pruning algorithm Pool by Pool. For
+example, you can decide to increase Retention times for Archive or OffSite Pool.
+
+It seems obvious to us, but apparently not to some users, that given the
+definition above that the Pool File and Job Retention periods is a global
+override for the normal Client based prunning, which means that when the
+Job is prunned, the prunning will apply globally to that particular Job.
+
+Currently, there is a bug in the implementation that causes any Pool 
+retention periods specified to apply to {\bf all} Pools for that
+particular Client.  Thus we suggest that you avoid using these two
+directives until this implementation problem is corrected.
+
+\section{Read-only File Daemon using capabilities}
+\label{sec:fdreadonly}
+This feature implements support of keeping \textbf{ReadAll} capabilities after
+UID/GID switch, this allows FD to keep root read but drop write permission.
+
+It introduces new \texttt{bacula-fd} option (\texttt{-k}) specifying that
+\textbf{ReadAll} capabilities should be kept after UID/GID switch.
+
+\begin{verbatim}
+root@localhost:~# bacula-fd -k -u nobody -g nobody
+\end{verbatim}
+
+The code for this feature was contributed by our friends at AltLinux.
+
 \section{Bvfs API}
 \label{sec:bvfs}
 
@@ -253,6 +953,8 @@ data that will be displayed.
 * .bvfs_lsdir path=/ jobid=1,2
 \end{verbatim}
 
+This project was funded by Bacula Systems.
+
 \section{Testing your Tape Drive}
 \label{sec:btapespeed}
 
@@ -322,6 +1024,8 @@ to go undetected.
 
 \section{New Bat Features}
 
+Those new features were funded by Bacula Systems.
+
 \subsection{Media List View}
 
 By clicking on ``Media'', you can see the list of all your volumes. You will be
@@ -369,8 +1073,143 @@ access a detailed overview of your Autochanger. (cf \ref{fig:jobinfo}.)
   \label{fig:achcontent}
 \end{figure}
 
-\section{Console Timeout Option}
-You can now use the -u option of bconsole to set a timeout for each command.
+To use this feature, you need to use the latest mtx-changer script
+version. (With new \texttt{listall} and \texttt{transfer} commands)
+
+\section{Bat on Windows}
+We have ported {\bf bat} to Windows and it is now installed 
+by default when the installer is run.  It works quite well 
+on Win32, but has not had a lot of testing there, so your
+feedback would be welcome.  Unfortunately, eventhough it is
+installed by default, it does not yet work on 64 bit Windows
+operating systems.
+
+\section{New Win32 Installer}
+The Win32 installer has been modified in several very important
+ways.  
+\begin{itemize}
+\item You must deinstall any current version of the
+Win32 File daemon before upgrading to the new one. 
+If you forget to do so, the new installation will fail.
+To correct this failure, you must manually shutdown 
+and deinstall the old File daemon. 
+\item All files (other than menu links) are installed
+in {\bf c:/Program Files/Bacula}.  
+\item The installer no longer sets this
+file to require administrator privileges by default. If you want
+to do so, please do it manually using the {\bf cacls} program.
+For example:
+\begin{verbatim}
+cacls "C:\Program Files\Bacula" /T /G SYSTEM:F Administrators:F
+\end{verbatim}
+\item The server daemons (Director and Storage daemon) are
+no longer included in the Windows installer.  If you want the
+Windows servers, you will either need to build them yourself (note
+they have not been ported to 64 bits), or you can contact 
+Bacula Systems about this.
+\end{itemize}
+
+\section{Win64 Installer}
+We have corrected a number of problems that required manual
+editing of the conf files.  In most cases, it should now
+install and work.  {\bf bat} is by default installed in
+{\bf c:/Program Files/Bacula/bin32} rather than
+{\bf c:/Program Files/Bacula} as is the case with the 32
+bit Windows installer.
+
+\section{Linux Bare Metal Recovery USB Key}
+We have made a number of significant improvements in the
+Bare Metal Recovery USB key.  Please see the README files
+it the {\bf rescue} release for more details.  
+
+We are working on an equivalent USB key for Windows bare
+metal recovery, but it will take some time to develop it (best
+estimate 3Q2010 or 4Q2010)
+
+
+\section{bconsole Timeout Option}
+You can now use the -u option of {\bf bconsole} to set a timeout in seconds
+for commands. This is useful with GUI programs that use {\bf bconsole}
+to interface to the Director.
+
+\section{Important Changes}
+\label{sec:importantchanges}
+
+\begin{itemize}
+\item You are now allowed to Migrate, Copy, and Virtual Full to read and write
+  to the same Pool. The Storage daemon ensures that you do not read and
+  write to the same Volume.
+\item The \texttt{Device Poll Interval} is now 5 minutes. (previously did not
+  poll by default).
+\item Virtually all the features of {\bf mtx-changer} have
+  now been parameterized, which allows you to configure
+  mtx-changer without changing it. There is a new configuration file {\bf mtx-changer.conf} 
+  that contains variables that you can set to configure mtx-changer.
+  This configuration file will not be overwritten during upgrades.
+  We encourage you to submit any changes
+  that are made to mtx-changer and to parameterize it all in
+  mtx-changer.conf so that all configuration will be done by
+  changing only mtx-changer.conf.
+\item The new \texttt{mtx-changer} script has two new options, \texttt{listall}
+  and \texttt{transfer}. Please configure them as appropriate
+  in mtx-changer.conf.
+\item To enhance security of the \texttt{BackupCatalog} job, we provide a new
+  script (\texttt{make\_catalog\_backup.pl}) that does not expose your catalog
+  password. If you want to use the new script, you will need to 
+  manually change the \texttt{BackupCatalog} Job definition.
+\item The \texttt{bconsole} \texttt{help} command now accepts
+  an argument, which if provided produces information on that
+  command (ex: \texttt{help run}).
+\end{itemize}
+
+
+\subsubsection*{Truncate volume after purge}
+
+Note that the Truncate Volume after purge feature doesn't work as expected
+in 5.0.0 version. Please, don't use it before version 5.0.1.
+
+\subsection{Custom Catalog queries}
+
+If you wish to add specialized commands that list the contents of the catalog,
+you can do so by adding them to the \texttt{query.sql} file. This
+\texttt{query.sql} file is now empty by default.  The file
+\texttt{examples/sample-query.sql} has an a number of sample commands
+you might find useful.
+
+\subsection{Deprecated parts}
+
+The following items have been \textbf{deprecated} for a long time, and are now
+removed from the code.
+\begin{itemize}
+\item Gnome console
+\item Support for SQLite 2
+\end{itemize}
+
+\section{Misc Changes}
+\label{sec:miscchanges}
+
+\begin{itemize}
+\item Updated Nagios check\_bacula
+\item Updated man files
+\item Added OSX package generation script in platforms/darwin
+\item Added Spanish and Ukrainian Bacula translations
+\item Enable/disable command shows only Jobs that can change
+\item Added \texttt{show disabled} command to show disabled Jobs
+\item Many ACL improvements
+\item Added Level to FD status Job output
+\item Begin Ingres DB driver (not yet working)
+\item Split RedHat spec files into bacula, bat, mtx, and docs
+\item Reorganized the manuals (fewer separate manuals)
+\item Added lock/unlock order protection in lock manager
+\item Allow 64 bit sizes for a number of variables
+\item Fixed several deadlocks or potential race conditions in the SD
+\end{itemize}
+
+\chapter{Released Version 3.0.3 and 3.0.3a}
+
+There are no new features in version 3.0.3.  This version simply fixes a
+number of bugs found in version 3.0.2 during the onging development
+process.
 
 \chapter{New Features in Released Version 3.0.2}
 
@@ -648,7 +1487,6 @@ JobDefs {
   Maximum Concurrent Jobs = 10
   SpoolData = No
   Allow Duplicate Jobs = Yes
-  Allow Higher Duplicates = No
   Cancel Queued Duplicates = No
   Cancel Running Duplicates = No
   Priority = 13
@@ -1053,7 +1891,7 @@ They are:
 
 \subsection{Allow Duplicate Jobs = \lt{}yes\vb{}no\gt{}}
 \index[general]{Allow Duplicate Jobs}
-  If this directive is enabled duplicate jobs will be run.  If
+  If this directive is set to {\bf yes}, duplicate jobs will be run.  If
   the directive is set to {\bf no} (default) then only one job of a given name
   may run at one time, and the action that Bacula takes to ensure only
   one job runs is determined by the other directives (see below).
@@ -1063,14 +1901,17 @@ They are:
   cancelling a job, then the current job (the second one started)
   will be cancelled.
 
-
 \subsection{Allow Higher Duplicates = \lt{}yes\vb{}no\gt{}}
 \index[general]{Allow Higher Duplicates}
-  If this directive is set to {\bf yes} (default) the job with a higher
-  priority (lower priority number) will be permitted to run, and
-  the current job will be cancelled.  If the
-  priorities of the two jobs are the same, the outcome is determined by
-  other directives (see below).
+  This directive was in version 5.0.0, but does not work as
+  expected. If used, it should always be set to no.  In later versions
+  of Bacula the directive is disabled (disregarded).
+
+\subsection{Cancel Running Duplicates = \lt{}yes\vb{}no\gt{}}
+\index[general]{Cancel Running Duplicates}
+  If {\bf Allow Duplicate Jobs} is set to {\bf no} and
+  if this directive is set to {\bf yes} any job that is already running
+  will be canceled.  The default is {\bf no}.
 
 \subsection{Cancel Queued Duplicates = \lt{}yes\vb{}no\gt{}}
 \index[general]{Cancel Queued Duplicates}
@@ -1079,12 +1920,6 @@ They are:
   already queued to run but not yet running will be canceled.
   The default is {\bf no}. 
 
-\subsection{Cancel Running Duplicates = \lt{}yes\vb{}no\gt{}}
-\index[general]{Cancel Running Duplicates}
-  If {\bf Allow Duplicate Jobs} is set to {\bf no} and
-  if this directive is set to {\bf yes} any job that is already running
-  will be canceled.  The default is {\bf no}.
-
 
 \section{TLS Authentication}
 \index[general]{TLS Authentication}
@@ -1286,6 +2121,9 @@ plugin.
 The {\bf bpipe} plugin is provided in the directory src/plugins/fd/bpipe-fd.c of
 the Bacula source distribution. When the plugin is compiled and linking into
 the resulting dynamic shared object (DSO), it will have the name {\bf bpipe-fd.so}.
+Please note that this is a very simple plugin that was written for
+demonstration and test purposes. It is and can be used in production, but
+that was never really intended.
 
 The purpose of the plugin is to provide an interface to any system program for
 backup and restore. As specified above the {\bf bpipe} plugin is specified in
@@ -1313,13 +2151,24 @@ a conflict with a path and filename that actually exists on your system.
 \item {\bf field3} for the {\bf bpipe} plugin 
 specifies the "reader" program that is called by the plugin during
 backup to read the data. {\bf bpipe} will call this program by doing a
-{\bf popen} on it.
+{\bf popen} on it. 
 
 \item {\bf field4} for the {\bf bpipe} plugin
 specifies the "writer" program that is called by the plugin during
 restore to write the data back to the filesystem.  
 \end{description}
 
+Please note that for two items above describing the "reader" and "writer"
+fields, these programs are "executed" by Bacula, which
+means there is no shell interpretation of any command line arguments
+you might use.  If you want to use shell characters (redirection of input
+or output, ...), then we recommend that you put your command or commands
+in a shell script and execute the script. In addition if you backup a
+file with the reader program, when running the writer program during
+the restore, Bacula will not automatically create the path to the file.
+Either the path must exist, or you must explicitly do so with your command
+or in a shell script.
+
 Putting it all together, the full plugin directive line might look
 like the following:
 
@@ -1977,8 +2826,8 @@ transmitted across the network. That should reduce load and speedup insertion.
 A new Job directive permits to specify the spool size per job. This is used
 in advanced job tunning. {\bf SpoolSize={\it bytes}}
 
-\subsection{MaxConsoleConnections = \lt{}number\gt{}}
-\index[general]{MaxConsoleConnections}
+\subsection{MaximumConsoleConnections = \lt{}number\gt{}}
+\index[general]{MaximumConsoleConnections}
 A new director directive permits to specify the maximum number of Console
 Connections that could run concurrently. The default is set to 20, but you may
 set it to a larger number.