<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Dec 6, 2017 at 6:02 PM Jason Lelievre &lt;<a href="mailto:jlelievre@folksvfx.com" target="_blank">jlelievre@folksvfx.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font size="4">Hello,<br><br>What is the best way to set up a daily live snapshot for all VM, and have the possibility to recover, for example, a specific VM to a specific day?<br></font></div></blockquote><div><br></div></div><div dir="ltr"><div class="gmail_quote"><div><div>Each snapshot you create make reads and writes slower, as qemu has to</div><div>lookup data through the entire chain.</div><div><br></div><div>When we take a snapshot, we create a new file (or block device) and make</div><div>the new file the active layer of the chain.</div><div><br></div><div>For example, assuming you have a base image in raw format:</div><div><br></div><div>image-1.raw (top)</div><div><br></div><div>After taking a snapshot, you have:</div><div><br></div><div>image-1.raw &lt;- image-2.qcow2 (top)</div><div><br></div><div>Now when qemu need to read data from the image, it will try to get the data from</div><div>the top layer (image-2), if it does not exists it will try the backing file (image-1).</div><div>Same when writing data, if qemu need to write small amount of data, it may need</div><div>to get entire sector from a another layer in the chain and copy it to the top layer.</div><div><br></div><div>So after a month of backups, will have 30 layer in the chain. I don&#39;t know how</div><div>much slower it will be, I never measured this.</div><div><br></div></div><div>For backups, I think you like to have something like a daily backup for the last week,</div><div>a weekly backup for the last month, and so on.</div><div><br></div><div>For daily backup of the last week you can take a snapshot every day, and delete</div><div>the 7th snapshot every day. Then backup the snapshot bellow the active layer.</div><div>You can download the snapshot using the SDK, see the download_snapshot</div><div>example (requires 4.2). All this can be done while the vm is running.</div><div><br></div><div>On your backup, you will have a snapshot per day. You can keep all snapshot</div><div>or merge old snapshot using qemu-img commit.</div><div><br></div><div>It is also should be possible to reconstruct an image on storage from your backup</div><div>by uploading the the snapshots back to storage - but it is tricky to get right.</div><div><br></div><div>I think the best option for users is to get some 3rd party solution based on </div><div>the oVirt SDK.</div><div><br></div><div><div>Adding qemu-block mailing list, they can probably add more info on how much</div><div>you pay for large chain of images, and have more ideas about backing up</div><div>qcow2 chains.</div></div></div></div><div dir="ltr"><div class="gmail_quote"><div><div><br></div></div></div></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font size="4">I use a Hyperconverged Infrastructure with 3 nodes, gluster storage.<br></font></div></blockquote><div><br></div><div>Maybe a solution based on gluster or the layers below (e.g. lvm snapshots) will</div><div>be easier to use and more efficient. You can ask in the gluster mailing list.</div><div><br></div><div>Adding Sahina to help with the gluster side.</div><div><br></div><div dir="ltr"><div class="gmail_quote"><div><div>Nir</div></div></div></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br class="inbox-inbox-Apple-interchange-newline"></blockquote></div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font size="4"><br>Thank you,</font></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
</blockquote></div></div></div>