Help with backing up CEPH/RBD images

202 views
Skip to first unread message

Martin Hoffmann

unread,
Sep 5, 2016, 9:53:32 AM9/5/16
to bareos-devel
I like the idea of backing up rbd images on ceph cluster (e.g. KVM disk images or Xen disk images) directly via bareos-fd plugin, without the need of additional storage for first exporting them. I'm aware that i first need to create snapshots on RBD to be able to export them.

I wasn't able to find some solution out there and the ceph/rados plugins of bareos don't seem to play with rbd images.

I know that command line 'rbd export -' can be chained to bpipe which kinda works - however i feel that using bpipe or any other plugin involving pipes slows down the process unnecessary.

So i thought that writing a Bareos RBD plugin in python might be the best solution, since bareos AND librbd/librados have python interfaces and as far as i understand it should be possible to stream data directly from rbd to bareos buffers without using pipes.

However it seems that no matter what i do i'm stuck at the following error:

self.cluster = rados.Rados(conffile='/etc/ceph/ceph.conf', conf = dict (keyring = '/etc/ceph/ceph.client.admin.keyring'))
File "rados.pyx", line 525, in rados.Rados.__init__ (/tmp/buildd/ceph-10.2.2/src/build/rados.c:5878)
File "rados.pyx", line 423, in rados.requires.wrapper.validate_func (/tmp/buildd/ceph-10.2.2/src/build/rados.c:4097)
TypeError: 'NoneType' object is not callable

Basically i cloned the MySQL python plugin and imported rados and rbd. On connect to the cluster "rados.Rados()" it errors out with the above error.

A standalone python script (outside bareos) does work this way.

Any idea where to look at? I feel it must be some stupid beginner error....
Does the python environment within bareos somehow differ from standard python on command line?
Are there any other solutions/plans to support backing up rbd images?

Thanks in advance for any help.

Martin.

Evan Felix

unread,
Feb 2, 2017, 12:36:59 AM2/2/17
to bareos-devel
Martin,

Did you get this working? In some code i wrote a bit ago i had to specify a rados_id in the rados.Rados() call.

Evan

Martin Hoffmann

unread,
Feb 2, 2017, 3:01:08 AM2/2/17
to Evan Felix, bareos-devel
Yes and no :-)
My mistake which produced the 'NoneType is not callable' error was a very stupid one: After modifying any of bareos plugins it's necessary to restart the corresponding bareos daemons!!! Otherwise any such problems may arise.

Ok learned from that one.

However the whole project is on hold for now as other things are more important now ...
So YES it can be done and NO it's far from getting finished :-)

--
You received this message because you are subscribed to a topic in the Google Groups "bareos-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bareos-devel/b4D6XFoLmtQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bareos-devel...@googlegroups.com.
To post to this group, send email to bareos...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages