0

I'm using glusterfs installed directly on google compute instances to store data for my kubernetes engine applications. I'm trying to figure out how to backup files from all of my volumes. Is it safe to rsync data directly from bricks?

I'm aware that writing directly on brick may result in replication problems, but that does not apply on reading, am I wrong?

Note that glusterfs snapshots are not what I want, I want to directly backup my files to another location.

Jan Imrich
  • 75
  • 9

1 Answers1

1

You can make use of rsync, but you should do it from mount point (rather than the brick).

Note, you can carry out read-only mount of gluster volume and then start rsyncing data from the mount point to wherever you want.

Another option you have is geo-replication. (actually geo-replication makes use of rsync internally)

kumar
  • 2,530
  • 6
  • 33
  • 57
  • Thanks for recommendation, I'll mark this as an answer. The problem with this solution is that I have to mount every each volume in order to make backups. I'd like to automate this proccess, which I would not have to if I rsynced directly from brick. – Jan Imrich May 09 '18 at 08:15
  • @JanImrich If you use brick, you may end up loosing few files which are not present in that brick.. hence not recommended. geo-replication carries backing up from bricks, but intelligently.. that's why it is a separate software component itself.. – kumar May 09 '18 at 09:57
  • We are using glusterfs as an HA replacement for NFS, we have 3 bricks and many volumes which all are 100% replicated. That means I should not lose any files in this case? – Jan Imrich May 09 '18 at 11:23
  • In replication, if the node(brick) from which you are going to backup is rebooted - any writes happened during the reboot may be missed. one way to verify whether any file missing is "gluster volume heal info" - it should not show any entries. – kumar May 09 '18 at 11:39