m2bk icon indicating copy to clipboard operation
m2bk copied to clipboard

Driver for snapshots

Open shaiguitar opened this issue 8 years ago • 6 comments

Just an initial scan of the project looks great! Are there any plans to have a "snapshot" driver to schedule it via the instance? Happy to help contribute if there are any docs/ideas how to implement that.

/cc @kmkswamy

shaiguitar avatar Jul 15 '16 20:07 shaiguitar

Also cc'ing @srinivaspradhan64 .

shaiguitar avatar Jul 15 '16 21:07 shaiguitar

Hi @shaiguitar,

It is nice to know your appreciation towards m2bk. Though I haven't worked on the project for quite some time (which has delayed its 0.5 release), your proposal has gotten my attention. Just to make sure we're on the same page, the following is what I have interpreted:

  • You're asking for a new AWS-based driver for m2bk. We could call it aws-elb-snapshot.
  • This driver has the sole responsibility of taking a snapshot of the instance m2bk is running on.
  • Should the aforementioned be the case, an explicit output directory should be set for this driver before attempting anything.
  • Should the tarballing of the final artifact be any necessary in this case?, I still wonder about this.
  • As an explicit option, this driver should allow the user to set the volume from which a snapshot is going to be taken, since an instance's volume layout can vary for many reasons which are not worthy to take deeper into this discussion, the botton line is that I would find very necessary to set the volume to take a snapshot from.

These are in general the ideas that got in the back of my head based on your proposal, which is indeed interesting and quite useful. I would like to corroborate with you whether or not we're indeed on the same page. Your ideas are more than welcome on this matter, actually, I would love a hand on this.

One thing I should definitely get going is to finally make that 0.5 release once and for all, so everyone can get benefit from the ftp driver.

Cheers! :wine_glass:

axltxl avatar Jul 19 '16 18:07 axltxl

Is a output_dir actually required for snapshotting? The gist of a snapshot driver would be to configure some volume or ideally derive it from metadata if possible (call describe block devices? haven't tried this) and simply kick off a snapshot in aws from within the instance.

shaiguitar avatar Jul 20 '16 20:07 shaiguitar

@shaiguitar An output_dir is not strictly necessary, but a nice thing to have, especially since m2bk does store its temporary files on /tmp, sure they could remain there but it would be nicer if m2bk let the user decide a nice output directory he/she could look up into in the case of backup retrieval without much hassle. These are just ideas for the moment.

The question that intrigues me the most is: what if this output_dir is not located on the usual root block device but on another, how could m2bk guarantee a snapshot is being done on the right block device?, an answer could be just to let the user decide that, another would be to just snapshot all block devices associated with the target EC2 instance.

Cheers. :wine_glass:

axltxl avatar Jul 21 '16 09:07 axltxl

Offhand I would think if a volume id is passed, that gets snapshotted and if none are passed, it snapshots everything available

shaiguitar avatar Jul 21 '16 20:07 shaiguitar

Got it!. I will implement this for 0.5 release. :+1: PRs are welcome as well.

axltxl avatar Jul 27 '16 07:07 axltxl