Install Backup Server

Follow one of the following procedures to set up a backup server in your cloud:

Install Static Backup Server



To install a static backup server, run the following procedure. Skip this section if you use CloudBoot. We recommend installing CentOS from the minimal CentOS ISO for static backup servers.

  1. Add a backup server via the Control Panel user interface:
    • Go to your Control Panel > Admin > Settings menu and click the Backup Servers icon.
    • Click the Create Backup Server button.
    • Fill in the form that appears:
      • Label - give your backup server a label
      • IP address - enter the backup server IP address (IPv4)
      • Backup IP address - add a provisioning network IP address
      • Capacity - set the backup server capacity (in GB)
      • Backup server zone - select the backup server zone to which this backup server will be assigned.
    • Move the Enabled slider to the right to enable the backup server.
    • Click the Add Backup Server button.
  2. Update your server:

    # yum update
  3. Download the OnApp repository:

    # rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo-6.4.noarch.rpm
  4. Install the OnApp Backup Server installer package:

    # yum install onapp-bk-install
  5. Check and set the backup server default settings:

    # vi /onapp/onapp-bk.conf

    OnApp BK tools custom version

    BK_VERSION=""

    OnApp StorageAPI custom version

    API_VERSION=""

    Default server to synch time on the HV

    NTP_TIME_SERVER='pool.ntp.org'

    The number of retries for WGET to download the file

    WGET_TRIES=5

    OnApp templates directory

    Please refer to the corresponding settings at OnApp Control Panel web interface
    TEMPLATES_DIR='/onapp/templates'

    OnApp backups directory

    Please refer to the corresponding settings at OnApp Control Panel web interface
    BACKUPSS_DIR='/onapp/backups'
  6. Run the installer. It is recommended to download Base, Load Balancer, and CDN templates while running the installer. You may rerun the installer later with the -t option.

    # sh /onapp/onapp-bk-install/onapp-bk-install.sh 

    Usage:

    # /onapp/onapp-bk-install/onapp-bk-install.sh [-c CONFIG_FILE] [-a] [-y] [-t] [-b] [-v BK_VERSION] [-p API_VERSION] [-h]

    Where: 

    -c CONFIG_FILE 

    Custom installer configuration file. Otherwise, the pre-installed one is used.

    -a 

    Do NOT be interactive. Process with automatic installation.

    - v BK_VERSIONCustom backup tools version
    - p API_VERSIONCustom StorageAPI version
    -y 

    Update OS packages (except for the ones provided by OnApp) with 'yum update'.

    - t

    Initiate the Load Balancer Virtual Appliance, OnApp CDN Appliance, and Application Server Appliance templates download. The download is initiated if the '-a' option is used.

    - bInitiate the Base templates download
    -h 

    Print this info

  7. Сonfigure the backup server for your cloud. This step is also required for the SNMP statistics receiver configuration:

    # /onapp/onapp-bk-install/onapp-bk-config.sh -h <CP_HOST_IP> -p <BK_HOST_IP>

    Usage:

    # /onapp/onapp-bk-install/onapp-bk-config.sh [-h CP_HOST_IP] [ -p BK_HOST_IP] [-a|-i [USER:PASSWD]] [-s] -?

    Where:

    -h CP_HOST_IP

     FQDN or IP Address of the management server which should receive all status reports and is authoritative for this backup server.

    -p BK_HOST_IP

     FQDN or IP Address of Backup Server which will serve all stats related and other requests send by the CP_HOST_IP.

    Used by snmpd and StorageAPI.

    -a

     Install AoE

    -i [USER:PASSWD]

     Install iSCSI utils and configure with USER and PASSWD (if specified)

    -s

     Install sshfs

    -?

     Print this help info

  8. Install SSH keys for the backup server by running the following script on the Control Panel server:

    # ssh-copy-id -i /home/onapp/.ssh/id_rsa.pub root@BS_HOST_IP

    Perform the following step (9) if you plan to deploy VSs from OVA.

  9. Mount the locations for OVA. If you enable building VSs from OVAs in your cloud, you should mount the source location to which OVA is uploaded on CP with a destination location where OVA is stored on a backup server. The location is preconfigured in the onapp.yml config file:

    • Source Path (ova_path) - specifies the location where OVAs are downloaded/uploaded on the Control Panel server. By default the location is /data.

    • Destination Path (ova_path) - specifies the location where OVAs are stored on backup servers. By default the location is /data.

    To mount the locations:

    • Add locations (e.g. /data) to /etc/exports on the Control Panel server and then restart the nfs service:

      # /data 192.168.10.0/24(rw,no_root_squash)
    • Add locations to /etc/rc.local on the backup server and run them manually on the command line (in this example we are mounting from 192.168.10.101):

      # mkdir -p /data && mount -t nfs 192.168.10.101:/data /data



Install CloudBoot Backup Server



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

Before You Begin

  • 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 virtual servers 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 a 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. Add a backup server via the Control Panel user interface:
    • Go to your Control Panel > Admin > Settings menu and click the Backup Servers icon.
    • Click the Create Backup Server button.
    • Fill in the form that appears:
      • Label - give your backup server a label
      • IP address - enter the backup server IP address (IPv4)
      • Backup IP address - add a provisioning network IP address
      • Capacity - set the backup server capacity (in GB)
      • Backup server zone - select the backup server zone to which this backup server will be assigned.
    • Move the Enabled slider to the right to enable the backup server.
    • Click the Add Backup Server button.
  2. Update CloudBoot and CP server RPMs:

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

    # /onapp/onapp-store-install/onapp-store-install.sh 
  4. Create a new CloudBoot compute resource: at the first step of the creation wizard, select the type - Backup (CloudBoot Provisioning and Backup Resource). Refer to the Create CloudBoot Compute Resource page of this guide for details.

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

  9. 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
  10. 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)
  11. Then, you shouldn't assign any drive, but it needs right NIC to be applied to the storage network.
  12. After that, assign your backup server to the backup server zone. If you want 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:
    • SSH to the backup server
    • Format the storage with your preferred filesystem type, e.g.:

      # mkfs.ext4 /dev/sda
    • Create a directory for backups if it does not exist

      # mkdir /backupstorage
    • Mount the storage to /onapp/backups:

      # mount /dev/sda /backupstorage
    • Create a directory for storing templates:

      # mkdir /backupstorage/templates
    • Create a directory for storing backups:

      # mkdir /backupstorage/backups
    • Create symbolic links in /onapp:

      # ln -s /backupstorage/backups /onapp/backups
      # unlink /onapp/templates
      # ln -s /backupstorage/templates /onapp/templates
      # ln -s /onapp/tools/recovery   /data
    • 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
      # ln -s /onapp/tools/recovery   /data
    • Another example of the custom config files:
      • 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
      • 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
  2. Update the database so that the location of the templates is known:

    • Find the database password:

      # cat /onapp/interface/config/database.yml |grep password
    • Open the onapp database in MySQL: 

      # mysql -p # use onapp; 
    • Find the ID of the backup server:

      # select * from backup_servers;
    • 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


Install Static Backup Servers with Integrated Storage


Before you proceed

There are the following limitations for installation of static backup servers with Integrated Storage:

  • Integrated storage is supported only for CentOS 7 KVM compute resources.
  • You must be running OnApp 6.1 version and higher.
  • You must enable Storage in the system configuration first (Settings > Configuration > OnApp Storage). Visit Configuration Settings chapter for more details.

To install static backup server with Integrated Storage:


  1. Update your server:

    # yum update
  2. Download the OnApp repository:

    # rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo-6.4.noarch.rpm
  3. Install the OnApp compute resource installer package:

    # yum install onapp-bk-install 
  4. Run the OnApp compute resource installer script:

    # /onapp/onapp-bk-install/onapp-bk-install.sh -d
  5. Configure the compute resource for your cloud. This step is also required for the SNMP statistics receiver configuration:

    # /onapp/onapp-bk-install/onapp-bk-config.sh -h <CP_HOST_IP> -p <BK_HOST_IP>
  6. Update the authorized_keys file by running the following script on the Control Panel server:

    # ssh-copy-id -i /home/onapp/.ssh/id_rsa.pub root@BS_HOST_IP

    If you do not have a dedicated backup server, you must mount your template and backup repositories to compute resources. If your template and backup repositories are located on the Control Panel server, you can mount them as follows:

    Add locations to /etc/exports on the Control Panel server and then reboot:

    # /onapp/templates 192.168.10.0/24(rw,no_root_squash)
    # /onapp/backups 192.168.10.0/24(rw,no_root_squash)

    Add locations to /etc/rc.local on the compute resource and run them manually on the command line (in this example, we are mounting from 192.168.10.101):

    # mkdir -p /onapp/backups && mount -t nfs 192.168.10.101:/onapp/backups /onapp/backups
    # mkdir -p /onapp/templates && mount -t nfs 192.168.10.101:/onapp/templates /onapp/templates
  7. After you have installed integrated storage on static backup server, configure your backup server.
  8. Edit /tmp mount point entry into /etc/fstab and replace your current entry with the following:

    tmpfs /tmp tmpfs size=1024m,nosuid,nodev 0 0
  9. Reboot the backup server to complete the installation.