Backup-schedule


 * Launchpad Entry: NovaSpec:backup-schedule
 * Created: 24 oct 2012
 * Contributors: Édouard Thuleau

= Schedule Snapshote =

Summary
In addition to creating image backup on demand, you may also want to schedule periodic image backup. These periodic image backups are triggered automatically based on backup schedule established.

Release Note
This feature plans to be finished in G version.

The administrator wants to add an image periodic backup mechanism for a server.

Rationale
The OpenStack compute API proposes 'backup server' in the extension 'admin_action'. This action permits to defines a backup type (daily or weekly) and the persistence of the backup.

The schedule backup will permit administrator to automate this backup periodically (daily or weekly).

User stories
Administrator wants to automate a periodic backup (daily or weekly) of the instance image and defines the persistence of the backup.

Design

 * Administrator creates a periodic backup for a server through the API extension 'admin_action/createBackup'
 * The compute manager creates a snapshot of the image server and upload it to Glance with 'image_type' set to 'backup'.
 * A periodic task of nova-compute or a new nova service ('nova-automate-backup' for example) lists images with property 'image_type' equal to 'backup' from Glance.
 * For each images, if the creation date plus the time defines in the property 'backup_type' is older than current date, we make another backup of the server, directly through compute API.
 * If the administrator wants to stop the automated periodic backup of a server, he just needs to delete all backup images of this server in the image library.

Related resources

 * https://code.launchpad.net/~rconradharris/nova/backup_schedule_extension/+merge/74665
 * https://review.openstack.org/#/c/840/7/nova/api/openstack/backup_schedules.py
 * http://docs.rackspacecloud.com/openstack-extensions/compute/rax-bak/content/ch02.html
 * Another blueprint: https://blueprints.launchpad.net/nova/+spec/image-backup-scheduler

Alternative
Future work, outside of the scope of the current blueprint, we can make it more general. We can add a schedule parameter for each server action on the OpenStack compute API (like it was proposed by the blueprint https://blueprints.launchpad.net/nova/+spec/server-cron). We can replace the precedent 'nova-schedule-backup' service by 'nova-schedule' which will trigger all the scheduled server actions.

Implementation
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:

UI Changes
Should cover changes required to the UI, or specific UI that is required to implement this

Code Changes
Code changes should include an overview of what needs to change, and in some cases even the specific details.

Migration
Include:
 * data migration, if any
 * redirects from old URLs to new ones, if any
 * how users will be pointed to the new way of doing things, if necessary.

Test/Demo Plan
This need not be added or completed until the specification is nearing beta.

Unresolved issues
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.