r21 - 07 Jul 2008 - 18:28:56 - EricTYou are here: Wiki >  AppLogic23 Web > CatDynBck
ALERT! AppLogic 2.3 Beta Documentation The latest production release is AppLogic 2.4.7

BCK: Backup Enabler

Latest version: 1.1.2

BCK Icon At a Glance
Catalog Dynamic
Category Backup
User volumes yes
Min. memory 192 MB
OS Linux
Constraints no
Questions/Comments Ask Forum

Functional Overview

BCK enables the containing application to backup or restore a copy of itself using Amazon Simple Storage Services (S3), Nirvanix, Layerd Technologies DynaVol, ftp, or sftp. These operations can be initiated through a simple web interface (GUI) exposed by BCK and work in conjunction with the helper application BackupHelper. BCK may also be configured to automatically perform scheduled backups. Whenever the application is backed up, it is stopped and then re-started.

The GUI is accessed using the application IP and the configured BCK port and supports the following application operations:

  • manually initiate a backup
  • manually initiate a restore
  • cancel a backup or restore in progress
  • monitor a backup or restore in progress
  • delete existing backups

Limitations:

  • The initial release of BCK uses the _impex volume to export and import applications for backup and restore. Therefore, the size of the exported application may not exceed the available space on the _impex volume.

Boundary

Resources

Resource Minimum Maximum Default
CPU 0.15 0.15 0.15
Memory 192 MB 192 MB 192 MB
Bandwidth 2 Mbps 2 Mbps 2 Mbps

Terminals

name dir prot. description
in in any Exposes a web interface (GUI) for backup and restore. All other network traffic not directed to the GUI is passed-through aux without modification.
net out any Output for accessing the grid in order to facilitate application backup and restore.
aux out any Auxiliary output. Incoming traffic that is not directed to the GUI is sent through this terminal without modification. This terminal can be left unconnected.
mon out cce Used for performance and resource usage statistics.

User Volumes

Volume Description
config Read-write volume for configuration data.

The volume is used to store a private key file which provides authentication as a normal user on the grid controller. See Preparing for Backup and Restore for information on setting up the config volume.

Properties

Properties in the table below configure BCK for use with a specific service.

name type description
backup_service string S3, DynaVol_ftp, DynaVol_sftp, ftp, or sftp. Default: S3
S3 - remote storage using the Amazon Simple Storage Service (S3).
Nirvanix - remote storage using Nirvanix.
DynaVol_ftp - remote storage using Layered Technologies DynaVol and the ftp protocol.
DynaVol_sftp - remote storage using Layered Technologies DynaVol and the sftp protocol.
ftp - remote storage using ftp.
sftp - remote storage using sftp.
backup_service_ip IP IP address of the remote storage service. Default: empty
This property is mandatory for all services except S3 and Nirvanix.
backup_user_id string User-name or signature used to access the remote storage service. Default: empty
For S3 this is the user Access Key ID.
For Nirvanix this is the account username.
For DynaVol_ftp, DynaVol_sftp, ftp and sftp this is the name of the user account.
This property is mandatory.
backup_user_auth string User password or authentication string used to access the remote storage service. Default: empty
For S3 this is the user Secret Access Key.
For Nirvanix this is the account password.
For DynaVol_ftp and ftp this is the password of the user account.
For DynaVol_sftp and sftp, BCK uses a file sftp.private.key in the root of the config volume for key based sftp authentication . sftp password based authentication is not currently supported.
This property is mandatory for S3, DynaVol_ftp and ftp.
backup_app_key string For Nirvanix this is the application key. This property is not required for other backup services. Default: empty
backup_app_name string For Nirvanix this is the application name. This property is not required for other backup services. Default: empty
backup_container_id string Identifier of the container on the remote storage service used to hold backups. Default: empty
For S3 this is the name of a bucket. BCK attemts to create this bucket if it does not already exist. Note that the S3 bucket name space is shared among all S3 users. If this bucket name exists but belongs to a different user, BCK fails and logs a message to the Applogic Dashboard. Valid characters are A-Z a-z 0-9 _-.
For Nirvanix this is the folder name under the application in which backups are stored. BCK creates this folder if it does not already exist.
For DynaVol_ftp, DynaVol_sftp, ftp and sftp this is the path from the home directory of the user user_id to the folder under which backups are stored, e.g. backups/applications. BCK attempts to create this folder if it does not already exist.
This property is mandatory.

Properties in the table below configure BCK to automatically perform scheduled backups.

name type description
schedule_period string none, daily, weekly, monthly. Default: none
none - no periodic backups. Backups can still be made manually.
daily - a backup is made automatically each day.
weekly - a backup is made automatically each week.
monthly - a backup is made automatically each month.
schedule_day integer 1-28. Default: 1
For weekly backups numbers 1-7 correspond to Monday through Sunday. Numbers greater than 7 also indicate Sunday.
For monthly backups numbers 1-28 indicate the day of the month.
schedule_time string Time of day to perform a scheduled backup in the format hour(0-23):minute(0-59). Default: 0:0
schedule_retain integer Number of backups to retain. After a new backup is created, existing backups above this number are deleted (oldest first). Default: 3
A value of 0 causes all backups to be retained.

