From 6d372ad6db85db578fc50982e33a7469a6f7b650 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 30 Mar 2009 14:08:28 +0000 Subject: [PATCH] ebl Add FileRegex doc --- docs/manuals/en/concepts/bootstrap.tex | 8 +++++-- docs/manuals/en/concepts/newfeatures.tex | 13 ++++++++++- docs/manuals/en/concepts/restore.tex | 28 +++++++++++++++++++++--- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/docs/manuals/en/concepts/bootstrap.tex b/docs/manuals/en/concepts/bootstrap.tex index a5923f20..882aaf03 100644 --- a/docs/manuals/en/concepts/bootstrap.tex +++ b/docs/manuals/en/concepts/bootstrap.tex @@ -132,7 +132,7 @@ matched against the Volume records are: This value is optional and not used by Bacula to restore files. \item [FileIndex] - \index[general]{FileIndex } + \index[general]{FileIndex} The value specifies a FileIndex, list of FileIndexes, or range of FileIndexes to be selected from the current Volume. Each file (data) stored on a Volume within a Session has a unique FileIndex. For each Session, the first file @@ -149,10 +149,14 @@ matched against the Volume records are: required. \item [FileRegex] - \index[general]{FileRegex } + \index[general]{FileRegex} The value is a regular expression. When specified, only matching filenames will be restored. +\begin{verbatim} + FileRegex=^/etc/passwd(.old)? +\end{verbatim} + \item [Slot] \index[general]{Slot } The value specifies the autochanger slot. There may be only a single {\bf diff --git a/docs/manuals/en/concepts/newfeatures.tex b/docs/manuals/en/concepts/newfeatures.tex index 275d08f8..bcb306d6 100644 --- a/docs/manuals/en/concepts/newfeatures.tex +++ b/docs/manuals/en/concepts/newfeatures.tex @@ -1097,9 +1097,20 @@ In your Director's {\bf Messages} resource. During a restore, if all File records are pruned from the catalog for a Job, normally Bacula can restore only all files saved. That is there is no way using the catalog to select individual files. - With this new command, Bacula will ask if you want to specify a Regex + With this new feature, Bacula will ask if you want to specify a Regex expression for extracting only a part of the full backup. +\begin{verbatim} + Building directory tree for JobId(s) 1,3 ... + There were no files inserted into the tree, so file selection + is not possible.Most likely your retention policy pruned the files + + Do you want to restore all the files? (yes|no): no + + Regexp matching files to restore? (empty to abort): /tmp/regress/(bin|tests)/ + Bootstrap records written to /tmp/regress/working/zog4-dir.restore.1.bsr +\end{verbatim} + \subsection{Bootstrap File Optimization Changes} In order to permit proper seeking on disk files, we have extended the bootstrap file format to include a {\bf VolStartAddr} and {\bf VolEndAddr} records. Each diff --git a/docs/manuals/en/concepts/restore.tex b/docs/manuals/en/concepts/restore.tex index 31736082..4f2083c3 100644 --- a/docs/manuals/en/concepts/restore.tex +++ b/docs/manuals/en/concepts/restore.tex @@ -67,9 +67,11 @@ interactively walk up and down the file tree selecting individual files to be restored. This mode is somewhat similar to the standard Unix {\bf restore} program's interactive file selection mode. -If a Job's file records have been pruned from the catalog, the {\bf -restore} command will be unable to find any files to restore. See below -for more details on this. +If a Job's file records have been pruned from the catalog, the {\bf restore} +command will be unable to find any files to restore. Bacula will ask if you +want to restore all of them or if you want to use a regular expression to +restore only a selection while reading media. See \ilink{FileRegex + option}{FileRegex} and below for more details on this. Within the Console program, after entering the {\bf restore} command, you are presented with the following selection prompt: @@ -419,6 +421,26 @@ daemon will first request Volume {\bf DLT-19Jul02} and after the appropriate files have been restored from that volume, it will request Volume {\bf DLT-04Aug02}. +\subsection{Restore a pruned job using a pattern} + During a restore, if all File records are pruned from the catalog + for a Job, normally Bacula can restore only all files saved. That + is there is no way using the catalog to select individual files. + With this new feature, Bacula will ask if you want to specify a Regex + expression for extracting only a part of the full backup. + +\begin{verbatim} + Building directory tree for JobId(s) 1,3 ... + There were no files inserted into the tree, so file selection + is not possible.Most likely your retention policy pruned the files + + Do you want to restore all the files? (yes|no): no + + Regexp matching files to restore? (empty to abort): /tmp/regress/(bin|tests)/ + Bootstrap records written to /tmp/regress/working/zog4-dir.restore.1.bsr +\end{verbatim} + + See also \ilink{FileRegex bsr option}{FileRegex} for more information. + \section{Selecting Files by Filename} \index[general]{Selecting Files by Filename } \index[general]{Filename!Selecting Files by } -- 2.39.5