-
Notifications
You must be signed in to change notification settings - Fork 3
MBR tool
Krishna Srinivas edited this page Jun 21, 2018
·
4 revisions
mbr is a tool written in go which is a wrapper around mc
mbr host add src http://minio1:9000/ ACCESSKEY SECRETKEY
mbr host add tgt http://minio2:9000/ ACCESSKEY SECRETKEY
mbr snapshot tag src tgt/BUCKET/PREFIX/
mbr restore tag tgt/BUCKET/PREFIX src
mbr list tgt/BUCKET/PREFIX <tag>
mbr delete tgt/BUCKET/PREFIX <tag>
mbr delete tgt/BUCKET/PREFIX all --force
This list all the buckets and all the files recursively and stores in a tag.yaml
file:
bucket1:
- name: object1
etag: ETAG1
- name: object2
etag: ETAG2
- name: object3
etag: ETAG3
bucket2:
- name: object4
etag: ETAG4
- name: object5
etag: ETAG5
- name: object6
etag: ETAG6
bucket3:
- name: object7
etag: ETAG7
- name: object8
etag: ETAG8
- name: object9
etag: ETAG9
mbr stores tag.yml
in tgt/BUCKET/PREFIX/mbr/tags/
mbr then mirrors everything in src
into tgt/BUCKET/PREFIX/mbr/snapshots/
like this:
tgt/BUCKET/PREFIX/mbr/snapshots/bucket1/object1
tgt/BUCKET/PREFIX/mbr/snapshots/bucket1/object2
tgt/BUCKET/PREFIX/mbr/snapshots/bucket1/object3
tgt/BUCKET/PREFIX/mbr/snapshots/bucket2/object4
tgt/BUCKET/PREFIX/mbr/snapshots/bucket2/object5
tgt/BUCKET/PREFIX/mbr/snapshots/bucket2/object6
tgt/BUCKET/PREFIX/mbr/snapshots/bucket3/object7
tgt/BUCKET/PREFIX/mbr/snapshots/bucket3/object8
tgt/BUCKET/PREFIX/mbr/snapshots/bucket3/object9
This restores all the contents of tag
from tgt/BUCKET/PREFIX to src
If tag
is not specified, it lists all the tags. If tag
is specified it lists the contents of tag.yml
This deletes the particular snapshot identified by tag
- i.e it deletes all the files referenced only in this snapshot.
This deletes everything inside tgt/BUCKET/PREFIX