Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Steffens <joerg.steffens@bareos.com>2017-08-31 23:05:08 +0300
committerJoerg Steffens <joerg.steffens@bareos.com>2017-09-01 19:25:22 +0300
commit96c2c88efa52726b885db579dc6e252c0b6015b4 (patch)
treef49cf071368259fc8f18765dd998eb8e4c46d00f
parent2e087622e2defef72c6848daa469354b1ed3461d (diff)
NDMP_NATIVE
-rw-r--r--manuals/en/main/always-incremental.tex2
-rw-r--r--manuals/en/main/bareos.sty12
-rw-r--r--manuals/en/main/configure.tex14
-rw-r--r--manuals/en/main/director-resource-job-definitions.tex7
-rw-r--r--manuals/en/main/director-resource-storage-definitions.tex14
-rw-r--r--manuals/en/main/disk.tex4
-rw-r--r--manuals/en/main/ndmp.tex1164
7 files changed, 1102 insertions, 115 deletions
diff --git a/manuals/en/main/always-incremental.tex b/manuals/en/main/always-incremental.tex
index befa83a..4721fc6 100644
--- a/manuals/en/main/always-incremental.tex
+++ b/manuals/en/main/always-incremental.tex
@@ -131,7 +131,7 @@ The always incremental jobs need to be executed during the backup window (usuall
\warning{All Bareos job resources have some required directives, e.g. \linkResourceDirective{Dir}{Job}{Client}.
Even so, none other than the mentioned directives are evaluated by a \resourceDirectiveValue{Dir}{Job}{Type}{Consolidate},
they still have to be defined.
-Normally all required directives are already set in \resourceDirectiveValue{Dir}{Job}{JobDefs}{DefaultJob}.
+Normally all required directives are already set in \resourceDirectiveValue{Dir}{Job}{Job Defs}{DefaultJob}.
If not, you have to add them. You can use arbitrary, but valid values.}
diff --git a/manuals/en/main/bareos.sty b/manuals/en/main/bareos.sty
index c82151d..32fa287 100644
--- a/manuals/en/main/bareos.sty
+++ b/manuals/en/main/bareos.sty
@@ -23,6 +23,8 @@
% therefore use \textasciicircum instead.
% However, ^ works inside verbatim and lst environments.
+\newcommand{\subsubsubsection}[1]{\paragraph{#1}}
+
\newcommand{\bareosFd}{Bareos File Daemon\xspace}
\newcommand{\bareosSd}{Bareos Storage Daemon\xspace}
\newcommand{\bareosDir}{Bareos Director\xspace}
@@ -76,6 +78,7 @@
\csdef{dtPath}{\ilink{path}{DataTypePath}}
% use csdef instead of newcommand, because command contains numbers
\csdef{dtPint32}{\dtUInt}
+\csdef{dtProtocolType}{\ilink{job protocol}{DataTypeJobProtocol}}
\csdef{dtRes}{\ilink{resource-name}{DataTypeRes}}
\csdef{dtPort}{\dtNetPort}
\csdef{dtScheduleRunCommand}{{job-overrides{\gt} {\lt}date-time-specification}}
@@ -258,6 +261,15 @@
\newcommand{\vmware}{VMware\registered}
\newcommand{\vSphere}{VMware vSphere\registered}
+% NDMP
+\newcommand{\DataManagementAgent}{Data Management Agent\xspace}
+\newcommand{\DataAgent}{Data Agent\xspace}
+\newcommand{\TapeAgent}{Tape Agent\xspace}
+\newcommand{\RobotAgent}{Robot Agent\xspace}
+
+\newcommand{\NdmpBareos}{NDMP\_BAREOS}
+\newcommand{\NdmpNative}{NDMP\_NATIVE}
+
% Bareos quote
\newcommand{\bquote}[1]{``#1''}
%%
diff --git a/manuals/en/main/configure.tex b/manuals/en/main/configure.tex
index f997712..bd5cac7 100644
--- a/manuals/en/main/configure.tex
+++ b/manuals/en/main/configure.tex
@@ -593,6 +593,20 @@ exceed 4 billion and thus require a 64 bit value.
Don't use quotes around the number, see \nameref{sec:Quotes}.
+\item [job protocol]
+ \index[general]{Data Type!job protocol}
+ \label{DataTypeJobProtocol}
+
+The protocol to run a the job.
+Following protocols are available:
+\begin{description}
+ \item[Native] Native Bareos job protocol.
+ \item[NDMP] Deprecated. Alias for \NdmpBareos.
+ \item[NDMP\_BAREOS] Since Bareos \sinceVersion{dir}{NDMP BAREOS}{17.2.3}. See \nameref{sec:NdmpBareos}.
+ \item[NDMP\_NATIVE] Since Bareos \sinceVersion{dir}{NDMP NATIVE}{17.2.3}. See \nameref{sec:NdmpNative}.
+\end{description}
+
+
\item [name]
\index[general]{Data Type!name}
diff --git a/manuals/en/main/director-resource-job-definitions.tex b/manuals/en/main/director-resource-job-definitions.tex
index bd5eb2f..1272675 100644
--- a/manuals/en/main/director-resource-job-definitions.tex
+++ b/manuals/en/main/director-resource-job-definitions.tex
@@ -775,12 +775,7 @@ correct order, and that your priority scheme will be respected.
}
\defDirective{Dir}{Job}{Protocol}{}{}{%
-The backup protocol to use to run the Job. If not set it will default
-to {\bf Native} currently the director understand the following protocols:
-\begin{enumerate}
-\item Native - The native Bareos protocol
-\item NDMP - The NDMP protocol
-\end{enumerate}
+The backup protocol to use to run the Job. See \dtProtocolType.
}
\defDirective{Dir}{Job}{Prune Files}{}{}{%
diff --git a/manuals/en/main/director-resource-storage-definitions.tex b/manuals/en/main/director-resource-storage-definitions.tex
index 4ede5c9..9252c5a 100644
--- a/manuals/en/main/director-resource-storage-definitions.tex
+++ b/manuals/en/main/director-resource-storage-definitions.tex
@@ -45,19 +45,23 @@ Information.
}
\defDirective{Dir}{Storage}{Device}{}{}{%
-This directive refers to a \linkResourceDirective{Sd}{Device}{Name}
-or \linkResourceDirective{Sd}{Autochanger}{Name}.
+
+If \linkResourceDirective{Dir}{Job}{Protocol} is not \parameter{NDMP_NATIVE} (default is \linkResourceDirectiveValue{Dir}{Job}{Protocol}{Native}), this directive refers to one or multiple \linkResourceDirective{Sd}{Device}{Name}
+or a single \linkResourceDirective{Sd}{Autochanger}{Name}.
If an Autochanger should be used, it had to refer to a configured \linkResourceDirective{Sd}{Autochanger}{Name}.
In this case, also set \linkResourceDirectiveValue{Dir}{Storage}{Auto Changer}{yes}.
-In all other cases, refer to a configured \linkResourceDirective{Sd}{Device}{Name}.
+Otherwise it refers to one or more configured \linkResourceDirective{Sd}{Device}{Name}, see \nameref{sec:MultipleStorageDevices}.
-This
-name is not the physical device name, but the logical device name as
+This name is not the physical device name, but the logical device name as
defined in the \bareosSd resource.
+
+If \resourceDirectiveValue{Dir}{Job}{Protocol}{NDMP_NATIVE}, it refers to tape devices on the NDMP \TapeAgent, see \nameref{sec:NdmpNative}.
}
+
+
\defDirective{Dir}{Storage}{Enabled}{}{}{%
}
diff --git a/manuals/en/main/disk.tex b/manuals/en/main/disk.tex
index 9a1f332..a350776 100644
--- a/manuals/en/main/disk.tex
+++ b/manuals/en/main/disk.tex
@@ -455,6 +455,10 @@ monthly cycle (take care about the amount of archive disk space used).
\subsection{Using Multiple Storage Devices}
+\label{sec:MultipleStorageDevices}
+\index[general]{Multiple Storage Devices}
+\index[general]{Storage Device!Multiple}
+
Bareos treats disk volumes similar to tape volumes as much as it can.
This means that you can only have a single Volume mounted at one time on a disk as defined in your \resourcetype{Sd}{Device} resource.
diff --git a/manuals/en/main/ndmp.tex b/manuals/en/main/ndmp.tex
index 4a29f33..af9d656 100644
--- a/manuals/en/main/ndmp.tex
+++ b/manuals/en/main/ndmp.tex
@@ -1,11 +1,13 @@
\index[general]{NDMP!Overview}
+\section{NDMP Basics}
+
NDMP
\begin{itemize}
\item is the abbreviation for Network Data Management Protocol.
\item is a protocol that transports data between Network Attached Storages (NAS) and backup devices.
\item is widely used by storage product vendors and OS vendors like NetApp, Isilon, EMC, Oracle.
- \item information are available at \url{http://www.ndmp.org/}.
+ \item information is available at \url{http://www.ndmp.org/}.
\item version is currently (2016) NDMP Version 4.
\item uses TCP/IP and XDR (External Data Representation) for the communication.
\end{itemize}
@@ -16,27 +18,210 @@ The Bareos NDMP implementation is based on the NDMJOB NDMP reference implementat
% Technical details can be found in README.NDMP in the bareos sourcecode.
-An NDMP system consists of basically three elements:
+In NDMP, there are different components (called \bquote{agents}) involved in doing backups.
+The most important agents are:
\begin{description}
- \item[Data Management Application] or DMA does the administration of the backup in NDMP and commands the Primary and Secondary Storage Systems to do a backup or restore operation.
- \item[Primary Storage System] or DATA AGENT is the Storage System that will be backed up, e.g. a NAS Server that is NDMP enabled.
- \item[Secondary Storage System] or TAPE AGENT is the Storage System that the backup data will be stored on.
+ \item[Data Management Agent (DMA)]
+ is the part that controls the NDMP backup or recover operation.
+ %does the administration of the backup in NDMP and commands the Primary and Secondary Storage Systems to do a backup or restore operation.
+
+ \item[Data Agent] (or Primary Storage System)
+ is the part that reads the data from the Filesystem during Backup and writes data to the Filesystem during recover.
+ %is the Storage System that will be backed up, e.g. a NAS Server that is NDMP enabled.
+
+ \item[Tape Agent] (or Secondary Storage System)
+ is the part that writes NDMP blocks to the Tape during backup and reads them during recover.
+ %is the Storage System that the backup data will be stored on.
+
+ \item[Robot Agent]
+ is the part that controls the media changer. It loads/unloads tapes and gets the inventory of the Changer. The use of a robot agent is optional. It is possible to run backups on a single tape drive.
\end{description}
-Bareos implements the \bquote{Data Management Application} inside of the \bareosDir, and a \bquote{Secondary Storage System} or TAPE AGENT in the \bareosSd.
+All elements involved talk to each other via the NDMP protocol which is usually transported via TCP/IP port 10000.
+
+
+The \DataManagementAgent is part of the Backup Application.
+
+The \DataAgent is part of the (NAS)-System being backed up and recovered.
+
+The \TapeAgent and \RobotAgent can
+\begin{itemize}
+ \item run on the system being backed up
+ \item run as part of the backup application
+ \item or even run independently on a third system
+\end{itemize}
+
+This flexibility leads to different topologies how NDMP backups can be done.
+
+\subsection{NDMP Topologies}
+
+When looking at the different topologies, the location of the \RobotAgent is not specially considered,
+as the data needed to control the robot is minimal compared to the backup data.
+
+So the parts considered are
+\begin{itemize}
+ \item the \DataManagementAgent controlling the operation
+ \item the \DataAgent as source of the backup data and
+ \item the \TapeAgent as destination of the backup data
+\end{itemize}
+
+
+
+The \DataManagementAgent always controls both \DataAgent and \TapeAgent over the Network via NDMP.
+
+The \TapeAgent can either
+\begin{itemize}
+ \item run on a separate system
+ \item run on the same system
+\end{itemize}
+as the Data Agent.
+
+
+\subsubsection{NDMP 3-way Backup: Data Agent and Tape Agent running on different systems}
+
+\begin{verbatim}
+ --+--------------- NETWORK ----+-------------------+----
+ | -->---->---->-->-->-->\ | //==>==>==>==>\\ |
+ | / | | || (2) || |
+ | | | | || || |
+/----------\ /----------\ /----------\
+| | | | | |
+| DMA | DISK====>| DATA | | Tape |====>TAPE DRIVE
+| | (1) | Agent | | Agent | (3)
+\----------/ \----------/ \----------/
+\end{verbatim}
+
+
+The data path consists of three ways
+\begin{itemize}
+ \item From Disk to Data Agent (1)
+ \item From Data Agent over the Network to the Tape Agent (2)
+ \item From Tape Agent to the Tape (3)
+\end{itemize}
+
+and is called NDMP 3-way Backup.
+
+
+\subsubsection{NDMP 2-way Backup: Data Agent and Tape Agent running on the same system}
+
+
+\begin{verbatim}
+ --+--------------- NETWORK ----+---------
+ | -->---->---->-->-->-->\ |
+ | / | |
+ | | | |
+/----------\ /----------\
+| | | Data |
+| DMA | DISK====>| Agent |
+| | (1) | |
+\----------/ | Tape | (2)
+ | Agent |====>TAPE DRIVE
+ \----------/
+\end{verbatim}
+
+
+\DataAgent and \TapeAgent are both part of the same process on the system,
+so the data path consists of two ways:
+\begin{itemize}
+ \item From Disk to Data Agent (1)
+ \item From Tape Agent to the Tape (2)
+\end{itemize}
+and is called NDMP 2-way Backup, also sometimes referred as NDMP local backup.
+
+
+\subsubsection{Properties of the different NDMP Backup topologies}
+
+
+NDMP 3-way backup:
+\begin{itemize}
+ \item The data can be send to a different location over the network
+ \item No need to attach a tape drive to the NAS system.
+ \item The backup speed is usually slower than with 2-way backup as the data is being sent over the network and processed multiple times.
+\end{itemize}
+
+
+
+NDMP 2-way backup:
+\begin{itemize}
+ \item The data is directly copied from the NAS system to the Tape
+ \item Usually the fastest way to do a NDMP backup
+ \item tape drives need to be attached to the NAS System
+\end{itemize}
+
+
+
+\section{NDMP Backup in Bareos}
-The TAPE AGENT in the \bareosSd emulates a NDMP tape drive that has an infinite tape.
-The blocks being written to the NDMP tape are stored inside of a normal Bareos backup stream
+Bareos offers two types of NDMP integration:
+
+\begin{description}
+ \item[NDMP\_NATIVE]
+ \item[NDMP\_BAREOS]
+\end{description}
+
+In both cases,
+\begin{itemize}
+ \item \bareosDir acts as \DataManagementAgent.
+ \item The \DataAgent is part of the storage system
+and must be provided by the storage vendor.
+\end{itemize}
+
+The main difference is which \TapeAgent is used.
+
+When using NDMP\_BAREOS, the \bareosSd acts as \TapeAgent.
+
+When using NDMP\_NATIVE, the \TapeAgent must be provided by some other systems.
+Some storage vendors provide it with there storages, or offer it as an option,
+e.g. Isilon with their \bquote{Isilon Backup Accelerator}.
+
+
+\begin{center}
+\begin{tabular}{l | c | c}
+\hline
+ & NDMP\_NATIVE & NDMP\_BAREOS \\
+\hline
+\DataManagementAgent & \bareosDir & \bareosDir \\
+\TapeAgent & external & \bareosSd \\
+requires external \TapeAgent & \bcheckmark & \\
+backup to tape (and VTL) & \bcheckmark & \bcheckmark \\
+backup to other \linkResourceDirective{Sd}{Device}{Device Type}
+ & & \bcheckmark \\
+2-way backup & \bcheckmark & \\
+3-way backup & untested & \bcheckmark \\
+Full Backups & \bcheckmark & \bcheckmark \\
+Differential Backups & \bcheckmark & \bcheckmark \\
+Incremental Backups & \cmlink{sec:NdmpBackupLevel} (8) & \cmlink{sec:NdmpBackupLevel} (8)\\
+Single File Restore & \bcheckmark & \bcheckmark \\
+DAR & \bcheckmark & \\
+DDAR & \bcheckmark & \\
+\ilink{Copy and Migration jobs}{MigrationChapter}
+ & & \bcheckmark \\
+\hline
+\end{tabular}
+\end{center}
+
+
+
+\section{NDMP\_BAREOS}
+\label{sec:NdmpBareos}
+
+Bareos implements the \DataManagementAgent inside of the \bareosDir
+and a \TapeAgent in the \bareosSd.
+
+The \TapeAgent in the \bareosSd emulates a NDMP tape drive that has an infinite tape.
+Because of the infinite tape, no \RobotAgent is required and therefore not implemented.
+The blocks being written to the NDMP tape are wrapped into a normal Bareos backup stream
and then stored into the volumes managed by Bareos.
-Therefore, there is always a pair of storage resource definitions:
+There is always a pair of storage resource definitions:
\begin{itemize}
\item a conventional Bareos storage resource and
\item a NDMP storage resource
\end{itemize}
-These two are linked together and the data that is stored via NDMP into the NDMP storage resource is being really written into the paired conventional Bareos storage resource.
+These two are linked together.
+Data that is received by the \TapeAgent inside of the \bareosSd is then stored as Bareos backup stream inside of the paired conventional Bareos storage resource.
On restore, the data is read by the conventional resource, and then recovered as NDMP stream from the NDMP resource.
@@ -47,20 +232,20 @@ On restore, the data is read by the conventional resource, and then recovered as
\end{figure}%
-\section{Example Setup for NDMP backup}
-\index[general]{NDMP!Example}
+\subsection{Example Setup for NDMP\_BAREOS backup}
+\index[general]{NDMP!Example!NDMP\_BAREOS}
This example starts from a clean default Bareos installation.
-\subsection{Enable NDMP on your storage appliance}
+\subsubsection{Enable NDMP on your storage appliance}
The storage appliance needs to be configured to allow NDMP connections. Therefore usually the
NDMP service needs to be enabled and configured with a username and password.
-\subsection{Bareos Director: Configure NDMP Client Resource}
+\subsubsection{Bareos Director: Configure NDMP Client Resource}
Add a Client resource to the \bareosDir configuration
-and configure it to access your NDMP storage system (Primary Storage System/DATA AGENT).
+and configure it to access your NDMP storage system (Primary Storage System/\DataAgent).
\begin{itemize}
\item \linkResourceDirective{Dir}{Client}{Protocol} must be either NDMPv2, NDMPv3 or NDMPv4.
@@ -73,12 +258,12 @@ In our example we connect to a Isilon storage appliance emulator:
\begin{bconfig}{}
Client {
Name = ndmp-client
- Address = 10.20.250.91 # IP/FQDN of the storage appliance
+ Address = isilon.example.com
Port = 10000 # Default port for NDMP
Protocol = NDMPv4 # Need to specify protocol before password as protocol determines password encoding used
Auth Type = Clear # Cleartext Authentication
Username = "ndmpadmin" # username of the NDMP user on the DATA AGENT e.g. storage box being backuped.
- Password = "test" # password of the NDMP user on the DATA AGENT e.g. storage box being backuped.
+ Password = "secret" # password of the NDMP user on the DATA AGENT e.g. storage box being backuped.
}
\end{bconfig}
@@ -87,7 +272,7 @@ Verify, that you can access your Primary Storage System via Bareos:
\begin{bconsole}{verify connection to NDMP Primary Storage System}
*<input>status client=ndmp-client</input>
-Data Agent 10.20.250.91 NDMPv4
+Data Agent isilon.example.com NDMPv4
Host info
hostname isilonsim-1
os_type Isilon OneFS
@@ -154,13 +339,12 @@ This output shows that the access to the storage appliance was successful.
-\subsection{Bareos Storage Daemon: Configure NDMP}
-
+\subsubsection{Bareos Storage Daemon: Configure NDMP}
\label{sec:ndmp-sd-configure}
-\subsubsection{Enabling NDMP}
+\subsubsubsection{Enabling NDMP}
-To enable the NDMP TAPE AGENT inside of the \bareosSd,
+To enable the NDMP \TapeAgent inside of the \bareosSd,
set \linkResourceDirective{Sd}{Storage}{NDMP Enable}=yes:
\begin{bconfig}{enable NDMP in \bareosSd}
@@ -175,7 +359,7 @@ Storage {
}
\end{bconfig}
-\subsubsection{Add a NDMP resource}
+\subsubsubsection{Add a NDMP resource}
%The NDMP service in the \bareosSd also needs access credentials.
@@ -210,7 +394,7 @@ tcp 0 0 0.0.0.0:9103 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 10661/bareos-sd
\end{commands}{}
-\subsection{Bareos Director: Configure a Paired Storage}
+\subsubsection{Bareos Director: Configure a Paired Storage}
For NDMP Backups, we always need two storages that are paired together.
The default configuration already has a Storage \resourcename{Dir}{Storage}{File} defined:
@@ -291,7 +475,8 @@ The output looks the same, as if a \bcommand{status storage=File} would have bee
% storage has so called paired storage it will use the native protocol to get the actual status via the
% paired storage definition.
-\subsection{Bareos Director: Configure NDMP Fileset}
+\subsubsection{Bareos Director: Configure NDMP Fileset}
+\label{sec:NdmpFileset}
To specify what files and directories from the storage appliance should be backed up,
a Fileset needs to be specified. In our example, we decided to backup \path|/ifs/home| directory.
@@ -349,7 +534,7 @@ The following environment variables are currently set automatically:
\item[UPDATE] = Y
\end{description}
-\subsubsection{Example NDMP Fileset to backup a subset of a NDMP filesystem}
+\subsubsubsection{Example NDMP Fileset to backup a subset of a NDMP filesystem}
The following fileset is intended to backup all files and directories matching \path|/ifs/home/users/a*|.
It has been tested against Isilon OneFS 7.2.0.1.
@@ -379,7 +564,7 @@ Fileset {
}
\end{bconfig}
-\subsection{Bareos Director: Configure NDMP Jobs}
+\subsubsection{Bareos Director: Configure NDMP Jobs}
To do NDMP backups and restores, some special settings need to be configured. We define special Backup and Restore jobs for NDMP.
@@ -387,7 +572,7 @@ To do NDMP backups and restores, some special settings need to be configured. We
Job {
Name = "ndmp-backup-job"
Type = Backup
- Protocol = NDMP
+ Protocol = NDMP_BAREOS
Level = Incremental
Client = ndmp-client
Backup Format = dump
@@ -402,7 +587,7 @@ Job {
Job {
Name = "ndmp-restore-job"
Type = Restore
- Protocol = NDMP
+ Protocol = NDMP_BAREOS
Client = ndmp-client
Backup Format = dump
FileSet = "NDMP Fileset"
@@ -426,7 +611,7 @@ Job {
\end{figure}%
-\section{Run NDMP Backup}
+\subsection{Run NDMP Backup}
Now we are ready to do our first NDMP backup:
@@ -562,50 +747,21 @@ The real backup data is stored in the file \path|/@NDMP/ifs/home%0|
One NDMP main backup file is created for every directory specified in the used Fileset.
The other files show the file history and are hardlinks to the backup file.
-\subsection{NDMP Backup Level}
-\label{sec:NdmpBackupLevel}
-\index[general]{NDMP!Level}
-The trailing number in the main backup file (after the \path|%| character)
-indicates the NDMP backup level:
-\begin{tabular}{c | l}
-\hline
-Level & Description \\
-\hline
-0 & Full NDMP backup. \\
-1 & Differential or first Incremental backup.\\
-2-9 & second to ninth Incremental backup.\\
-\hline
-\end{tabular}
-\paragraph{Differential Backups}
- are supported.
-The NDMP backup level will be 1,
-visible as trailing number in the backup file (\path|/@NDMP/ifs/home%1|).
-
-\paragraph{Incremental Backups}
- are supported.
-The NDMP backup level will increment with each run, until a Full (0) or Differential (1) will be made.
-The maximum backup level will be 9.
-Additional Incremental backups will result in a failed job and the message:
-\begin{bmessage}{}
- 2016-01-21 13:35:51 bareos-dir JobId 12: Fatal error: NDMP dump format doesn't support more than 8 incrementals, please run a Differential or a Full Backup
-\end{bmessage}
-
-
-\section{Run NDMP Restore}
+\subsection{Run NDMP Restore}
Now that we have a NDMP backup, we of course also want to restore some data from the backup.
If the backup we just did saved the Filehistory, we are able to select single files for restore.
Otherwise, we will only be able to restore the whole backup.
-\subsection{Full Restore}
+\subsubsection{Full Restore}
Either select all files or the main backup file (\path|/@NDMP/ifs/home%0|).
If file history is not included in the backup job, than only the main backup file is available.
-\subsection{Restore files to original path}
+\subsubsection{Restore files to original path}
\begin{bconsole}{}
*<input>restore jobid=1</input>
@@ -734,7 +890,7 @@ JobStatus=OK (T)
Termination: Restore OK
\end{bconsole}
-\subsection{Restore files to different path}
+\subsubsection{Restore files to different path}
\label{sec:ndmp-where}
The restore location is determined by the \linkResourceDirective{Dir}{Job}{Where} setting of the restore job.
@@ -756,7 +912,7 @@ original file name & where & restored file \\
-\section{NDMP Copy Jobs}
+\subsection{NDMP Copy Jobs}
\index[general]{Copy!NDMP}
\index[general]{NDMP!Copy jobs}
@@ -798,7 +954,7 @@ Pool {
}
\end{bconfig}
-Then we need to define the just defined pool as the \linkResourceDirective{Dir}{Pool}{Next Pool} of the pool
+Then we need to define the just defined pool as the \linkResourceDirective{Dir}{Pool}{Next Pool} of the pool
that actually holds the data to be copied.
In our case this is the \resourcename{Dir}{Pool}{Full} Pool:
@@ -914,7 +1070,7 @@ Now we successfully copied over the NDMP job.
\warning{\bcommand{list}{jobs} will only show the number of main backup files as JobFiles. However, with \bcommand{list}{files jobid=...} all files are visible.}
-\subsection{Restore to NDMP Primary Storage System}
+\subsubsection{Restore to NDMP Primary Storage System}
Unfortunately, we are not able to restore the copied data to our NDMP storage. If we try we get this message:
@@ -947,7 +1103,831 @@ For this follow the instruction from \nameref{sec:ndmp-sd-configure}.
After this, a restore from \host{bareos-sd2.example.com} directly to the NDMP Primary Storage System is possible.
-\section{NDMP Debugging}
+
+
+\subsection{Limitations}
+
+This list the specific limitiations of the NDMP\_BAREOS protocol.
+For limitation for all Bareos NDMP implementation, see \nameref{sec:NdmpCommonLimitations}.
+
+\subsubsection{NDMP Job limitations when scanning in volumes}
+\label{sec:ndmp-filehistory}
+\index[general]{NDMP!File History}
+
+For NDMP jobs, all data is stored into a single big file. The file and directory information (File History in NDMP Terms) is stored as hardlinks to this big file.
+
+\limitation*{NDMP}{File information are not available in the Bareos backup stream}{%
+As hardlink information is only stored in the Bareos database, but not int the backup stream itself, it is not possible to recover the file history information from the NDMP stream with \command{bscan}.
+
+As storing the database dump for disaster recovery and storing the bootstrap file offsite is recommended anyway (see \nameref{sec:before-disaster}), this should be not a big problem in correctly setup environments.
+
+For the same reason, the information about the number of files of a job (e.g. JobFiles with \bcommand{list}{jobs} command) is limited to the number of NDMP backup files in copied jobs.
+}
+
+\subsubsection{Restore always transfers the full main backup file to the Primary Storage System}
+
+The \NdmpBareos implementation do not support NDMP \bquote{Direct Access Restore} (DAR).
+
+On restore, the full main backup file (\path|@NDMP/...%.|)
+is always transfered back to the Primary Storage System,
+together with a description, what files to restore.
+
+The reason for this is that the Primary Storage System handles the backup data by itself.
+Bareos will not modify the backup data it receives from the Primary Storage System.
+
+
+\section{NDMP\_NATIVE}
+\label{sec:NdmpNative}
+
+The NDMP\_NATIVE protocol is implemented since Bareos \sinceVersion{dir}{NDMP NATIVE}{17.2.3}.
+
+Bareos implements the \DataManagementAgent inside of the \bareosDir
+and is the only Bareos Daemon involved in the backups.
+
+When using NDMP\_NATIVE, the \TapeAgent must be provided by some other systems.
+Some storage vendors provide it with there storages, or offer it as an option,
+e.g. Isilon with there \bquote{Isilon Backup Accelerator}.
+
+\subsection{Example Setup for NDMP\_NATIVE backup}
+\index[general]{NDMP!Example!NDMP\_NATIVE}
+
+\subsubsection{Configure a NDMP Client}
+
+This defines the connection to the NDMP Data Agent.
+
+\begin{bareosConfigResource}{bareos-dir}{Client}{isilon}
+Client {
+ Name = isilon
+ Address = isilon.example.com
+ Port = 10000
+ Protocol = NDMPv4
+ Auth Type = MD5
+ Username = "ndmpadmin"
+ Password = "secret"
+ Maximum Concurrent Jobs = 1
+}
+\end{bareosConfigResource}
+
+Verify, that you can access your Primary Storage System (\TapeAgent) via Bareos:
+
+\begin{bconsole}{status ndmp client}
+*<input>status client=isilon</input>
+
+Data Agent isilon.example.com NDMPv4
+ Host info
+ hostname isilon
+ os_type Isilon OneFS
+ os_vers v7.2.1.4
+ hostid xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
+ Server info
+ vendor Isilon
+ product Isilon NDMP
+ revision 2.2.1
+ auths (2) NDMP4_AUTH_TEXT NDMP4_AUTH_MD5
+
+ Connection types
+ addr_types (2) NDMP4_ADDR_TCP NDMP4_ADDR_LOCAL
+
+ Backup type info of tar format
+ attrs 0x7fe
+ set FILESYSTEM=/ifs
+ set FILES=
+ set EXCLUDE=
+ set PER_DIRECTORY_MATCHING=N
+ set HIST=f
+ set DIRECT=N
+ set LEVEL=0
+ set UPDATE=Y
+ set RECURSIVE=Y
+ set ENCODING=UTF-8
+ set ENFORCE_UNIQUE_NODE=N
+ set PATHNAME_SEPARATOR=/
+ set DMP_NAME=
+ set BASE_DATE=0
+ set NDMP_UNICODE_FH=N
+
+ Backup type info of dump format
+ attrs 0x7fe
+ set FILESYSTEM=/ifs
+ set FILES=
+ set EXCLUDE=
+ set PER_DIRECTORY_MATCHING=N
+ set HIST=f
+ set DIRECT=N
+ set LEVEL=0
+ set UPDATE=Y
+ set RECURSIVE=Y
+ set ENCODING=UTF-8
+ set ENFORCE_UNIQUE_NODE=N
+ set PATHNAME_SEPARATOR=/
+ set DMP_NAME=
+ set BASE_DATE=0
+ set NDMP_UNICODE_FH=N
+
+ File system /ifs
+ physdev OneFS
+ unsupported 0x0
+ type NFS
+ status
+ space 224681156345856 total, 126267678720 used, 224554888667136 avail
+ inodes 324102912000 total, 323964781836 used
+ set MNTOPTS=
+ set MNTTIME=00:00:00 00:00:00
+\end{bconsole}
+
+
+
+\subsubsection{Configure a NDMP Fileset}
+
+This determines what filesystem to backup and configures the NDMP environment to use in the meta options for it.
+
+\begin{bareosConfigResource}{bareos-dir}{Fileset}{isilon}
+Fileset {
+ Name = "isilon"
+ Include {
+ Options {
+ meta = "HIST=F"
+ meta = "DIRECT=Y"
+ meta = "RECURSIVE=Y"
+ meta = "BUTYPE=DUMP"
+ }
+ File = /ifs/home
+ }
+}
+\end{bareosConfigResource}
+
+
+The setting of \configline{"DIRECT = Y"} is required for Direct Access Recovery.
+
+For more information, see \nameref{sec:NdmpFileset}.
+
+
+
+\subsubsection{Configure a NDMP Storage}
+
+This defines now to connect to the Tape and Robot Agents and what devices to use.
+
+As we do not yet now the device names, we can put a placeholder string in
+\linkResourceDirective{Dir}{Storage}{Device} and
+\linkResourceDirective{Dir}{Storage}{NDMP Changer Device}:
+
+\begin{bareosConfigResource}{bareos-dir}{Storage}{isilon}
+Storage {
+ Name = isilon
+ Address = isilon.example.com
+ Port = 10000
+ Protocol = NDMPv4
+ Auth Type = MD5
+ Username = "ndmpadmin"
+ Password = "secret"
+ Maximum Concurrent Jobs = 1
+ Autochanger = yes
+ MediaType = NDMP-Tape
+
+ Device = unknown # use "status storage" to determine the tape device
+ NDMP Changer Device = unknown # use "status storage" to determine the changer device
+}
+\end{bareosConfigResource}
+
+Verify that the connection to the NDMP Tape Agent and Robot Agent work,
+by running the \bcommand{status}{storage} command.
+
+The \TapeAgent will return information about the available tape drives.
+The \RobotAgent will return information about the available tape changer device.
+
+
+\begin{bconsole}{status ndmp storage (Tape Agent and Robot Agent)}
+*<input>status storage=isilon</input>
+Tape Agent isilon.bareos.com NDMPv4
+ Host info
+ hostname isilon
+ os_type Isilon OneFS
+ os_vers v7.2.1.4
+ hostid abcdefg
+
+ Server info
+ vendor Isilon
+ product Isilon NDMP
+ revision 2.2.1
+ auths (2) NDMP4_AUTH_TEXT NDMP4_AUTH_MD5
+
+ Connection types
+ addr_types (2) NDMP4_ADDR_TCP NDMP4_ADDR_LOCAL
+
+ tape HP Ultrium 5-SCSI I30Z
+ device HP-TLD-004-01
+ attr 0x4
+ set EXECUTE_CDB=t
+ set SERIAL_NUMBER=123456
+
+ tape HP Ultrium 5-SCSI I30Z
+ device HP-TLD-004-02
+ attr 0x4
+ set EXECUTE_CDB=t
+ set SERIAL_NUMBER=1234567
+
+Robot Agent isilon.bareos.com NDMPv4
+ Host info
+ hostname isilon
+ os_type Isilon OneFS
+ os_vers v7.2.1.4
+ hostid 001517db7e38f40dbb4dfc0b823f29a31e09
+
+ Server info
+ vendor Isilon
+ product Isilon NDMP
+ revision 2.2.1
+ auths (2) NDMP4_AUTH_TEXT NDMP4_AUTH_MD5
+
+ scsi QUANTUM Scalar i6000 605A
+ device mc001
+ set SERIAL_NUMBER=VL002CX1252BVE01177
+\end{bconsole}
+
+The interesting parts of the output is the device information
+both of the \TapeAgent and \RobotAgent.
+
+As each NDMP backup or recovery operation always involves exactly one tape and at one robot agent.
+
+We now know the device names and can configure what robot and what tape to use when this storage is used by bareos by updating the \resourcename{Sd}{Storage}{isilon} resource:
+
+\begin{bareosConfigResource}{bareos-dir}{Storage}{isilon}
+Storage {
+ Name = isilon
+ Address = isilon.example.com
+ Port = 10000
+ Protocol = NDMPv4
+ Auth Type = MD5
+ Username = "ndmpadmin"
+ Password = "secret"
+ Maximum Concurrent Jobs = 1
+ Autochanger = yes
+ MediaType = NDMP-Tape
+
+ Device = HP-TLD-004-01
+ NDMP Changer Device = mc001
+}
+\end{bareosConfigResource}
+
+
+
+\subsubsection{Configure a Pool for the NDMP Tapes}
+
+\begin{bareosConfigResource}{bareos-dir}{Pool}{NDMP-Tape}
+Pool {
+ Name = NDMP-Tape
+ Pool Type = Backup
+ Recycle = yes # Bareos can automatically recycle Volumes
+ Auto Prune = yes # Prune expired volumes
+ Volume Retention = 365 days # How long should the Full Backups be kept?
+}
+\end{bareosConfigResource}
+
+
+
+\subsubsection{Configure NDMP Jobs}
+
+To be able to do scheduled backups, we need to configure a backup job that will use the NDMP client and NDMP storage resources:
+
+\begin{bareosConfigResource}{bareos-dir}{Job}{ndmp-native-backup-job}
+Job {
+ Name = ndmp-native-backup-job
+ type = backup
+ protocol = NDMP_NATIVE
+ level = incremental
+ client = isilon
+ storage = isilon
+ backup format = dump
+ messages = Standard
+ Pool = NDMP-Tape
+ save file history = yes
+ FileSet = isilon
+}
+\end{bareosConfigResource}
+
+
+As we also need to be able to do a restore of the backuped data, we also need to define an adequate restore job:
+
+\begin{bareosConfigResource}{bareos-dir}{Job}{ndmp-native-restore-job}
+Job{
+ Name = ndmp-restore
+ type = restore
+ protocol = NDMP_NATIVE
+ client = isilon
+ backup format = dump
+ fileset = isilon
+ storage = isilon
+ pool = NDMP-Tape
+ Messages = Standard
+ where = /
+}
+\end{bareosConfigResource}
+
+
+
+
+\subsection{Label Tapes}
+
+Before we can really start do do backups, first we need to label the tapes that should be used.
+
+First we check if our robot has tapes with barcodes by running status slots:
+
+\begin{bconsole}{status storage=isilon slots}
+*<input>status slots</input>
+ Slot | Volume Name | Status | Media Type | Pool |
+------+------------------+-----------+----------------+--------------------------|
+ 1@| ? | ? | ? | ? |
+ 2@| ? | ? | ? | ? |
+ 3@| ? | ? | ? | ? |
+ 4@| ? | ? | ? | ? |
+[...]
+ 251*| BT0001 | ? | ? | ? |
+ 252*| BT0002 | ? | ? | ? |
+ 253*| BT0003 | ? | ? | ? |
+ 254*| BT0004 | ? | ? | ? |
+ 255*| BT0005 | ? | ? | ? |
+ 256*| BT0006 | ? | ? | ? |
+ 257*| BT0007 | ? | ? | ? |
+[...]
+\end{bconsole}
+
+
+Now we can label these tapes and add them to the pool that we have created for NDMP Tapes:
+
+\begin{bconsole}{label barcodes}
+*<input>label storage=isilon barcodes slots=251-257</input>
+Automatically selected Storage: isilon
+Select Drive:
+ 1: Drive 0
+ 2: Drive 1
+Select drive (1-12): 1
+get ndmp_vol_list...
+The following Volumes will be labeled:
+Slot Volume
+==============
+ 251 BT0001
+ 252 BT0002
+ 253 BT0003
+ 254 BT0004
+ 255 BT0005
+ 256 BT0006
+ 257 BT0007
+Do you want to label these Volumes? (yes|no): yes
+Defined Pools:
+ 1: Scratch
+ 2: NDMP-Tape
+ 3: Incremental
+ 4: Full
+ 5: Differential
+Select the Pool (1-5): 2
+ndmp_send_label_request: VolumeName=BT0001 MediaType=NDMP-Tape PoolName=NDMP-Tape drive=0
+Catalog record for Volume "BT0001", Slot 251 successfully created.
+ndmp_send_label_request: VolumeName=BT0002 MediaType=NDMP-Tape PoolName=NDMP-Tape drive=0
+Catalog record for Volume "BT0002", Slot 252 successfully created.
+ndmp_send_label_request: VolumeName=BT0003 MediaType=NDMP-Tape PoolName=NDMP-Tape drive=0
+Catalog record for Volume "BT0003", Slot 253 successfully created.
+ndmp_send_label_request: VolumeName=BT0004 MediaType=NDMP-Tape PoolName=NDMP-Tape drive=0
+Catalog record for Volume "BT0004", Slot 254 successfully created.
+ndmp_send_label_request: VolumeName=BT0005 MediaType=NDMP-Tape PoolName=NDMP-Tape drive=0
+Catalog record for Volume "BT0005", Slot 255 successfully created.
+ndmp_send_label_request: VolumeName=BT0006 MediaType=NDMP-Tape PoolName=NDMP-Tape drive=0
+Catalog record for Volume "BT0006", Slot 256 successfully created.
+ndmp_send_label_request: VolumeName=BT0007 MediaType=NDMP-Tape PoolName=NDMP-Tape drive=0
+Catalog record for Volume "BT0007", Slot 257 successfully created.
+\end{bconsole}
+
+We have now 7 volumes in our NDMP-Tape Pool that were labeled and can be used for NDMP Backups.
+
+
+\subsection{Run NDMP\_NATIVE Backup}
+
+\begin{bconsole}{run backup job}
+*<input>run job=ndmp-native-backup-job yes</input>
+JobId 1: Start NDMP Backup JobId 1, Job=ndmp.2017-04-07_01.40.31_10
+JobId 1: Using Data host isilon.bareos.com
+JobId 1: Using Tape host:device isilon.bareos.com:HP-TLD-004-01
+JobId 1: Using Robot host:device isilon.bareos.com:mc001
+JobId 1: Using Tape record size 64512
+JobId 1: Found volume for append: BT0001
+JobId 1: Commanding robot to load slot @4146 into drive @256
+JobId 1: robot moving @4146 to @256
+JobId 1: robot move OK @4146 to @256
+JobId 1: Opening tape drive HP-TLD-004-01 read/write
+JobId 1: Commanding tape drive to rewind
+JobId 1: Checking tape label, expect 'BT0001'
+JobId 1: Reading label
+JobId 1: Commanding tape drive to rewind
+JobId 1: Commanding tape drive to NDMP9_MTIO_FSF 1 times
+JobId 1: Waiting for operation to start
+JobId 1: Operation started
+JobId 1: Monitoring backup
+JobId 1: DATA: bytes 3703831KB MOVER: written 3703644KB record 58788
+JobId 1: LOG_MESSAGE: 'End of medium reached.'
+JobId 1: DATA: bytes 4834614KB MOVER: written 4834053KB record 76731
+JobId 1: Mover paused, reason=NDMP9_MOVER_PAUSE_EOM
+JobId 1: Operation requires next tape
+JobId 1: At EOM, not writing filemarks
+JobId 1: Commanding tape drive to rewind
+JobId 1: Closing tape drive HP-TLD-004-01
+JobId 1: Commanding robot to unload drive @256 to slot @4146
+JobId 1: robot moving @256 to @4146
+JobId 1: robot move OK @256 to @4146
+JobId 1: Found volume for append: BT0002
+JobId 1: Commanding robot to load slot @4147 into drive @256
+JobId 1: robot moving @4147 to @256
+JobId 1: robot move OK @4147 to @256
+JobId 1: Opening tape drive HP-TLD-004-01 read/write
+JobId 1: Commanding tape drive to rewind
+JobId 1: Checking tape label, expect 'BT0002'
+JobId 1: Reading label
+JobId 1: Commanding tape drive to rewind
+JobId 1: Commanding tape drive to NDMP9_MTIO_FSF 1 times
+JobId 1: Operation resuming
+JobId 1: DATA: bytes 6047457KB MOVER: written 6047244KB record 95988
+JobId 1: LOG_MESSAGE: 'End of medium reached.'
+JobId 1: DATA: bytes 9668679KB MOVER: written 9668106KB record 153462
+JobId 1: Mover paused, reason=NDMP9_MOVER_PAUSE_EOM
+JobId 1: Operation requires next tape
+JobId 1: At EOM, not writing filemarks
+JobId 1: Commanding tape drive to rewind
+JobId 1: Closing tape drive HP-TLD-004-01
+JobId 1: Commanding robot to unload drive @256 to slot @4147
+JobId 1: robot moving @256 to @4147
+JobId 1: robot move OK @256 to @4147
+JobId 1: Found volume for append: BT0003
+JobId 1: Commanding robot to load slot @4148 into drive @256
+JobId 1: robot moving @4148 to @256
+JobId 1: robot move OK @4148 to @256
+JobId 1: Opening tape drive HP-TLD-004-01 read/write
+JobId 1: Commanding tape drive to rewind
+JobId 1: Checking tape label, expect 'BT0003'
+JobId 1: Reading label
+JobId 1: Commanding tape drive to rewind
+JobId 1: Commanding tape drive to NDMP9_MTIO_FSF 1 times
+JobId 1: Operation resuming
+JobId 1: LOG_MESSAGE: 'Filetransfer: Transferred 10833593344 bytes in 87.187 seconds throughput of 121345.079 KB/s'
+JobId 1: LOG_MESSAGE: 'Filetransfer: Transferred 10833593344 total bytes '
+JobId 1: LOG_MESSAGE: 'CPU user=0.528118 sys=54.575536 ft=87.182576 cdb=0.000000'
+JobId 1: LOG_MESSAGE: 'maxrss=171972 in=1323908 out=17 vol=199273 inv=5883'
+JobId 1: LOG_MESSAGE: '
+ Objects (scanned/included):
+ ----------------------------
+ Regular Files: (2765/2765)
+ Sparse Files: (0/0)
+ Stub Files: (0/0)
+ Directories: (447/447)
+ ADS Entries: (0/0)
+ ADS Containers: (0/0)
+ Soft Links: (0/0)
+ Hard Links: (0/0)
+ Block Device: (0/0)
+ Char Device: (0/0)
+ FIFO: (0/0)
+ Socket: (0/0)
+ Whiteout: (0/0)
+ Unknown: (0/0)'
+JobId 1: LOG_MESSAGE: '
+ Dir Depth (count)
+ ----------------------------
+ Total Dirs: 447
+ Max Depth: 10
+
+ File Size (count)
+ ----------------------------
+ == 0 14
+ <= 8k 1814
+ <= 64k 658
+ <= 1M 267
+ <= 20M 10
+ <= 100M 0
+ <= 1G 0
+ > 1G 2
+ -------------------------
+ Total Files: 2765
+ Total Bytes: 10827843824
+ Max Size: 5368709120
+ Mean Size: 3916037'
+JobId 1: LOG_MESSAGE: '
+ File History
+ ----------------------------
+ Num FH_HIST_FILE messages: 3212
+ Num FH_HIST_DIR messages: 0
+ Num FH_HIST_NODE messages: 0'
+JobId 1: Async request NDMP4_NOTIFY_MOVER_HALTED
+JobId 1: DATA: bytes 10581729KB MOVER: written 10581732KB record 167964
+JobId 1: Operation done, cleaning up
+JobId 1: Waiting for operation to halt
+JobId 1: Commanding tape drive to NDMP9_MTIO_EOF 2 times
+JobId 1: Commanding tape drive to rewind
+JobId 1: Closing tape drive HP-TLD-004-01
+JobId 1: Commanding robot to unload drive @256 to slot @4148
+JobId 1: robot moving @256 to @4148
+JobId 1: robot move OK @256 to @4148
+JobId 1: Operation halted, stopping
+JobId 1: Operation ended OKAY
+JobId 1: ERR-CONN NDMP4_CONNECT_CLOSE exchange-failed
+JobId 1: media #1 BT0001+1/4834053K@4146
+JobId 1: valid label=Y filemark=Y n_bytes=Y slot=Y
+JobId 1: media used=Y written=Y eof=N eom=Y io_error=N
+JobId 1: label read=Y written=N io_error=N mismatch=N
+JobId 1: fm_error=N nb_determined=Y nb_aligned=N
+JobId 1: slot empty=N bad=N missing=N
+JobId 1: media #2 BT0002+1/4834053K@4147
+JobId 1: valid label=Y filemark=Y n_bytes=Y slot=Y
+JobId 1: media used=Y written=Y eof=N eom=Y io_error=N
+JobId 1: label read=Y written=N io_error=N mismatch=N
+JobId 1: fm_error=N nb_determined=Y nb_aligned=N
+JobId 1: slot empty=N bad=N missing=N
+JobId 1: media #3 BT0003+1/913626K@4148
+JobId 1: valid label=Y filemark=Y n_bytes=Y slot=Y
+JobId 1: media used=Y written=Y eof=N eom=N io_error=N
+JobId 1: label read=Y written=N io_error=N mismatch=N
+JobId 1: fm_error=N nb_determined=Y nb_aligned=N
+JobId 1: slot empty=N bad=N missing=N
+JobId 1: Media: BT0001+1/4834053K@251
+JobId 1: Media: BT0002+1/4834053K@252
+JobId 1: Media: BT0003+1/913626K@253
+JobId 1: ndmp_fhdb_lmdb.c:675 Now processing lmdb database
+JobId 1: ndmp_fhdb_lmdb.c:679 Processing lmdb database done
+JobId 1: Bareos bareos-dir 17.2.3:
+ Build OS: x86_64-unknown-linux-gnu redhat Red Hat Enterprise Linux Server release 6.8 (Santiago)
+ JobId: 1
+ Job: ndmp.2017-04-07_01.40.31_10
+ Backup Level: Full
+ Client: "isilon"
+ FileSet: "isilon" 2017-04-07 01:40:31
+ Pool: "NDMP-Tape" (From Job resource)
+ Catalog: "MyCatalog" (From Client resource)
+ Storage: "isilon" (From Job resource)
+ Scheduled time: 07-Apr-2017 01:40:31
+ Start time: 07-Apr-2017 01:40:33
+ End time: 07-Apr-2017 01:42:03
+ Elapsed time: 1 min 30 secs
+ Priority: 10
+ NDMP Files Written: 3,212
+ NDMP Bytes Written: 10,835,690,496 (10.83 GB)
+ Rate: 120396.6 KB/s
+ Volume name(s): BT0001|BT0002|BT0003
+ Volume Session Id: 0
+ Volume Session Time: 0
+ Last Volume Bytes: 935,553,024 (935.5 MB)
+ Termination: Backup OK
+\end{bconsole}
+
+
+
+\subsection{Run NDMP\_NATIVE Restore}
+
+Now we want to restore some files from the backup we just did:
+
+\begin{bconsole}{run ndmp restore job}
+*<input>restore</input>
+[...]
+
+cwd is: /
+: mark /ifs/home/testdata/git/bareos/src/console/bconsole
+1 file marked.
+: mark /ifs/home/testdatrandom5G-2
+1 file marked.
+$ done
+Connecting to Director bareos:9101
+1000 OK: bareos-dir Version: 17.2.3
+Enter a period to cancel a command.
+list joblog jobid=2
+Automatically selected Catalog: MyCatalog
+Using Catalog "MyCatalog"
+JobId 2: Start Restore Job ndmp-restore.2017-04-07_01.48.23_13
+JobId 2: Namelist add: node:6033532893, info:5464882688, name:"/ifs/home/testdata/random5G-2"
+JobId 2: Namelist add: node:6033077461, info:40076288, name:"/ifs/home/testdata/git/bareos/src/console/bconsole"
+JobId 2: Record size is 64512
+JobId 2: Media: BT0001+1/4834053K@251
+JobId 2: Media: BT0002+1/4834053K@252
+JobId 2: Media: BT0003+1/913626K@253
+JobId 2: Logical slot for volume BT0001 is 251
+JobId 2: Physical(NDMP) slot for volume BT0001 is 4146
+JobId 2: Media Index of volume BT0001 is 1
+JobId 2: Logical slot for volume BT0002 is 252
+JobId 2: Physical(NDMP) slot for volume BT0002 is 4147
+JobId 2: Media Index of volume BT0002 is 2
+JobId 2: Logical slot for volume BT0003 is 253
+JobId 2: Physical(NDMP) slot for volume BT0003 is 4148
+JobId 2: Media Index of volume BT0003 is 3
+JobId 2: Commanding robot to load slot @4146 into drive @256
+JobId 2: robot moving @4146 to @256
+JobId 2: robot move OK @4146 to @256
+JobId 2: Opening tape drive HP-TLD-004-01 read-only
+JobId 2: Commanding tape drive to rewind
+JobId 2: Checking tape label, expect 'BT0001'
+JobId 2: Reading label
+JobId 2: Commanding tape drive to rewind
+JobId 2: Commanding tape drive to NDMP9_MTIO_FSF 1 times
+JobId 2: Waiting for operation to start
+JobId 2: Operation started
+JobId 2: Monitoring recover
+JobId 2: DATA: bytes 0KB MOVER: read 0KB record 0
+JobId 2: DATA: bytes 11KB MOVER: read 11KB record 622
+JobId 2: Mover paused, reason=NDMP9_MOVER_PAUSE_SEEK
+JobId 2: Operation requires a different tape
+JobId 2: Commanding tape drive to rewind
+JobId 2: Closing tape drive HP-TLD-004-01
+JobId 2: Commanding robot to unload drive @256 to slot @4146
+JobId 2: robot moving @256 to @4146
+JobId 2: robot move OK @256 to @4146
+JobId 2: Commanding robot to load slot @4147 into drive @256
+JobId 2: robot moving @4147 to @256
+JobId 2: robot move OK @4147 to @256
+JobId 2: Opening tape drive HP-TLD-004-01 read-only
+JobId 2: Commanding tape drive to rewind
+JobId 2: Checking tape label, expect 'BT0002'
+JobId 2: Reading label
+JobId 2: Commanding tape drive to rewind
+JobId 2: Commanding tape drive to NDMP9_MTIO_FSF 1 times
+JobId 2: Operation resuming
+JobId 2: DATA: bytes 79884KB MOVER: read 79884KB record 85979
+JobId 2: DATA: bytes 201740KB MOVER: read 201740KB record 87914
+JobId 2: DATA: bytes 321548KB MOVER: read 321548KB record 89815
+JobId 2: DATA: bytes 440332KB MOVER: read 440332KB record 91701
+JobId 2: DATA: bytes 556044KB MOVER: read 556044KB record 93538
+JobId 2: DATA: bytes 674828KB MOVER: read 674828KB record 95423
+JobId 2: DATA: bytes 796684KB MOVER: read 796684KB record 97357
+JobId 2: DATA: bytes 915468KB MOVER: read 915468KB record 99243
+JobId 2: DATA: bytes 1036300KB MOVER: read 1036300KB record 101161
+JobId 2: DATA: bytes 1157132KB MOVER: read 1157132KB record 103079
+JobId 2: DATA: bytes 1277964KB MOVER: read 1277964KB record 104997
+JobId 2: DATA: bytes 1398796KB MOVER: read 1398796KB record 106915
+JobId 2: DATA: bytes 1518604KB MOVER: read 1518604KB record 108816
+JobId 2: DATA: bytes 1622028KB MOVER: read 1622028KB record 110458
+JobId 2: DATA: bytes 1741836KB MOVER: read 1741836KB record 112360
+JobId 2: DATA: bytes 1859596KB MOVER: read 1859596KB record 114229
+JobId 2: DATA: bytes 1981452KB MOVER: read 1981452KB record 116163
+JobId 2: DATA: bytes 2094092KB MOVER: read 2094092KB record 117951
+JobId 2: DATA: bytes 2207756KB MOVER: read 2207756KB record 119755
+JobId 2: DATA: bytes 2328588KB MOVER: read 2328588KB record 121673
+JobId 2: DATA: bytes 2448396KB MOVER: read 2448396KB record 123575
+JobId 2: DATA: bytes 2569228KB MOVER: read 2569228KB record 125493
+JobId 2: DATA: bytes 2689036KB MOVER: read 2689036KB record 127395
+JobId 2: DATA: bytes 2810892KB MOVER: read 2810892KB record 129329
+JobId 2: DATA: bytes 2926604KB MOVER: read 2926604KB record 131165
+JobId 2: DATA: bytes 3043340KB MOVER: read 3043340KB record 133018
+JobId 2: DATA: bytes 3163148KB MOVER: read 3163148KB record 134920
+JobId 2: DATA: bytes 3279884KB MOVER: read 3279884KB record 136773
+JobId 2: DATA: bytes 3400716KB MOVER: read 3400716KB record 138691
+JobId 2: DATA: bytes 3518476KB MOVER: read 3518476KB record 140560
+JobId 2: DATA: bytes 3636236KB MOVER: read 3636236KB record 142429
+JobId 2: DATA: bytes 3757068KB MOVER: read 3757068KB record 144347
+JobId 2: DATA: bytes 3877900KB MOVER: read 3877900KB record 146265
+JobId 2: DATA: bytes 3994636KB MOVER: read 3994636KB record 148118
+JobId 2: DATA: bytes 4116492KB MOVER: read 4116492KB record 150053
+JobId 2: DATA: bytes 4237324KB MOVER: read 4237324KB record 151971
+JobId 2: DATA: bytes 4331317KB MOVER: read 4331317KB record 153462
+JobId 2: Mover paused, reason=NDMP9_MOVER_PAUSE_SEEK
+JobId 2: Operation requires a different tape
+JobId 2: Commanding tape drive to rewind
+JobId 2: Closing tape drive HP-TLD-004-01
+JobId 2: Commanding robot to unload drive @256 to slot @4147
+JobId 2: robot moving @256 to @4147
+JobId 2: robot move OK @256 to @4147
+JobId 2: Commanding robot to load slot @4148 into drive @256
+JobId 2: robot moving @4148 to @256
+JobId 2: robot move OK @4148 to @256
+JobId 2: Opening tape drive HP-TLD-004-01 read-only
+JobId 2: Commanding tape drive to rewind
+JobId 2: Checking tape label, expect 'BT0003'
+JobId 2: Reading label
+JobId 2: Commanding tape drive to rewind
+JobId 2: Commanding tape drive to NDMP9_MTIO_FSF 1 times
+JobId 2: Operation resuming
+JobId 2: DATA: bytes 4424716KB MOVER: read 4424716KB record 154945
+JobId 2: DATA: bytes 4544524KB MOVER: read 4544524KB record 156847
+JobId 2: DATA: bytes 4663308KB MOVER: read 4663308KB record 158732
+JobId 2: DATA: bytes 4781068KB MOVER: read 4781068KB record 160601
+JobId 2: DATA: bytes 4902924KB MOVER: read 4902924KB record 162536
+JobId 2: DATA: bytes 5022732KB MOVER: read 5022732KB record 164437
+JobId 2: DATA: bytes 5138444KB MOVER: read 5138444KB record 166274
+JobId 2: OK: /testdata/git/bareos/src/console/bconsole
+JobId 2: OK: /testdata/random5G-2
+JobId 2: LOG_MESSAGE: 'Filetransfer: Transferred 5368721181 bytes in 223.436 seconds throughput of 23464.803 KB/s'
+JobId 2: LOG_MESSAGE: '
+ Objects:
+ ----------------------------
+ Regular Files: (2)
+ Stub Files: (0)
+ Directories: (0)
+ ADS Entries: (0)
+ Soft Links: (0)
+ Hard Links: (0)
+ Block Device: (0)
+ Char Device: (0)
+ FIFO: (0)
+ Socket: (0)
+ Unknown: (0)'
+JobId 2: LOG_MESSAGE: '
+ File Size (count)
+ ----------------------------
+ == 0 0
+ <= 8k 1
+ <= 64k 0
+ <= 1M 0
+ <= 20M 0
+ <= 100M 0
+ <= 1G 0
+ > 1G 1
+ -------------------------
+ Total Files: 2
+ Total Bytes: 5368716925
+ Max Size: 5368709120
+ Mean Size: 2684358462'
+JobId 2: Async request NDMP4_NOTIFY_MOVER_HALTED
+JobId 2: DATA: bytes 5242893KB MOVER: read 5242893KB record 167932
+JobId 2: Operation done, cleaning up
+JobId 2: Waiting for operation to halt
+JobId 2: Commanding tape drive to rewind
+JobId 2: Closing tape drive HP-TLD-004-01
+JobId 2: Commanding robot to unload drive @256 to slot @4148
+JobId 2: robot moving @256 to @4148
+JobId 2: robot move OK @256 to @4148
+JobId 2: Operation halted, stopping
+JobId 2: Operation ended OKAY
+JobId 2: ERR-CONN NDMP4_CONNECT_CLOSE exchange-failed
+JobId 2: LOG_FILE messages: 2 OK, 0 ERROR, total 2 of 2
+JobId 2: media #1 BT0001+1/4834053K@4146
+JobId 2: valid label=Y filemark=Y n_bytes=Y slot=Y
+JobId 2: media used=Y written=N eof=N eom=N io_error=N
+JobId 2: label read=Y written=N io_error=N mismatch=N
+JobId 2: fm_error=N nb_determined=N nb_aligned=N
+JobId 2: slot empty=N bad=N missing=N
+JobId 2: media #2 BT0002+1/4834053K@4147
+JobId 2: valid label=Y filemark=Y n_bytes=Y slot=Y
+JobId 2: media used=Y written=N eof=N eom=N io_error=N
+JobId 2: label read=Y written=N io_error=N mismatch=N
+JobId 2: fm_error=N nb_determined=N nb_aligned=N
+JobId 2: slot empty=N bad=N missing=N
+JobId 2: media #3 BT0003+1/911610K@4148
+JobId 2: valid label=Y filemark=Y n_bytes=Y slot=Y
+JobId 2: media used=Y written=N eof=N eom=N io_error=N
+JobId 2: label read=Y written=N io_error=N mismatch=N
+JobId 2: fm_error=N nb_determined=Y nb_aligned=N
+JobId 2: slot empty=N bad=N missing=N
+JobId 2: Bareos bareos-dir 17.2.3:
+ Build OS: x86_64-unknown-linux-gnu redhat Red Hat Enterprise Linux Server release 6.8 (Santiago)
+ JobId: 2
+ Job: ndmp-restore.2017-04-07_01.48.23_13
+ Restore Client: isilon
+ Start time: 07-Apr-2017 01:48:25
+ End time: 07-Apr-2017 01:52:11
+ Elapsed time: 3 mins 46 secs
+ Files Expected: 2
+ Files Restored: 1
+ Bytes Restored: 5,368,722,944
+ Rate: 23755.4 KB/s
+\end{bconsole}
+\hide{$}
+
+\subsection{Limitations}
+
+\limitation*{NDMP\_NATIVE}{Only use the first tape drive will be used}{%
+A NDMP job only uses a single tape drive. Currently, a Bareos job always uses the first defined tape drive of the \TapeAgent.}
+
+
+
+\section{NDMP Common}
+
+This section contains additional information about the Bareos NDMP implementation that are valid for all Bareos NDMP protocols.
+
+\subsection{NDMP Backup Level}
+\label{sec:NdmpBackupLevel}
+\index[general]{NDMP!Level}
+
+The trailing number in the main backup file (after the \path|%| character)
+indicates the NDMP backup level:
+
+\begin{tabular}{c | l}
+\hline
+Level & Description \\
+\hline
+0 & Full NDMP backup. \\
+1 & Differential or first Incremental backup.\\
+2-9 & second to ninth Incremental backup.\\
+\hline
+\end{tabular}
+
+\paragraph{Differential Backups}
+ are supported.
+The NDMP backup level will be 1,
+visible as trailing number in the backup file (\path|/@NDMP/ifs/home%1|).
+
+\paragraph{Incremental Backups}
+ are supported.
+The NDMP backup level will increment with each run, until a Full (0) or Differential (1) will be made.
+The maximum backup level will be 9.
+Additional Incremental backups will result in a failed job and the message:
+\begin{bmessage}{}
+ 2016-01-21 13:35:51 bareos-dir JobId 12: Fatal error: NDMP dump format doesn't support more than 8 incrementals, please run a Differential or a Full Backup
+\end{bmessage}
+
+
+\subsection{NDMP Debugging}
To debug the NDMP backups, these settings can be adapted:
@@ -962,9 +1942,10 @@ To debug the NDMP backups, these settings can be adapted:
This will create a lot of debugging output that will help to find the problem during NDMP backups.
-\section{Limitations}
+\subsection{Bareos NDMP Common Limitations}
+\label{sec:NdmpCommonLimitations}
-\subsection{NDMP Fileset limitations}
+\subsubsection{NDMP Fileset limitations}
\limitation*{NDMP}{A NDMP fileset should only contain a single File directive and Meta options}{%
Using multiple \linkResourceDirective{Dir}{FileSet}{Include} \configdirective{File} directives should be avoided.
@@ -974,39 +1955,14 @@ Even if this is working fine during backup, restore jobs will cause trouble.
Normally (\linkResourceDirective{Dir}{Client}{Protocol}=Native) Filesets get handled by the \bareosFd. When connecting directly to a NDMP Clients (\linkResourceDirective{Dir}{Client}{Protocol}=NDMP*), no \bareosFd is involved and therefore most Fileset options can't be used. Instead, parameters are handled via \configdirective{Options - Meta} from \linkResourceDirective{Dir}{FileSet}{Include}.
}
-\subsection{NDMP Job limitations when scanning in volumes}
-\label{sec:ndmp-filehistory}
-\index[general]{NDMP!File History}
-
-For NDMP jobs, all data is stored into a single big file. The file and directory information (File History in NDMP Terms) is stored as hardlinks to this big file.
-
-\limitation*{NDMP}{File information are not available in the Bareos backup stream}{%
-As hardlink information is only stored in the Bareos database, but not int the backup stream itself, it is not possible to recover the file history information from the NDMP stream with \command{bscan}.
-
-As storing the database dump for disaster recovery and storing the bootstrap file offsite is recommended anyway (see \nameref{sec:before-disaster}), this should be not a big problem in correctly setup environments.
-
-For the same reason, the information about the number of files of a job (e.g. JobFiles with \bcommand{list}{jobs} command) is limited to the number of NDMP backup files in copied jobs.
-}
-
-\subsection{Single file restore on incremental backups}
+\subsubsection{Single file restore on incremental backups}
\limitation*{NDMP}{No single file restore on merged backups}{%
Unfortunately, it is currently (bareos-15.2.2) not possible to restore a chain of Full and Incremental backups at once.
The workaround for that problem is to restore the full backup and each incremental each in a single restore operation.
}
-\subsection{Restore always transfers the full main backup file to the Primary Storage System}
-
-Bareos do not support NDMP \bquote{Direct Access Restore} (DAR).
-
-On restore, the full main backup file (\path|@NDMP/...%.|)
-is always transfered back to the Primary Storage System,
-together with a description, what files to restore.
-
-The reason for this is that the Primary Storage System handles the backup data by itself.
-Bareos will not modify the backup data it receives from the Primary Storage System.
-
-\subsection{Temporary memory mapped database}
+\subsubsection{Temporary memory mapped database}
\limitation*{NDMP}{64-bit system recommended}{%
The \bareosDir uses a memory mapped database (LMBD) to temporarily store NDMP file information.
@@ -1015,17 +1971,19 @@ In this case, you either have to lower the \linkResourceDirective{Dir}{Job}{File
or preferably run the \bareosDir on a 64-bit system.
}
-\section{Tested Environments}
+\subsection{Tested Environments}
Bareos NDMP support have been tested against:
-\begin{tabular}{l | l | l | l | l | l}
+\begin{tabular}{l | l | l | l | l | l | l}
\hline
-Vendor & Product & NDMP Subsystem & Bareos version & Features & Remarks \\
+Vendor & Product & NDMP Subsystem & Bareos version & \TapeAgent & Features & Remarks \\
\hline
-Isilon & Isilon OneFS v7.2.0.1 & Isilon NDMP 2.2 & bareos-16.2.6 & & \\
-Isilon & Isilon OneFS v7.1.1.5 & Isilon NDMP 2.2 & bareos-15.2.2 & & \\
-NetApp & & Release 8.2.3 7-Mode & bareos-15.2.2 & & \\
-Oracle/Sun & ZFS Storage Appliance, OS 8.3 & & bareos-15.2.2 & & \\
+Isilon & Isilon OneFS v7.2.1.4 & Isilon NDMP 2.2.1 & bareos-17.2.3 & Isilon Backup Accelerator & & Protocol: \NdmpNative\\
+
+Isilon & Isilon OneFS v7.2.0.1 & Isilon NDMP 2.2 & bareos-16.2.6 & \bareosSd & & \\
+Isilon & Isilon OneFS v7.1.1.5 & Isilon NDMP 2.2 & bareos-15.2.2 & \bareosSd & & \\
+NetApp & & Release 8.2.3 7-Mode & bareos-15.2.2 & \bareosSd & & \\
+Oracle/Sun & ZFS Storage Appliance, OS 8.3 & & bareos-15.2.2 & \bareosSd & & \\
\hline
\end{tabular}