Configuration

The following chapter presents the information on HDFS Plugin parameters, estimation and backup parameters, and restore parameters.

Plugin Parameters

The following parameters affect any type of HDFS Plugin Job (Backup, Estimation or Restore).

  • url=<string> specifies the URL of the HDFS instance. This parameter is mandatory.

  • user=<string> specifies the User who owns the root path "/" in the HDFS instance. Bacula needs to know this user in order to create snapshots in the system. This parameter is mandatory.

Plugin Estimation and Backup Parameters

  • include=<string> specifies which files should be backed up from the HDFS System. This parameter is optional. There may be more than one include parameter.

  • regexinclude=<regex> specifies, using a Regular Expression, which files should be backed up from the HDFS System. This parameter is optional. There may be more than one regexinclude parameter.

  • exclude=<string> specifies which files should NOT be backed up from the HDFS System. This parameter is optional. There may be more than one exclude parameter.

  • regexexclude=<regex> specifies, using a Regular Expression, which files should NOT be backed up from the HDFS System. This parameter is optional. There may be more than one regexexclude parameter.

If none of the optional paramaters include, regexinclude, exclude or regexexclude are specified then all files from the Hadoop File System to which the user bacula has access will be backed up.

Plugin Restore Parameters

  • user=<string> specifies an account where restore will be performed. This parameter is optional. If not set, the user parameter from the backup Job will be used.

  • url=<string> specifies the URL of the HDFS system during a restore. This parameter is optional. If not set, the url=<string> parameter from the backup Job will be used.

  • restore_local=<yes or no> specifies that the files should be restored to a local directory based on the where= restore job parameter. This parameter is optional and defaults to no.

FileSet Examples

In the example below, all files inside the path btest1 will be backed up.

FileSet {
 Name = FS_Hdfs
 Include {
  Plugin = "hdfs: user=hadoop URL=hdfs://localhost:9000 include=btest1/*"
 }
}

In the example below, all files that do not end with tmp inside the path btest1 will be backed up.

FileSet {
 Name = FS_Hdfs_without_tmp
 Include {
  Plugin = "hdfs: user=hadoop URL=hdfs://localhost:9000 include=btest1/* exclude=*tmp"
 }
}

This example is the same as the exclude one above, but using regexexclude instead:

FileSet {
 Name = FS_Hdfs_without_tmp
 Include {
  Plugin = "hdfs: user=hadoop URL=hdfs://localhost:9000 include=btest1/* regexclude=.*\\.tmp\\Z(?ms)"
 }
}

In the example below, all files that end with .pdf inside the path path1 will be backed up.

FileSet {
 Name = FS_Hdfs_without_tmp
 Include {
  Plugin = "hdfs: user=hadoop URL=hdfs://localhost:9000 include=btest1/* regexinclude=.*\\.pdf\\Z(?ms)"
 }
}

In the example below, all files will be backed up.

FileSet {
  Name = FS_Hdfs_everything
  Include {
    Options {
      Compression = LZO
    }
    Plugin = "hdfs: user=hadoop URL=hdfs://localhost:9000"
  }
}

See also

Go back to the main HDFS Plugin page.

Go back to the main Dedicated Backup Solution page.