Managing the backup

Backup service

On the cloud instances as well as on all the CC-IN2P3 machines, you may configure your files backup with the backup service (TSM).

Nova API

You may use the openstack functionality to perform snapshots of your servers disk image (see image-create API command).

Warning

the snapshot freezes the instance for a non-negligible period of time (a few seconds to a few minutes): to be used with caution according to the constraints of your service availability.

Occasional backup

You can make a consistent snapshot of your VMs with the command:

% openstack server image create --name SNAPSHOT_NAME SERVER_NAME

You will then find the snapshot in the list of images in the catalog:

% glance image-show SNAPSHOT_NAME
+---------------------------+--------------------------------------+
| Property                  | Value                                |
+---------------------------+--------------------------------------+
| Property 'base_image_ref' | cedd3e88-4845-4c0c-bd16-743d3830a08f |
| Property 'image_location' | snapshot                             |
| Property 'image_state'    | available                            |
| Property 'image_type'     | snapshot                             |
| Property 'instance_uuid'  | 83886683-5a73-4777-887d-1537561647a2 |
| Property 'owner_id'       | 9d0fa8a82fe8449cad50729381a29a7a     |
| Property 'user_id'        | d0bc48fb8d8c414a9da8983c85c754f5     |
| checksum                  | c18d4e707c8db0bc1c11a55ef820ffa1     |
| container_format          | bare                                 |
| created_at                | 2016-04-01T13:13:18.000000           |
| deleted                   | False                                |
| disk_format               | qcow2                                |
| id                        | 42e33dbb-39f2-4acd-8bdd-34eecd873bde |
| is_public                 | False                                |
| min_disk                  | 20                                   |
| min_ram                   | 0                                    |
| name                      | NOM_DU_SNAPSHOT                      |
| owner                     | 9d0fa8a82fe8449cad50729381a29a7a     |
| protected                 | False                                |
| size                      | 4239917056                           |
| status                    | active                               |
| updated_at                | 2016-04-01T13:17:36.000000           |
+---------------------------+--------------------------------------+

Periodic backup

You may program a recurring snapshot with the command:

% openstack server set --property autobackup=true SERVER_NAME

A weekly backup is performed automatically. The backup may be found in glance and is called autobackup-$UUID. To restore this backup (careful, the operation is destructive for your current instance):

% openstack server rebuild --image autobackup-$UUID SERVER_NAME

Transparent backup of images and snapshots

The images in the catalog are automatically saved by the CC-IN2P3 backup service. A copy of any image placed in the catalog is kept for six months after removal. This backup is performed once a day in the evening. It is necessary to go through the user support in order to have a specific image restored.