Home -> Backup and Recovery Strategies Blog -> NDMP Backup with Bacula Enterprise Edition. Technical Guide.
1 Star2 Stars3 Stars4 Stars5 Stars
(43 votes, average: 5.00 out of 5)

NDMP Backup with Bacula Enterprise Edition. Technical Guide.

  • February 1, 2019

backup ndmpLarge network file devices usually include significant internal redundancy that make them reliable sources to store critical data. Databases, end user files, and virtual disks all benefit from the speed, reliability, and expandability of centralized network file storage devices. However, there is some risk associated with this practice. The network storage device becomes a large single point of failure, no matter how well built, in case of a physical disaster. Even with offsite or second site replication, there is always a risk of malicious or inadvertent data loss or corruption. Snapshots can help recover from a recent mistake, but for full data protection and the ability to recover from any situation a real backup is still required.

Backing up these large data storage devices presents a real problem though, with backup windows for full backups that can run into days. This is where NDMP can help. By streamlining the backup process to send raw data rather than requiring the involvement of the filesytem and myriad files, NDMP backups can be much faster than filesystem level backups. Additionally, well implemented NDMP on the file storage device side may allow for full disaster recovery of all of the configurations on the storage device itself in case of a chassis replacement.

Bacula Enterprise Edition supports NDMP backup to allow the network storage device to write data to disk or tape at the highest speeds possible, and allows for single file recovery for day-to-day restores. The NDMP backup module from Bacula also supports the very fast SMTAPE backup option on NetApp filers, which is an excellent disaster recovery option.

The Bacula Enterprise Edition NDMP module, like most plugins, is installed with a Bacula File Daemon. This gives the File Daemon the necessary functionality to contact the NDMP-speaking network file device and request the data be sent back. Normally, this File Daemon is installed on the same server that hosts a Bacula Enterprise Storage Daemon which will write the data to disk or tape. The file daemon can be on a separate machine, but this will induce an additional network hop to send the data on to the storage daemon, so best practice has them on the same machine.

Assuming Bacula Enterprise Edition is already installed, adding the NDMP backup module is as simple as:

  1. Add the NDMP backup module repository to your yum/apt repository file.Yum example here, added to /etc/yum.repos.d/bacula.repo:
    name=Bacula Enterprise Edition NDMP plugin
  2. Yum/apt install bacula-enterprise-ndmp (see sample below for RHEL 7)
    [root@bacula yum.repos.d]# yum install bacula-enterprise-ndmp
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirrors.unifiedlayer.com
    * extras: mirrors.unifiedlayer.com
    * updates: mirrors.unifiedlayer.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package bacula-enterprise-ndmp.x86_64 0:10.2.2-19010920.el7 will be installed
    --> Finished Dependency ResolutionDependencies Resolved
    Package Arch Version Repository Size
    bacula-enterprise-ndmp x86_64 10.2.2-19010920.el7 ndmp 582 kTransaction Summary
    Install 1 PackageTotal download size: 582 k
    Installed size: 2.8 M
    Is this ok [y/d/N]: y
    Downloading packages:
    bacula-enterprise-ndmp-10.2.2-19010920.el7.x86_64.rpm | 582 kB 00:00:02
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
    Installing : bacula-enterprise-ndmp-10.2.2-19010920.el7.x86_64 1/1
    Verifying : bacula-enterprise-ndmp-10.2.2-19010920.el7.x86_64 1/1

    bacula-enterprise-ndmp.x86_64 0:10.2.2-19010920.el7


  3. Ensure that the plugin line exists in your bacula-fd.conf file. Note here the “PluginDirectory = "/opt/bacula/plugins" line
    FileDaemon {
    Name = "bacula-fd"
    MaximumConcurrentJobs = 20
    PidDirectory = "/opt/bacula/working"
    PluginDirectory = "/opt/bacula/plugins"
    WorkingDirectory = "/opt/bacula/working"
  4. Restart the bacula-fd service, enter bconsole, and check the status of the client. The plugin should appear in the output here.
    [root@bacula yum.repos.d]# service bacula-fd restart
    Redirecting to /bin/systemctl restart bacula-fd.service[root@bacula yum.repos.d]# bconsole
    Connecting to Director
    1000 OK: 10002 bacula-dir Version: 10.0.4 (22 August 2018)
    Enter a period to cancel a command.
    *status client=bacula-fd
    Connecting to Client bacula-fd at bacula:9102bacula-fd Version: 10.2.2 (09 January 2019) x86_64-redhat-linux-gnu-bacula-enterprise redhat Enterprise release
    Daemon started 05-Feb-19 19:37. Jobs: run=0 running=0.
    Heap: heap=135,168 smbytes=205,814 max_bytes=205,814 bufs=111 max_bufs=111
    Sizes: boffset_t=8 size_t=8 debug=0 trace=0 mode=0,2010 bwlimit=0kB/s
    Plugin: bpipe-fd.so ndmp-fd.so
  5. And with the plugin installed, the last step is to create a new fileset and related Bacula backup job for each NDMP device to back up. There are too many options to show in this guide, so please refer to Bacula Systems Support for assistance beyond what is shown here. A sample fileset would look like the following. A backup job configured to use this fileset would connect to the network storage device at the IP address listed, and back up the entire contents of vol1 on that device.:
    FileSet {
    Name = NDMP_home
    Include {
    Plugin="ndmp:host= user=root pass=root volume=/vol/vol1”

Hopefully this guide has given some insight into how the Bacula Enterprise NDMP backup module works, how it is installed, and why it may be a helpful addition to your overall backup and recovery strategy.

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>