Editing Virsh snapshot-create-as

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 6: Line 6:
 
:<code>--disk-only</code> Do not save memory information
 
:<code>--disk-only</code> Do not save memory information
 
:<code>--atomic</code>
 
:<code>--atomic</code>
:<code>--no-metadata</code> snapshot data is created, but any metadata is discarded (so libvirt does not treat the snapshot as current, and cannot revert to the snapshot unless <code>[[virsh snapshot-create]]</code> is used to teach [[libvirt]] about discarded metadata information). Useful if you plan to [[merge snapshots]] otherwise at a later point you have to explicitly clean the libvirt metadata (by invoking: <code>[[virsh snapshot-delete]] vm1 --metadata [name|--current]</code>)<ref>https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit</ref> (See also: <code>[[virsh snapshot-list]]</code>)
+
:<code>--no-metadata</code> snapshot data is created, but any metadata is discarded (so libvirt does not treat the snapshot as current, and cannot revert to the snapshot unless <code>[[virsh snapshot-create]]</code> is used to teach [[libvirt]] about discarded metadata information). Useful if you plan to merge snapshots otherwise at a later point you have to explicitly clean the libvirt metadata (by invoking: <code>[[virsh snapshot-delete]] vm1 --metadata [name|--current]</code>)<ref>https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit</ref> (See also: <code>[[virsh snapshot-list]]</code>)
:<code>--reuse-external</code> ([[Libvirtd changelog|2012]])<ref>https://www.redhat.com/archives/libvir-list/2012-January/msg00291.html</ref>
 
 
 
  
 
== Examples ==
 
== Examples ==
Line 19: Line 17:
 
<pre> virsh snapshot-create-as --domain MY_VM --name "Snapshot_disk_only_2019_08_MY_VM" --description "Disk snapshot only to disk" --disk-only --live --atomic </pre> <ref>https://www.cyberciti.biz/faq/how-to-create-create-snapshot-in-linux-kvm-vmdomain/</ref>
 
<pre> virsh snapshot-create-as --domain MY_VM --name "Snapshot_disk_only_2019_08_MY_VM" --description "Disk snapshot only to disk" --disk-only --live --atomic </pre> <ref>https://www.cyberciti.biz/faq/how-to-create-create-snapshot-in-linux-kvm-vmdomain/</ref>
  
* Create a '''external''' snapshot <code>[[--diskspec]]</code> option, also using <code>--no-metadata</code>
+
* Create a '''external''' snapshot <code>--diskspec</code> option, also using <code>--no-metadata</code>
 
<pre>virsh snapshot-create-as --domain MY_VM --name "napshot_disk_only_2019_08_MY_VM" --description "Disk snapshot only to disk" --disk-only --no-metadata --atomic --diskspec $TARGET,snapshot=external</pre>
 
<pre>virsh snapshot-create-as --domain MY_VM --name "napshot_disk_only_2019_08_MY_VM" --description "Disk snapshot only to disk" --disk-only --no-metadata --atomic --diskspec $TARGET,snapshot=external</pre>
  
Line 31: Line 29:
 
: <code>--quiesce</code> Libvirt will try to use guest agent to freeze and unfreeze domain’s mounted file systems. However, if domain has no guest agent, snapshot creation will fail. <ref>https://blog.devzero.be/post/kvm-live-vm-backup/</ref>
 
: <code>--quiesce</code> Libvirt will try to use guest agent to freeze and unfreeze domain’s mounted file systems. However, if domain has no guest agent, snapshot creation will fail. <ref>https://blog.devzero.be/post/kvm-live-vm-backup/</ref>
 
:: <code>error: argument unsupported: [[QEMU guest agent]] is not configured</code><ref>https://www.redhat.com/archives/libvirt-users/2015-December/msg00009.html</ref> (See: <code>[[virsh edit]]</code>)
 
:: <code>error: argument unsupported: [[QEMU guest agent]] is not configured</code><ref>https://www.redhat.com/archives/libvirt-users/2015-December/msg00009.html</ref> (See: <code>[[virsh edit]]</code>)
:<code>virsh snapshot-create --validate</code> added in [[Libvirt changelog|Libvirt v5.6.0]] August 2019
 
  
 
== Activities ==
 
== Activities ==
Line 37: Line 34:
 
# [[Virsh create live backups]] using <code>[[virsh snapshot-create-as]]</code> and <code>[[virsh blockcommit]]</code>
 
# [[Virsh create live backups]] using <code>[[virsh snapshot-create-as]]</code> and <code>[[virsh blockcommit]]</code>
  
* Related commands: <code>[[virsh snapshot-info]]</code> (Allows for example to verify if snapshot is internal or external)
+
* Related commands: [[virsh snapshot-info]] (Allows for example to verify if snapshot is internal or external)
 +
 
  
 
== Related commands ==
 
== Related commands ==
 
* <code>[[virsh blockcommit]]</code>
 
* <code>[[virsh blockcommit]]</code>
* <code>[[virsh domblklist]]</code>
 
* [[Error: unsupported configuration: external snapshot file for disk vda already exists and is not a block device]]
 
  
 
== See also ==
 
== See also ==
 
* {{virsh snapshot}}
 
* {{virsh snapshot}}
* {{libvirtd}}
 
 
* {{QEMU}}
 
* {{QEMU}}
  
 
[[Category:KVM]]
 
[[Category:KVM]]
 
[[Category:Linux]]
 
[[Category:Linux]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: