Skip to content

Instantly share code, notes, and snippets.

@paulpeeters
Created January 7, 2026 22:53
Show Gist options
  • Select an option

  • Save paulpeeters/c6bfc7cd3f9c9b25ae8c05a48006420b to your computer and use it in GitHub Desktop.

Select an option

Save paulpeeters/c6bfc7cd3f9c9b25ae8c05a48006420b to your computer and use it in GitHub Desktop.
Guidelines for backup and restore of proxmox VE, typically when SSD/harddisk read/write issues are frequently occuring but the proxmox host is still running and accessible

Proxmox VE – Complete Backup & Restore Plan (NVMe Failure Scenario)

This document is the single authoritative backup and restore guide for a standalone Proxmox VE host. It is written to be usable during a real failure (NVMe disk read/write issues) but with the premise that the Proxmox VE host is still running and accessible (to try to create VM backups).


1. Scope and assumptions

  • Single Proxmox VE host (no cluster)
  • Proxmox VE 8.x backups, restore onto Proxmox VE 9.1-1
  • One failing NVMe (system + VM storage)
  • One internal 500 GB SATA SSD used mainly for ISO images and auxiliary storage
  • One external USB disk (NTFS) used for backups (already contains other data)
  • VMs:
    • Ubuntu-01 .. Ubuntu-04 (continuously running, some with Docker)
    • Several Windows/macOS test VMs (mostly stopped)

2. Backup strategy – overview

What must be backed up

  1. Virtual machines (primary priority)
  2. Proxmox host configuration (network, VM configs, mail, storage)
  3. Awareness of what is not backed up (packages, logs, caches)

What is intentionally NOT backed up

  • /var/log
  • /var/cache
  • /usr, /bin, /lib (reinstalled by Proxmox installer)
  • System users/passwords

3. Preparing the USB backup disk (NTFS)

The USB disk already contains data and must not be wiped.

3.1 Mounting the USB disk

Example (adjust device name if needed):

lsblk
mkdir -p /mnt/usb-backup
mount -t ntfs-3g /dev/sdX1 /mnt/usb-backup

If an error occurs on mount, then most probably NTFS driver is not installed:

apt install ntfs-3g

3.2 Create Proxmox backup directory

mkdir -p /mnt/usb-backup/proxmox-backups/dump

3.3 Add storage in Proxmox UI

Datacenter → Storage → Add → Directory

  • ID: usb-backup
  • Directory: /mnt/usb-backup/proxmox-backups
  • Content: ✔ Backup

Important: do not select ISO / Disk image here.


4. VM backup procedure

4.1 Backup modes explained

Mode When to use Notes
snapshot Running Linux VMs Requires QEMU guest agent for consistency
stop Docker-heavy VMs or Windows VM is stopped automatically by vzdump

You do not need to manually stop the VM when using --mode stop.


4.2 Recommended backup commands

Ubuntu VMs with Docker or others that are already stopped (example: 201, 103)

vzdump 201 --storage usb-backup --mode stop
vzdump 103 --storage usb-backup --mode stop

Running Ubuntu VMs without Docker

vzdump 202 --storage usb-backup --mode snapshot
vzdump 100 --storage usb-backup --mode snapshot

Windows / inactive VMs

vzdump 101 --storage usb-backup --mode stop

5. Handling backup failures (important)

NVMe read errors during backup

Errors like:

critical medium error, dev nvme0n1
job failed with err -61 - No data available

Mean:

  • The source NVMe is failing
  • The backup is aborted at the unreadable sector

This is not recoverable via vzdump.

Correct response

  • Do not retry endlessly (accelerates disk death)
  • Accept partial VM loss
  • Plan post-restore data recovery from raw disks

6. Proxmox host configuration backup

6.1 What to back up

Critical directories/files:

  • /etc/pve
  • /etc/network
  • /etc/hostname
  • /etc/hosts
  • /etc/postfix
  • /root

6.2 Final backup command (safe)

tar -czf /mnt/usb-backup/proxmox-backups/proxmox-host-config.tar.gz \
  /etc/pve \
  /etc/network \
  /etc/postfix \
  /etc/aliases \
  /etc/aliases.db \
  /etc/hostname \
  /etc/hosts \
  /etc/fstab \
  /etc/vzdump.conf \
  /etc/lvm \
  /etc/ssh \
  /root

Warnings about "Removing leading /" are normal and harmless.


7. Installing new NVMe + Proxmox VE 9.1-1

7.1 Download

ISO: https://enterprise.proxmox.com/iso/proxmox-ve_9.1-1.iso

7.2 Create bootable USB (Windows)

Use Rufus:

  • Partition scheme: GPT
  • Target system: UEFI
  • Boot selection: Proxmox ISO
  • Write mode: ISO mode (default)

8. Fresh Proxmox installation

During installer:

  • Hostname: proxmox or proxmox.local
  • IP address: 192.168.0.88
  • Same gateway and DNS as before

Do not create extra storage yet.


9. Post-install restore order (critical)

Correct order

  1. Install Proxmox
  2. Configure networking
  3. Mount USB backup disk
  4. Restore host config (selectively)
  5. Add storage
  6. Restore VMs

10. Restoring host configuration (SAFE METHOD)

10.1 Extract to temporary directory

mkdir /root/restore
cd /root/restore
tar -xzf /mnt/usb-backup/proxmox-backups/proxmox-host-config.tar.gz

10.2 Restore selectively

cp -a etc/pve /etc/
cp -a etc/network /etc/
cp -a etc/postfix /etc/
cp -a etc/hostname /etc/hostname
cp -a etc/hosts /etc/hosts

Never extract directly to /.


11. Re-adding storage

11.1 USB backup disk

Same as section 3.

11.2 SATA SSD (500 GB)

  • Identify disk: lsblk
  • Mount (example):
mkdir -p /mnt/sata-iso
mount /dev/sdY1 /mnt/sata-iso

Datacenter → Storage → Add → Directory

  • ID: sata-iso
  • Directory: /mnt/sata-iso
  • Content: ✔ ISO

12. VM restore procedure

Should VM IDs be reused?

Yes – strongly recommended.

Reasons:

  • Firewall rules
  • Backup references
  • Scripts
  • Muscle memory

Restore command

qmrestore /mnt/usb-backup/proxmox-backups/dump/vzdump-qemu-201-*.vma 201

Repeat for all successfully backed-up VMs.


13. Handling VMs without backups (Windows)

After Ubuntu VMs are restored and stable:

  1. Remove old NVMe
  2. Attach via USB/NVMe enclosure to another Linux system
  3. Identify LVM volumes
  4. Mount read-only
  5. Extract .qcow2 or raw disks

Windows disks can later be mounted in:

  • Linux (nbd, guestfish)
  • Windows (DiskInternals, FTK Imager)

14. Panic checklist

If something goes wrong:

  • Stop all restore operations
  • Do not write to old NVMe
  • Verify backups exist and are readable
  • Restore only one VM at a time
  • Keep USB backup mounted read-only if unsure

15. Final notes

  • Your successful Ubuntu VM backups are sufficient to recover services
  • Windows VMs with failed backups may still yield data
  • Proxmox VE 9.x is a safe upgrade target

End of document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment