Difference between revisions of "PVE - Backups"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
(Created page with "Backups are important. '''Incredibly important.''' <span style="color: rgb(255, 0, 0);" data-mce-style="color: #ff0000;">'''Do Your Backups!'''</span> 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...) The tool PVE provides is [https://pve.proxmox.com/pve-docs/vzdump.1.html vzdump]. ==...")
 
Line 12: Line 12:


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].
==Some examples==
= Creating Backups =
===Selecting which VMs to backup===
== Some examples ==
=== Selecting which VMs to backup ===


* <code>vzdump ''VMID''</code>
* <code>vzdump ''VMID''</code>
Line 21: Line 22:
* <code>vzdump ''VMID1'' ''VMID2'' ''VMID3''</code>
* <code>vzdump ''VMID1'' ''VMID2'' ''VMID3''</code>
Backs up the 3 specified VMs.
Backs up the 3 specified VMs.
===Selecting WHERE to put the backups===
=== Selecting WHERE to put the backups ===


* <code>vzdump VMID --storage Datastore</code>
* <code>vzdump VMID --storage Datastore</code>
Backs up the VM to the selected [[PVE -_Datastores|Datastore]].
Backs up the VM to the selected [[PVE -_Datastores{{!}}Datastore]].
* <code>vzdump VMID --dumpdir Location</code>
* <code>vzdump VMID --dumpdir Location</code>
Backs up the VM to a specific location on the underlying (bare-metal) filesystem.
Backs up the VM to a specific location on the underlying (bare-metal) filesystem.


===Adding notes to the backup===
=== Adding notes to the backup ===


* <code>vzdump VMID --notes-template "This is a note about the backup"</code>
* <code>vzdump VMID --notes-template "This is a note about the backup"</code>
You can even embed identifying information automatically into your note. (The variables: <nowiki>{{cluster}}, {{guestname}}, {{node}}, and {{vmid}}</nowiki> are available.)
You can even embed identifying information automatically into your note. (The variables: <nowiki>{{cluster}}, {{guestname}}, {{node}}, and {{vmid}}</nowiki> are available.)
= Restoring from Backups =

Revision as of 17:37, 15 May 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...)

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