Skip to main content

Pierre Ozoux

Backups on Rancher/Convoy/GlusterFS

2 min read

The problem

I'm currently working on https://openintegrity.org) and we use Rancher with convoy and glusterFS. So far so nice.

We now need to do backups, because, well, you know, it is always nice to have backups!

Backups have 2 purposes:

  • disaster recovery: one disk burn, and I want to recover my data, or my gluster cluster collapsed
  • go back in time: I just deleted really important data, and I want to recover them.

Convoy offers snapshot features, but no rollback so it is a bit useless to go back in time.

We could use the backup feature, but it would be quicker to restore from snapshot. Anyway, they don't offer it, so we are out of luck.

And actually, convoy-glusterFS doesn't even implement backups nor snapshot option. So we are really out of luck here.

A possible solution

Make a generic process that will run periodically. It would list all the mount points used by local containers. Then for each mount point, it would:

  • create a container
  • mount this in read-only
  • use duplicity to backup it locally (incremental, and encrypted)

And then, to keep these backups in a safe place:

  • expose this folder in read-only to ssh
  • pull backup from another server

What do you think?

A nice enhancement would be to detect if this is a mysql folder (/var/lib/mysql), if yes, perform a mysql dump before doing the incremental backup.

We still have to write a restore procedure, but once I know I have my backups in a duplicity format, I'm a lot more comfortable!