Fileset Examples

Enterprise

Bacula Enterprise Only

This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.

A Fileset to back up RHV VMs will usually contain one plugin=rhv:… line, and may contain File=… directives.

It is recommended to have only a single RHV plugin line per Fileset, which will ensure that no unpredictable behaviour in case of errors such as failure to proceed with one plugin call, but success with all others.

Bacula Systems strongly advises against the use of other plugins in Filesets which use the RHV Plugin.

The minimal Fileset. This Fileset will backup all vms in RHV environment:

Fileset {
  Name = minimalFileset
  Include {
    Plugin = "rhv: server=rhv.example.com insecure=true password=rhvpass123"
  }
}

The minimal Fileset using proxy backup method, using the PROXY_BACKUP_VM. This Fileset will backup all VMs in the RHV environment (includes proxy backup VM):

Fileset {
  Name = minimalFilesetProxy
  Include {
    Plugin = "rhv: server=rhv.example.com insecure=true password=rhvpass123 proxy_vm=PROXY_BACKUP_VM"
  }
}

The minimal backup Job. This Job uses the minimal Fileset above, so it will backup all VMs in the RHV environment:

Job {
  Name = minimalJob
  Type = Backup
  Level = Full
  Write Bootstrap = "/var/bacula/working/minimalJob.bsr"
  Accurate = no
  Client = Client1
  Maximum Concurrent Jobs = 1
  Allow Duplicate Jobs = no
  Fileset = minimalFilesetProxy
  Storage = Storage1
  Pool = Pool1
  Messages = Standard
  Enabled = yes
}

Backing up only “vmExample” can be achieved like this:

Fileset {
  Name = ExampleFileset0
  Include {
    Options {
      Signature = MD5
    }
    Plugin = "rhv: server=rhv.example.com insecure=true password=rhvpass123 target_virtualmachine=vmExample"
  }
}

A backup of the VM named “vm1” and all vms that the datacenter “dc1” contains, excluding the disks with ids 65ccb526-30c0-4beb-b348-4395e70d6e32 and 3b874e8c-ddbb-4e1e-a4fc-3cdf0b76ec1c, would be configured like this:

Fileset {
  Name = ExampleFileset1
  Include {
    Options {
      Signature = MD5
    }
    Plugin = "rhv:server=rhv.example.com
      truststore_file=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security/cacerts/rhvm.truststore
      auth=http user=admin password=rhvpass123 target_virtualmachine=vm1 target_datacenter=dc1
      target_exclude_disks=65ccb526-30c0-4beb-b348-4395e70d6e32,3b874e8c-ddbb-4e1e-a4fc-3cdf0b76ec1c"
  }
}

The backup of all VMs with names starting with “vm”, excluding “vm1”:

Fileset {
  Name = ExampleFileset2
  Include {
    Options {
      Signature = MD5
    }
    Plugin = "rhv:server=rhv.example.com truststore_password=changeit auth=http profile=internal
    truststore_file=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security/cacerts/rhvm.truststore
    user=admin password=rhvpass123 target_virtualmachine=vm* target_exclude_vms=vm1"
  }
}

The backup of all templates with names starting with “template”:

Fileset {
  Name = ExampleFileset3
  Include {
    Options {
      Signature = MD5
    }
    Plugin = "rhv:server=rhv.example.com truststore_password=changeit auth=http profile=internal
    truststore_file=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security/cacerts/rhvm.truststore
    user=admin password=rhvpass123 target_template=template*"
  }
}

Backing up only “vm1” with backup proxy method, using the vm PROXY_BACKUP_VM:

Fileset {
  Name = ExampleProxyFileset
  Include {
    Options {
      Signature = MD5
    }
    Plugin = "rhv: server=rhv.example.com insecure=true password=rhvpass123 target_virtualmachine=vm1 proxy_vm=PROXY_BACKUP_VM"
  }
}

Go back to: Plugin Configuration.