Backup Proxmox VM to USB
- Mount the USB in Proxmox
- Used this guide on mounting a USB in Linux
- Plug USB drive in back of server (did not work in front)
- List drives, should include one with FAT32, i.e. /dev/sdh1
1
fdisk -l
- Create a mount point:
1
mkdir /media/usb-drive
- Mount the USB drive, use identifier found above
1
mount /dev/sdh1 /media/usb-drive/
- List drives, should include one with FAT32, i.e. /dev/sdh1
- Add mounted USB drive into Proxmox storage
- Go to Datacenter -> Storage -> Add -> Directory
- Set ID = usb-backup
- Set Directory = /media/usb-drive
- Set Content = VZDump backup file, from dropdown
- Click Add
- NOTE that Backup will backup the whole VM including associated drives… big backup for TrueNAS! So need to deselect all TrueNAS linked drives to exclude from backup
- Go to VM -> Hardware
- Select each drive in turn to be excluded from the backup
- Click Edit button
- In popup window, untick Backup to exclude from Backup tasks
- Repeat for 5x TrueNAS drives, just leave 32GB boot drive to backup
- Backup the VM
- Go to the VM, e.g. 100 (TrueNAS) -> Backup, click Backup now button
- Set Storage = usb-backup, from dropdown
- Leave remainder as default, click Backup
- Popup window will show status of backup
- On completion unmount the USB drive, then can unplug
1
umount /media/usb-drive
Restore Proxmox VM from USB
Used this guide to restore VM from the USB:
- NOTE: If transferring VM from one server to another, via backup disk, do not delete old VM until the new VM is up and working ok!
- Plug USB drive into top front RHS slot (worked this time?!)
- Select Proxmox node -> Disks. Should see all disks including the USB drive, e.g. /dev/sdh
- In Proxmox shell, create new directory:
1
mkdir /mnt/backup
- Then mount the USB partition to this directory:
1
mount /dev/sdh1 /mnt/backup
- Then add the mount to the PVE storage config:
1
pvesm add dir backup –path /mnt/backup –content backup
- This should add a new storage backup (hostname) under the node
- NOTE: This is not permanent and will dismount on reboot
- Click on the storage icon -> Backups, and the backups appear in Proxmox
- Select backup -> Restore. In the Restore VM window
- Set Storage = local-zfs
- Set VM id as required
- Click Restore
- Select backup -> Restore. In the Restore VM window
NOTES
- Restore TrueNAS VM. The pass-through HDDs that form the storage pool were excluded from the backup and do not form part of the restored configuration. It is necessary to passthrough again to the new VM using the Install TrueNAS guide.
- Do not start VM
- Restore HDD passthrough
- Start VM
- Remember to untick the Backup option for each disk