PVE - Backups

From Da Nerd Mage Wiki
Jump to navigation Jump to search

Backups are important.

Incredibly important.

Do Your Backups!

That said, manual backups kinda suck.

& PVE backups through the Web UI are manual backups.

If you want to do automated backups, you'll do them through the CLI (Probably using cron...)

NEW KNOWLEDGE: Backup automation in PVE is done at the Datacenter level. (Still relevant info here tho... Management through the Web UI isn't ALWAYS possible.)

The tool PVE provides is vzdump.

Creating Backups

Some examples

Selecting which VMs to backup

  • vzdump VMID

Backs up a specific VM.

  • vzdump --all

Backs up ALL of the VMs on the node.

  • vzdump VMID1 VMID2 VMID3

Backs up the 3 specified VMs.

Selecting WHERE to put the backups

  • vzdump VMID --storage Datastore

Backs up the VM to the selected Datastore.

  • vzdump VMID --dumpdir Location

Backs up the VM to a specific location on the underlying (bare-metal) filesystem.

Adding notes to the backup

  • vzdump VMID --notes-template "This is a note about the backup"

You can even embed identifying information automatically into your note. (The variables: {{cluster}}, {{guestname}}, {{node}}, and {{vmid}} are available.)

Restoring from Backups

  • qmrestore -Virtual Machine restore utility
  • pct restore -Container restore utility