[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt-users] snapshot-current vs snapshot-revert



On Wed, May 07, 2014 at 11:42:36AM +0100, bitozoid wrote:
> If I want to go back to a snapshot, what is the difference between
> snapshot-current and snapshot-revert?

'snapshot-current' will show you the current snapshot name:

    $ virsh snapshot-current ostack-controller --name
    snap1

Or the XML dump of the current snapshot if you invoke it without any
parameters:

    $ virsh snapshot-current ostack-controller 
    <domainsnapshot>
      <name>snap1</name>
      <state>running</state>
    .
    .
    .

> What happens to disk sectors of the current state when reverting to
> another snapshot? I'm using qemu qcow2.

I'd say they'd be lost/erased (Eblake/others would correct me if I'm
wrong).  When you do a revert, you'd be at the same state when you
created the snapshot. Also, you haven't mentioned if you're using
internal snapshots, or external.  Assuming you're using QEMU internal
snapshots (original and the delta are in the same qcow2 file), the virsh
man page (section 'snapshot-revert') gives you some details including
risk scenarios.


-- 
/kashyap


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]