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 | + | :<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 [[kVM/libvirt|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/virsh snapshot-list|virsh snapshot-list]]</code>) |
− | |||
− | |||
== 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> | + | * 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 27: | Line 25: | ||
== Other options == | == Other options == | ||
− | : <code>--no-metadata</code> creates the snapshot, but any metadata is immediately discarded (that is, | + | : <code>--no-metadata</code> creates the snapshot, but any metadata is immediately discarded (that is, libvirt does not treat the snapshot as current, and cannot revert to the snapshot unless --redefine is later used to teach libvirt about the metadata again). |
: <code>--atomic</code> Libvirt will guarantee that the snapshot either succeeds, or fails with no changes.<ref>https://blog.devzero.be/post/kvm-live-vm-backup/</ref> | : <code>--atomic</code> Libvirt will guarantee that the snapshot either succeeds, or fails with no changes.<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>--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 | + | :: <code>error: argument unsupported: [[KVM/qemu|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>) |
− | |||
== 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: | + | * Related commands: [[virsh snapshot-info]] (Allows for example to verify if snapshot is internal or external) |
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
* {{virsh snapshot}} | * {{virsh snapshot}} | ||
− | * | + | * <code>[[virsh define]]</code> |
* {{QEMU}} | * {{QEMU}} | ||
[[Category:KVM]] | [[Category:KVM]] | ||
[[Category:Linux]] | [[Category:Linux]] |
Advertising: