Create CloudBoot Backup Server

CloudBoot backup servers are CloudBooted KVM Compute resources that can be be used as backup servers. Follow the step-by-step instructions provided in this chapter to configure CloudBoot backup servers in your cloud.

  • You should configure some local or remote attached storage for persistent backups on the provisioning/backup server. We strongly recommend you to deploy one or more backup servers for backups and VS provisioning when using a CloudBoot functionality.
  • We strongly recommend you to deploy one or more backup servers on your cloud. Incremental backups are only supported with a dedicated backup server.
  • CentOS now defaults to NFSv4. This is known to cause compatibility issues so we strongly recommend that you use NFSv3 for all mounts. This can be done by passing -t nfs -o vers=3 in any mount commands.
  • To use the backup server, you have to add it to a backup server zone and assign it either to a compute resource or a compute zone.



To create a CloudBoot backup server:

  1. Update CloudBoot and CP server RPMs:

    yum update onapp-store-install yum update onapp-cp-install
  2. Configure CloudBoot settings:

    /onapp/onapp-store-install/onapp-store-install.sh 
  3. Create new CloudBoot compute resource: at the first step of the creation wizard choose the type - Backup (CloudBoot Provisioning and Backup Resource). Refer to the Create CloudBoot Compute Resource section of this guide for details.

  4. Go to your Control Panel's Settings menu, then press Compute Resources icon.
  5. Click the Add New CloudBoot Compute Resource button. 
  6. In wizard menu click Backup (CloudBoot Provisioning and Backup Resource). 
  7. Select right MAC address of it.

  8. Fill in the form that appears:

      • Label - give the compute resource a name
      • Pxe IP address - select an IP address for this compute resource from the address pool available
      • Enabled - move the slider to the right to allow VSs to be installed/booted on this compute resource
      • Compute Zone - select the compute zone, to which this compute resource will be assigned, from the drop-down list
      • Custom Config - specify any custom commands you want to run when compute resource is booted
  9. At this step, specify the Backup Server properties:

    • Label - give your backup server a label
    • IP address - enter the IP address of a Compute resource you have created at step 1
    • Backup IP address - add a provisioning network IP address
    • Capacity - set the backup server capacity (in GB)

  10. Then, you shouldn't assign any drive, but it needs right NIC to be applied to the storage network.
  11. After that, assign your backup server to the backup server zone.

    If you intend to attach LVM-based storage and create backups, you should also add the IP address of the KVM Compute resource added in step 1 in the 'Backup IP address' field of each of your compute resources.


Further steps:

  1. Format and mount the local storage:

    1. SSH to the backup server
    2. Format the storage with your preferred filesystem type, e.g.:

      #> mkfs.ext4 /dev/sda
    3. Make folder for backups if it does not exist

      #> mkdir /backupstorage
    4. Mount the storage to /onapp/backups:

      #> mount /dev/sda /backupstorage
    5. Make folder for storing templates:

      #> mkdir /backupstorage/templates
    6. Make folder for storing backups:

      #> mkdir /backupstorage/backups
    7. Create symbolic links in /onapp:

      #> ln -s /backupstorage/backups /onapp/backups
      #> unlink /onapp/templates
      #> ln -s /backupstorage/templates /onapp/templates
    8. Add the following to custom config file:

      mkdir /backupstorage
      mount /dev/sda /backupstorage
      ln -s /backupstorage/backups /onapp/backups
      unlink /onapp/templates
      ln -s /backupstorage/templates /onapp/templates
  2. Update the database so that the location of the templates is known:

    a. Find the database password:

    cat /onapp/interface/config/database.yml |grep password

    b. Open the onapp database in MySQL:

    #> mysql -p #> use onapp; 

    c. Find the ID of the backup server:

    #> select * from backup_servers;

    d. For all of the templates, set the required backup_server_id:

    #> update templates set backup_server_id='[your_id]';
  3. To download the base templates during the installation to your Control Panel, download and run the following script:
    #> wget http://downloads.repo.onapp.com/get_template.sh
    #> /bin/sh get_template.sh

If your backups disappear after rebooting the CloudBoot backup server with LVM storage, add mount command to CloudBoot backup server custom config after the reboot. This is a known issue which will be fixed in the future release.

To fix your custom config settings, use one of the following options provided in the examples below (you will have to specify your own device names):
  1. If you have a separate partition for backups and templates (/dev/sda1 and /dev/sda2)


    mkdir /backupstorage
    mkdir /backupstorage/templates
    mkdir /backupstorage/backups
    mount /dev/sda1 /backupstorage/backups
    mount /dev/sda2 /backupstorage/templates
    ln -s /backupstorage/backups /onapp/backups
    unlink /onapp/templates
    ln -s /backupstorage/templates /onapp/templates
  2. If you current array is detected as /dev/sda1 and currently everything is located in /onapp within templates and backup directories within:

    mkdir /backupstorage
    mount /dev/sda1 /backupstorage/
    ln -s /backupstorage/backups /onapp/backups
    
    unlink /onapp/templates
    ln -s /backupstorage/templates /onapp/templates