Ceph Backup and Restore

Navigation:  Administration > Backups >

Ceph Backup and Restore

Previous pageReturn to chapter overviewNext page

How to do backup

 

Note that only Format 2 images are supported. If you have images in older format, please migrate cluster to image Format 2 yourself according to CEPH official instructions.

 

Note. Ceph user must have 'class-read object_prefix rbd_children` right.

Note. All images from specified pool will be processed. There is no options to apply any filters so far.

 

To proceed to backup process Ceph-common package must be installed on KuberDock master server and RBD kernel module must be available:

 

1. Run:

 

yum install ceph-common 

 

to install appropriate package.

 

2. Run:

 

modprobe rbd && echo OK

 

that should return “OK”. If not, contact our support team at http://helpdesk.cloudlinux.com.

 

To start backup process run the command:

 

kd-backup-ceph 

 

with appropriate options:

 

The first and only position argument is destination folder, for example /tmp. It should be some mounted folder accessible from the script.

 

--v (or--verbose) - optional, enables debug mode with a lot more output information.

 

--skip -- optional, will skip images if they fail with an error without interrupting the script. Otherwise the script will be stopped at the first error. Skip flag would pass non-critical errors for volumes with notifying about it with warnings. It is useful if you have a bunch of image in old format.

 

Typical usage for the backup command is:

 

kd-backup-ceph  /tmp -v --skip

 

For advanced backup settings use additional options:

 

--monitors

specify list of IP`s of CEPH's monitors. You can find it inside your ceph.conf (read more at official ceph documentation);

--keyring

specify path to authentication key-file for the user which have access to the pool;

--pool

specify pool name where backup script will collect data;

--id

specify user name to access to pool.

 

Example:

 

kd-backup-ceph  /tmp --monitors 192.168.101.68,192.168.101.69,192.168.101.70 --keyring /tmp/ceph.keyring --pool my_pool --id my_username -v --skip

 

After the script finishes its work there will be files like drive_name_child-2016-07-04T03:46:44.338859.zip inside destination folder.

 

How to do restore

 

To restore files unpack them inside any storage you need using the command:

 

unzip file_name.zip.