Difference between revisions of "PVE - Backups"
(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]. ==...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
'''Incredibly important.''' | '''Incredibly important.''' | ||
<span style="color: rgb(255, 0, 0) | <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 | <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 | <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]. | ||
==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 24: | ||
* <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 | 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. | You can even embed identifying information automatically into your note. (The variables: <nowiki>{{cluster}}, {{guestname}}, {{node}}, and {{vmid}}</nowiki> are available.) | ||
= Restoring from Backups = | |||
* qmrestore -Virtual Machine restore utility | |||
* pct restore -Container restore utility |
Latest revision as of 13: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