Linux

How to Restore a VPS (Virtual Machine) on Proxmox via CLI

This guide explains how to restore a virtual machine (VPS) on Proxmox VE using the command line interface (CLI). You can restore from a local backup file or from a Proxmox Backup Server (PBS).

1. Restore from a Local Backup File

If your backup file is stored locally (for example:
/mnt/pve/backup/dump/vzdump-qemu-101.vma.zst),
use the following command:

qmrestore /mnt/pve/backup/dump/vzdump-qemu-101.vma.zst 101 --storage local-lvm

Explanation:

  • qmrestore: the command to restore a QEMU/KVM virtual machine.

  • The first argument is the path to the backup file (.vma, .vma.zst, or .vma.lzo).

  • The second argument (101) is the VM ID to assign during restore.

  • --storage local-lvm: defines the target storage for the restored VM.

 

2. Force Overwrite an Existing VM

If a VM with the same ID already exists, Proxmox will stop the restore and show an error like:

unable to restore VM 101 - VM 101 already exists on node 'prox-node'

To overwrite the existing VM, use:

qmrestore /mnt/pve/backup/dump/vzdump-qemu-101.vma.zst 101 --storage local-lvm --force 1

⚠️ Warning: This will delete the current VM with ID 101 and replace it with the one from the backup.

3. Restore to a New VM ID

If you want to keep the original VM and restore the backup as a new instance, specify a new VM ID:

qmrestore /mnt/pve/backup/dump/vzdump-qemu-101.vma.zst 4000 --storage local-lvm

This creates a new VM with ID 4000 using the same backup file.

4. Restore from Proxmox Backup Server (PBS)

If your backups are stored on a Proxmox Backup Server, use this format:

qmrestore pbs:backup/vm/101/2025-10-29T00:00:00Z 101 --storage local-lvm

Notes:

  • pbs: is the name of the PBS storage as configured in your Proxmox node.

  • The path (backup/vm/101/...) matches the backup dataset on PBS.

  • You can also restore via the web interface by selecting PBS → Backups → Restore. 

5. List All Existing Virtual Machines

Before restoring, check which VM IDs are currently in use:

qm list

Thanks for visit my website