Note

You can download this article as a PDF

Nutanix HFC (Incremental Accelerator)

Overview

This user’s guide presents various techniques and strategies to backup a Nutanix NAS having a large number of files with Bacula Enterprise.

Scope

This paper will present solutions for Bacula Enterprise 14.0 and later, which are not applicable to prior versions.

Presentation

The Nutanix Incremental Accelerator plugin is designed to simplify and the optimize backup and restore performance of your Nutanix NAS hosting a large number of files.

When using the plugin for Incremental backups, Bacula Enterprise will query the Nutanix REST API for a previous backup snapshot then quickly determine a list of all files modified since the last backup instead of having to walk through the entire filesystem. Once Bacula has the backup list, it will use a standard network share (such as NFS or CIFS) to access the files.

In order to compute the file list modified since the last backup, Bacula must store a few Snapshots on the Nutanix device. The Incremental Accelerator Plugin will manage the snapshot list to minimize resource usage.

Nutanix Incremental Accelerator Feature

Nutanix Incremental Accelerator Feature

Installation

The Nutanix Incremental Accelerator plugin is available as a Bacula Enterprise package for all supported platforms. The package is comprised of:

  • /opt/bacula/plugins/nutanix-hfc-fd.so Bacula Enterprise File Daemon plugin

  • /opt/bacula/bin/nutanix_backend Bacula Enterprise Nutanix Manager

You must install this plugin on a Client machine that has network access to the Nutanix filer. Bacula Systems advises you to use the Client that resides on your Storage Daemon so that the File daemon to Storage daemon data transfers are made internally rather than across the network.

Configuration

As with all Bacula plugins, you must to specify the Plugin Directory directive in the FileDaemon resource of the bacula-fd.conf file.

FileDaemon {
  Name = test-fd
  ...
  Plugin Directory = /opt/bacula/plugins
}

Your Backup Job should be defined as:

Job {
 Name = "Nutanix-HFC"
 Client = storage-fd
 FileSet = FS_nutanix
 ...
}

FileSet {
 Name = FS_nutanix
 Include {
   Options {
     Signature = MD5
   }
   Plugin = "nutanix-hfc: host=nutanix-box password=pw exclude=vol0"
 }
}

In this example, all Nutanix volumes have to be mounted in the /nutanix-box directory (the mount_base plugin option permits to configure the base mount point).

% ls /nutanix-box
vol1   vol2   vol3   vol4

The Nutanix Incremental Accelerator plugin accepts the parameters listed in table ‘Incremental Accelerator Plugin Options’.

Incremental Accelerator Plugin Options

Option

Required | Default

Info

Example

host

Yes

NAS Hostname

host=192.168.0.1
host=nutanix-box

user

Yes

root

Username

user=root

password

Yes

Password

password=password

volume

No

Volume to

volume=vol0

include

No

*

Volumes to backup

include=vol1*

exclude

No

Volumes to exclude from backup

exclude=vol0

mount_base

No

/nutanix-box

Where to find the volume mounted using NFS / CIFS

mount_base=/nutanix-box

Note: Because the Nutanix Incremental Accelerator Plugin uses a dynamic strip FileSet option, the FileSet Include section should include ONLY the Nutanix plugin; mixing other plugins or normal files with the HFC Plugin is not supported.

External Password Storage

To avoid storing passwords in the Bacula Director configuration file, you can create a special configuration file located on the Client where the plugin is installed and store the password in it.

% cat /opt/bacula/etc/snapmgr.conf
nutanix-box:root = mypassword

The first line will define the password for the root account on the nas box named “nutanix-box”. The Bacula Nutanix HFC Plugin will use this entry with the following plugin command:

plugin = "nutanix-hfc: host=nutanix-box user=root exclude=vol0"

You can have multiple lines in the snapmgr.conf file.

NFS Configuration

The Nutanix HFC plugin will detect the list of all volumes from the Nutanix device, then the plugin will assume that each volume is mounted and available under the mount_base directory. For example, if you have the following volumes defined on your Nutanix device (Fig Nutanix Volume List).

Nutanix Volume List

Nutanix Volume List

You will need to mount each of them under your mount_base directory. For example, in /mnt:

% ls -l /mnt
drwxr-xr-x 2 root root 4096 May 23 14:52 vol0
drwxr-xr-x 2 root root 4096 May 23 14:52 vol1
drwxr-xr-x 2 root root 4096 May 23 14:52 vol2

We advise you to create a directory with your Nutanix host name and mount volumes under it. For example, instead of using /mnt as the previous example was showing, using /nutanix-box will simplify restore operation and file identification during restore. (Fig Nutanix and Volume Structure).

% ls -l /nutanix-box
drwxr-xr-x 2 root root 4096 May 23 14:52 vol0
drwxr-xr-x 2 root root 4096 May 23 14:52 vol1
...

The following article will give you information about how to find optimal settings for NFS mounts http://nfs.sourceforge.net/nfs-howto/ar01s05.html

For example, you may want to mount NFS shares with the following options:

% mount -t nfs -o soft,intr nutanix-box:/vol/vol2 /nutanix-box/vol2

Snapshot Management

The Nutanix Incremental Accelerator plugin uses Snapshots to determine which files have changed since the last backup. The plugin will keep a number of Snapshots on your Nutanix filer. Depending on your strategy, the plugin will keep 3 to 4 Snapshots per volume.

Snapshots are visible in the hidden .snapshot directory at the top level directory in each volume share.

Snapshot Pruning

The Nutanix Incremental API is based on Snapshots to generate the list of the changes. Once a snapshot is no longer required, the Nutanix Incremental Accelerator HFC plugin will prune the snapshot.

The snapshot registry that is maintained by the plugin is stored in the Bacula working directory. The registry uses the Job name as a key to compute the snapshot chain.

Estimate Information

The information returned by the bconsole estimate listing level=incremental command will give you the list of all files that have changed. However, be careful when using the estimate command with the level Full (default if level=incremental is not specified). It will result in a heavy load of your Nutanix filer if it contains many files.

Accurate Mode

By default, the Nutanix Incremental Accelerator plugin backup results will be similar to what a traditional backup traversing the whole filesystem would do. Some operations (such as deleting or moving) on a directory (see figure Directory Structure When Restoring (Without Accurate Support)) will lead to non accurate directory structure when restoring.

Directory Structure When Restoring (Without Accurate Support)

Directory Structure When Restoring (Without Accurate Support)

Directory Structure When Restoring (Without Accurate Support)

Directory Structure When Restoring (Without Accurate Support)

This issue can be solved using Bacula’s Accurate feature in your Job definition. However, be aware that the Accurate feature will consume additional memory on your File Daemon machine and CPU cycles on your catalog database system, and when dealing with million of files, you need to properly configure your File Daemon hardware. Using Bacula Accurate mode is transparent for the Nutanix system.

Bacula Enterprise allows you to turn Accurate mode on or off in the Schedule. Using this method, you are able to, for example, turn the Accurate mode on only for weekly differential jobs. This can provide a good compromise by having a completely accurate weekly backup without the additional overhead each day.

Backup Information

During a backup, some essential information is stored in the nutanix-hfc.dat file located in the Bacula working directory that is required for sequences of Jobs, so please take care not to remove the nutanix-hfc.dat files.

Restore Scenarios

During restoration, files will be presented in a simple virtual filesystem structure.

/<nutanix host name>/<volume>/<files and directories>/...

For example (Fig Nutanix and Volume Structure), the file /etc/passwd in the volume vol0 of the Nutanix device nutanix-box will be stored as:

/nutanix-box/vol0/etc/passwd
Nutanix and Volume Structure

Nutanix and Volume Structure

Limitations

  • As noted above, if you want to backup all Windows file attributes, you must mount the Nutanix volume using the CIFS protocol, and use a Bacula Windows File daemon with the Nutanix Incremental Accelerator plugin, which is not available at this time. Consequently restoring Windows files will restore only the file attributes that can be mapped into Unix file permissions.

  • The Nutanix Incremental Accelerator plugin only works with Nutanix appliances.