Difference between revisions of "PVE - Backups"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
 
Line 3: Line 3:
'''Incredibly important.'''
'''Incredibly important.'''


<span style="color: rgb(255, 0, 0);" data-mce-style="color: #ff0000;">'''Do Your Backups!'''</span>
<span style="color: rgb(255, 0, 0);" >'''Do Your Backups!'''</span>


That said, manual backups kinda suck.
That said, manual backups kinda suck.


& PVE backups through the [[PVE - Web UI|Web UI]] are manual backups.
<span style="text-decoration: line-through;" >& PVE backups through the </span>[[PVE - Web UI{{!}}Web UI]]<span style="text-decoration: line-through;" > are manual backups.</span>


If you want to do automated backups, you'll do them through the [[Linux - CLI|CLI]] (Probably using [[Linux - cron|cron]]...)
<span style="text-decoration: line-through;" >If you want to do automated backups, you'll do them through the </span>[[Linux - CLI{{!}}CLI]]<span style="text-decoration: line-through;" > (Probably using </span>[[Linux - cron{{!}}cron]]<span style="text-decoration: line-through;" >...)</span>
 
<span style="color: rgb(132, 63, 161);" >'''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.)</span>


The tool PVE provides is [https://pve.proxmox.com/pve-docs/vzdump.1.html vzdump].
The tool PVE provides is [https://pve.proxmox.com/pve-docs/vzdump.1.html vzdump].

Latest revision as of 14:35, 5 July 2022

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