Properties in the table below configure the BCK gui.

name type description
gui_ip IP IP address of the containing application used to access the GUI. Default: empty
This property is mandatory.
gui_port_no integer Port for accessing the web interface. The GUI is accessed through gui_ip and this port. Default: 8080.
gui_username string User-name for web-based authentication. If empty, no authentication is performed. Default: empty
gui_password string Password for web-based authentication. This property is not used if gui_username is empty. Default: empty

Properties in the table below configure BCK to operate on the grid. The two IP's, grid_ip1 and grid_ip2 are available application IP's that are reserved for use by BCK.

name type description
grid_ctl_ip IP IP address of the grid controller on which the application is running. Default: empty
This property is mandatory.
grid_ip1 IP Available IP address for use during backup and restore. Defaullt: empty
This property is mandatory.
grid_ip2 IP Available IP address for use during backup and restore. Default: empty
This property is mandatory.
grid_netmask IP Netmask for the grid on which the application is running. Default: 255.255.255.0
grid_gateway IP Address of IP gateway used to route traffic. This property must be specified in order to provide access to hosts outside of the IP network on which the application is running. Default: empty
This property is mandatory.
grid_dns1 IP Primary DNS server for the grid. Default: empty
This property is mandatory.
grid_dns2 IP Secondary DNS server for the grid. Default: empty
This property is optional.

Performance

Additional resources do not affect performance.

Error Messages

The following messages may appear in either the appliance log file or the system log of the grid controller when the appliance fails to start:

  • httpd did not start
  • /var/www/html/.rc.local script is not executable
  • /var/www/html/.rc.local script failed, ret=ret

Web Interface (GUI)

BCK exposes a web interface which can be used to manually backup or restore the containing application, or manually delete existing backups. This GUI is accessed using the application IP on the configured port gui_port_no.

backup gui

Above is an example of the GUI progress monitor during backup. This page contains two monitors:

  • The Application Monitor tracks:
    • Provisioning an instance of BackupHelper
    • Stopping BackupHelper upon completion
    • Destroying BackupHelper
  • The BackupHelper Monitor tracks:
    • Stopping the application
    • Exporting the application to the _impex volume
    • Re-starting the application
    • Copying the export files from _impex to a BackupHelper volume
    • Deleting files from _impex
    • Creating a single tar archive of the application
    • Splitting this archive into 1 GB pieces
    • Copying these pieces to the remote service
    • Pruning backups from the remote service according to the schedule_retain property

restore gui

Above is an example of the GUI progress monitor during restore. This page contains two monitors:

  • The Application Monitor tracks:
    • Provisioning an instance of BackupHelper
    • Stopping BackupHelper upon completion
    • Destroying BackupHelper
  • The BackupHelper Monitor tracks:
    • Copying backup pieces from the remote service
    • Joining these pieces to form a tar archive
    • Un-tarring the archive
    • Copying the resulting files to the _impex volume
    • Importing the application from the _impex volume
    • Deleting files from _impex

Preparing For Backup & Restore

These steps must be taken before BCK can be used to backup or restore an application. A step-by-step example is provided here.

  • Connect the BCK appliance to an existing application - see Typical Usage below.

  • BCK must be able to authenticate on the grid controller as a normal user. To ensure this, create a public/private key pair in openssh format without a passphrase. Create a user on the grid whose public key corresponds to the generated public key. Put the generated private key file, with the name grid.private.key, on the root of the config volume of the appliance with owner and group nobody and mode 600.

  • If the backup_service is sftp, create a public/private key pair in openssh format without a passphrase. Put the generated private key file, with the name sftp.private.key, on the root of the config volume of the appliance with owner and group nobody and mode 600. Include the public key in the authorized_keys file of the user backup_user_id on the remote host.

Typical Usage

LampX4

The diagram below shows how BCK can be connected to the LampX4 reference application. The INSSL gateway properties are set to forward tcp traffic on port 8080 to the aux terminal. Pointing a browser at port 8080 of the application IP or resolvable domain name brings up the web interface for BCK.

Note: the BCK applicance should not be connected directly between an IN gateway and the rest of the application, but rather to the aux terminal of an INSSL gateway.

A step-by-step example for setting up the LampX4 use case is provided here.

LampX4 example

Notes and Links

Notes

  • It is good practice to set the gui_username and gui_password properties of BCK to prevent unauthorized users from performing backup or restore.
  • The exported application must fit on the _impex volume.
  • The cancel operation is only available when both the application and the BackupHelper are running.
  • Backups are split into 1GB pieces for storing on the remote service.
  • BCK will fail to access S3 if the server time is off by more than 15 minutes.

Related Documents

Questions and Comments

IDEA! To post a question about this appliance, visit our forum.


-- StephenQ - 23 Oct 2007

 
Copyright © 2005-2008 3tera, Inc. All Rights Reserved.
%