Skip to main content
Skip table of contents

Backup and Restore on KVM based Hypervisors

The following covers how to create and restore a snapshot on a KVM-based hypervisor.

Create and Restore Snapshots

The following sections provide instructions for creating and restoring a snapshot.

A snapshot is not a full backup. It only saves the difference (delta) of your virtual machine between two timestamps.


Attention!

Note that a snapshot will not help if the server becomes corrupted and the virtual machine is deleted.

Create a Snapshot

The following covers how to create a snapshot for a KVM-based hypervisor using virsh or the cockpit.

Using virsh:

  1. Switch to your Terminal from the sidebar menu.
  2. Enter the command:

    CODE
    virsh snapshot-create and the name of the virtual machine

    (The virtual machine will be paused during the process and started again after creating the snapshot.)

  3. Enter the command:

    CODE
    virsh snapshot-list and the name of the virtual machine
  4. The just created (and any older) snapshot(s) will be listed.

Using cockpit:

  1. Open your cockpit and choose Virtual Machines from the sidebar menu.
  2. Choose and open the virtual machine you want to take the snapshot from.
  3. You may pause the machine or wait for the UI on cockpit to do this automatically.



    As soon as the snapshot is taken the virtual machine will start again automatically.
  4. Scroll down in Virtual Machines interface to Snapshots and click the button Create snapshot.
  5. A modal dialog opens.
    Complete and continue with Create.
  6. Once the snapshot is created, it is displayed among the listed snapshots.
  7. Go back to the Virtual Machine and stop pausing.

Restore using a Snapshot

Using virsh:

  1. Switch to your Terminal from the sidebar menu.
  2. Enter the command:

    CODE
    virsh snapshot-create and the name of the virtual machine
  3. Shut down the machine.

  4. Enter the command:

    CODE
    virsh snapshot-revert, the name of the virtual machine and the snapshot
  5. After the virtual machine is restored it will power on automatically.

Using cockpit:

  1. Open your cockpit and choose Virtual Machines from the sidebar menu.
  2. Choose and open the virtual machine you want to restore.
  3. Shut down the machine.


  4. Scroll down in Virtual Machines interface to Snapshots and click the button Revert.

  5. Go back to the Virtual Machine and power it on again.

Delete a Snapshot

Using virsh:

  1. Switch to your Terminal from the sidebar menu.
  2. Enter the command:

    CODE
    virsh snapshot-delete, the name of the virtual machine and the snapshot

Using cockpit:

  1. Open your cockpit and choose Virtual Machines from the sidebar menu.
  2. Choose and open the virtual machine.
  3. Scroll down in Virtual Machines interface to Snapshots and click the button Delete.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.