OpenNebula uses backup datastores as storage targets for virtual machine backup images. The datastore object tells the front-end and hypervisor hosts which backup driver to use and where backup data should be transferred, so the OpenNebula definition must match the server that holds the backup storage path.

Registering the datastore from a template file keeps the backup driver and target server explicit. The rsync driver is available for Community Edition environments, stores backup data through SSH access to a backup server, and requires a template with TYPE="BACKUP_DS", DS_MAD="rsync", TM_MAD="-", RSYNC_USER, and RSYNC_HOST.

Begin after the backup server has storage mounted under /var/lib/one/datastores, passwordless SSH works from the front-end and every hypervisor host, and the backup server has rsync plus qemu-img installed. Creating the datastore proves the OpenNebula object exists; scheduling a small backup against it proves OpenNebula can target the storage path.

Steps to create an OpenNebula backup datastore:

  1. Confirm passwordless SSH from the OpenNebula front-end to the backup server.
    $ ssh oneadmin@backup01.example.net hostname
    backup01.example.net

    Run this check as the same Unix account that OpenNebula will use for backup transfers, usually oneadmin.

  2. Check the backup storage directory on the backup server.
    $ ssh oneadmin@backup01.example.net "ls -ld /var/lib/one/datastores"
    drwxrwxr-x 2 oneadmin oneadmin 4096 Jun 25 09:10 /var/lib/one/datastores

    The rsync backup datastore stores VM backup data below this path by datastore ID unless a more specific datastore mount point is prepared.

  3. Check the rsync command on the backup server.
    $ ssh oneadmin@backup01.example.net "rsync --version"
    rsync  version 3.2.7  protocol version 32
    ##### snipped #####
  4. Check the qemu-img command on the backup server.
    $ ssh oneadmin@backup01.example.net "qemu-img --version"
    qemu-img version 8.2.2
  5. Create the datastore template file on the OpenNebula front-end.
    $ vi ds_rsync_backup.txt
  6. Add the rsync backup datastore attributes.
    NAME = "rsync Backups"
    TYPE = "BACKUP_DS"
    
    DS_MAD = "rsync"
    TM_MAD = "-"
    
    RSYNC_USER = "oneadmin"
    RSYNC_HOST = "backup01.example.net"

    Use a DNS name or IP address that every OpenNebula host can reach. Add BRIDGE_LIST only for shared system datastore layouts where OpenNebula's documented bridge host mode applies, such as Ceph, and ensure each listed host can SSH to both the front-end and backup server.

  7. Create the backup datastore from the template.
    $ onedatastore create ds_rsync_backup.txt
    ID: 100
  8. List datastores and confirm the new row is a backup datastore.
    $ onedatastore list
    ID  NAME             SIZE AVA CLUSTERS IMAGES TYPE DS      TM      STAT
    100 rsync Backups    1.5T 91% 0             0 bck  rsync   -       on
      2 files           19.8G 84% 0             0 fil  fs      local   on
      1 default         19.8G 84% 0             1 img  fs      local   on
      0 system              - -   0             0 sys  -       local   on

    The list output should show TYPE as bck, DS as rsync, TM as -, and STAT as on.

  9. Inspect the saved datastore template.
    $ onedatastore show 100
    DATASTORE 100 INFORMATION
    ID             : 100
    NAME           : rsync Backups
    TYPE           : BACKUP
    DS_MAD         : rsync
    TM_MAD         : -
    STATE          : READY
    
    DATASTORE TEMPLATE
    RSYNC_HOST="backup01.example.net"
    RSYNC_USER="oneadmin"
  10. Schedule a small test backup against the new datastore.
    $ onevm backup --schedule now -d 100 0
    VM 0: backup scheduled at 2026-06-25 09:20:00 +0000

    Use a non-production VM for the first backup. If the operation fails before data transfer starts, recheck passwordless SSH from every hypervisor host to backup01.example.net.