1

I want to automate backups on a glusterfs 3.7.3 share with snapshots.

Creating snapshots on a LVM manualy works, but how are they secured to a different server?

I was able manage that process manually by doing the following:

sudo umount /run/gluster/snaps/d0c254908dca451d8f566be77437c538/brick1

sudo dd if=/dev/mapper/gluster-d0c254908dca451d8f566be77437c538_0 | gzip > snap01.gz

That seems to work, but how could I possibly know the snapshot name? I took this info here from df -h

The snapshots are located here: /var/lib/glusterd/snaps/

But those are not only a few KB and I would like to be able to do a full recover of the snapshot.,

I also tried to run the command mentioned in the docs:

mount -t glusterfs <hostname>:/snaps/<snap-name>/<origin-volname> /<mount_point>

This did not work. There seems not to be any folder called /snaps/ as when I press tab I get suggestion for vol1 but nothing else.

This is the info on $ gluster snapshot list:

snap4_GMT-2015.09.02-06.13.23

This is the info on $ gluster snapshot status vol1

 Snap Name : snap4_GMT-2015.09.02-06.13.23
 Snap UUID : f9b4494b-dd4e-45f6-a2d0-049ccd5434f3

    Brick Path        :   gs1:/run/gluster/snaps/d0c254908dca451d8f566be77437c538/brick1/brick1
    Volume Group      :   gluster
    Brick Running     :   No
    Brick PID         :   N/A
    Data Percentage   :   38.46
    LV Size           :   19.90g


    Brick Path        :   gs2:/run/gluster/snaps/d0c254908dca451d8f566be77437c538/brick2/brick1
    Volume Group      :   gluster
    Brick Running     :   No
    Brick PID         :   N/A
    Data Percentage   :   38.93
    LV Size           :   19.90g

Thank you in advance for any help

4
  • maybe you are better of using the buildin snapshot function of glusterfs? According to this blog post you can create snapshots with glusterfs and name them. Sep 3, 2015 at 10:40
  • This is exactly what I am doing. But I want to backup those snapshots to a second server and I want to automate the entire process with cron.
    – merlin
    Sep 3, 2015 at 10:42
  • have you checked if gluster snapshot list [volname] returns the ids? Sep 3, 2015 at 11:12
  • yes, I updated the question.
    – merlin
    Sep 3, 2015 at 11:18

1 Answer 1

2

First of all asking gluster related questions on gluster community mailing list ([email protected]) will fetch you more quicker response.

And now your question: Your mount is failing because you have not activated the snapshot. Snapshots should be activated before it can be used in any way. Use the following command to mount the snapshot.

gluster snapshot activate <snap-name>

After this check the snapshot is in started/activated state.

gluster snapshot info <snap-name>
gluster snapshot status <snap-name>

info command will give you general information about snapshot and status will give you the run-time information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .