Hello! 🚀 Today, we will take a detailed look at how to set up Proxmox backup, which is a must-know for server administrators and home lab users. Our precious data can be lost at any time due to a momentary mistake, hardware failure, or unexpected circumstances. In such cases, the solid insurance that protects our data is ‘backup’. Proxmox VE (Virtual Environment) is a powerful virtualization platform, but it is entirely up to the user to protect the data of the VM (Virtual Machine) and CT (Container) running on it. In this guide, we will explain in detail step by step how to utilize Proxmox’s built-in backup function, how to utilize the dedicated backup solution, Proxmox Backup Server (PBS), and most importantly, how to recover. So, shall we get started? 🛡️ — ### 1. Why is Proxmox Backup Important? 🤔 Data is the heart of the modern digital world. All services running in the Proxmox environment, such as web servers, databases, and file servers, ultimately depend on data. * **Hardware failure:** Hardware such as disks and motherboards can fail at any time. * **Software errors/corruption:** Data can be corrupted due to bugs in the operating system or applications, or malware infections. * **User errors:** Human errors such as file deletion and setting changes are inevitable. * **Disaster recovery:** It is the foundation for recovering data even in the event of physical disasters such as fire or flood. Backups are not just copies; they are a key element in protecting your time, effort, and business. 🌟 — ### 2. Understand your backup strategy: What, Where, When? 🗺️ Before starting a backup, it is important to establish your own backup strategy by answering some basic questions. * **What to Backup?** * **VM/CT data:** The data of all virtual machines and containers running on Proxmox is the most important. * **Proxmox host configuration:** The configuration files of Proxmox itself (`config files`, `/etc/pve`) are important for quick recovery in case of a host reinstallation. * **Where to Backup?** * **Local Disk:** Other disks within the Proxmox host. (Not recommended, lost together when the host fails) * **Network Shared Storage (NFS/SMB/CIFS):** Shared folders on Network Attached Storage (NAS) or other servers. The most common and efficient method. * **Proxmox Backup Server (PBS):** A dedicated backup solution provided by Proxmox, featuring excellent deduplication and compression efficiency. (Highly recommended!) * **When to Backup?** * **Regular Schedule:** Decide on the backup cycle according to importance, such as daily, weekly, monthly, etc. * **Before/After Important Changes:** It is recommended to perform manual backups before system updates or important configuration changes. * **Retention Policy:** Decide on how many days/how many copies of backups to keep. For example, keep the most recent 7 days of backups and delete the older ones. (Consider the 3-2-1 backup rule: 3 copies, 2 different media, 1 off-site) — ### 3. Using Proxmox’s built-in backup features ⚙️ Proxmox comes with powerful backup features out of the box, and you can easily set up backups as long as you have a network storage. #### 3.1. Adding a backup storage (NFS example) 💾 You need to connect a network shared folder to Proxmox, where you will store your backup files. Here we will use NFS (Network File System) as an example, the most common one. 1. **Access Proxmox Web UI:** Open a web browser and access `https://[Proxmox_IP]:8006`. 2. **Move Datacenter -> Storage:** Click `Datacenter` in the left menu, then select `Storage` tab in the right panel. 3. **Add a storage:** Click the `Add` button and select `NFS` from the drop-down menu. * **ID:** Specify a unique name for your backup storage. (e.g. `backup_nfs`) * **Server:** Enter the IP address or hostname of the NFS server. (e.g. `192.168. 1. 100`) * **Export:** Enter the path shared by the NFS server. (e.g. `/mnt/backup/proxmox`) * **Contents:** Make sure to select `VZDump Backup`. Select other options as needed. * **Available:** Leave checked. * **Advanced Options:** Set as needed, but defaults are fine.  *(Replace with an image of the Add NFS Storage window from an actual Proxmox UI screen)* 4. **Add:** Click the `Add` button to register the repository. It will appear in the repository list when successfully registered, and its status will be green. 💡 **Tip:** If you are using SMB/CIFS, you need to select `CIFS` and additionally enter username and password. #### 3.2. Create a Backup Job 🚀 Now that you have added a repository, you can schedule a job to automatically backup your VMs/CTs. 1. **Go to Datacenter -> Backup:** Click `Datacenter` in the left menu, then select `Backup` tab in the right panel. 2. **Create a Backup Job:** Click the `Add` button. * **Nodes:** Select the Proxmox nodes where the VMs/CTs you want to back up are running. (Select `All` to back up all nodes.) * **Repository:** Select the backup repository you added in 3.1. (e.g. `backup_nfs`) * **Schedule:** Specify the frequency and time you want to run the backup in Cron format. * **Example:** `0 22 * * *` (Run at 10:00 PM every night) * **Example:** `0 2 * * 1` (Run at 2:00 AM every Monday) * You can also easily set it via drop-down options like `Daily`, `Weekly` etc. * **Selection:** Select the VMs/CTs to backup. (Choose from `All`, `Selected`, `Excluded`) * **Mode:** * **Snapshot:** Most recommended. VM/CT will keep running even during backup. * **Suspend:** Temporarily suspend VM/CT before backup. * **Stop:** Completely shut down VM/CT before backup. (Highest data integrity, but service interruption will occur) * **Compression:** Select the compression method for backup file. (ZSTD, GZIP, LZO, ZSTD is recommended for latest Proxmox) * **E-Mail:** Enter the email address to receive backup result notifications. (Proxmox SMTP needs to be set up in advance) * **Retention:** Set how many backup copies to keep. (Example: 7 – keep the last 7 backup copies) * **Enable:** Check to enable the backup job.  *(Replace with the image of the backup job creation window on an actual Proxmox UI screen)* 3. **Add:** Click the `Add` button to schedule a backup job. #### 3.3. Run a manual backup 🖐️ If you want to back up a specific VM/CT immediately, you can use the manual backup function. 1. **Select VM/CT:** Select the VM or CT to be backed up in the left tree. 2. **Go to Backup Tab:** Click the `Backup` tab on the VM/CT details page. 3. **Backup Now:** Click the `Backup Now` button. 4. **Backup Settings:** Select backup destination, compression, mode, etc. and click `Backup` to run it.  *(Replace with an image of the Manual Backup window from an actual Proxmox UI screen)* — ### 4. Using Proxmox Backup Server (PBS) 💎 Proxmox Backup Server (PBS) is a dedicated enterprise-grade backup solution for Proxmox VE. It provides much more powerful and efficient features than the built-in backup feature. #### 4.1. What is PBS? 🧠 * **Block-level Deduplication:** Back up only changed blocks to dramatically reduce backup time and storage space. * **Incremental Backup:** Maximize efficiency by backing up only the changed parts after the initial backup. * **Integrity Check:** Regularly check for corruption of the backed up data to increase reliability. * **Client-side Encryption:** Encrypt backup data to enhance security. * **Remote Sync:** Replicate backup data to another PBS server to prepare for disaster recovery. #### 4.2. PBS Installation and Configuration (Brief Description) 🤝 PBS must be installed on a separate server (physical or virtual). You can download and install the PBS ISO file, or install it as an LXC container on Proxmox VE. 1. **PBS Installation:** Boot from the PBS ISO to install, or install via the apt command on Proxmox VE. (We recommend that you refer to the separate detailed guide for the installation process.) 2. **Connect PBS to Proxmox VE:** Once PBS is installed and the IP address is known, add PBS as a repository in the Proxmox VE web UI. * Select **Datacenter -> Repositories -> Add -> Proxmox Backup Server**. * **ID:** Unique name (e.g. `backup_pbs`) * **Server:** IP address or hostname of your PBS server (e.g. `192.168. 1.200`) * **Username:** Username for your PBS (default is `root@pam`) * **Password:** Password for your PBS * **Datastore:** Datastore name you created in your PBS (default is `datastore1`) * **Thumbprint:** Enter the SSL certificate thumbprint of your PBS server. (You can check it in PBS web UI `Dashboard`)  *(Replace with an image of the PBS Storage Add window on an actual Proxmox UI screen)* 3. **Add:** Click the `Add` button to register PBS. #### 4.3. Creating a Backup Job with PBS 📊 If you have added PBS as a storage, the process for creating a backup job is the same as described in 3.2. 1. **Datacenter -> Backup -> Add** 2. **Storage:** Select a PBS storage (e.g. `backup_pbs`). 3. **Remaining Options:** Set the schedule, nodes, selection, mode, compression, email, retention, etc. in the same way as described in 3.2. 💡 **Additional benefits of PBS:** PBS storage supports ZSTD compression and deduplication by default, making it very efficient. In addition, you can schedule data integrity check (`Verify`) and old backup cleanup (`Prune & Garbage Collect`) jobs directly from the PBS web UI. — ### 5. Restore Backup: The most important step! ✨ Backups are only valuable when they can be restored. It is highly recommended to run recovery tests periodically. 🚨 #### 5.1. Restore VM/CT ↩️ 1. **Select VM/CT:** Select the VM or CT you want to restore. (If it was deleted, you can also find and select the backup file in `Datacenter -> Backup` tab.) 2. **Go to Backups tab:** Click `Backup` tab on VM/CT details page. 3. **Select Backup:** Select the backup you want to restore and click the `Restore` button. 4. **Recovery Settings:** * **Destination Storage:** Select the storage (local disk, ZFS, etc.) to store the restored VM/CT. * **VM ID:** Specify a new VM ID, or recover with the existing ID to overwrite it. (It is safe to use the new ID if the old VM is still alive.) * **CPU, Memory, Network, etc:** You can adjust the hardware specifications of the VM/CT to be recovered as needed. 5. **Recover:** Click the `Recover` button to start the operation.  *(Replace with the image of the backup recovery window of an actual Proxmox UI screen)* #### 5.2. Backup and Restore Proxmox Host Configuration 📝 In addition to VM/CT data, it is also very important to back up the configuration files of Proxmox itself (`config files`, `/etc/pve`). When the host OS is corrupted or needs to be reinstalled, restoring these settings will help you quickly re-register the old VM/CT. 1. **Backup configuration (SSH connection):** SSH into your Proxmox host and backup the entire `/etc/pve` directory by unzipping it. “`bash ssh root@your_proxmox_ip cd /etc/ tar -czvf /root/proxmox_pve_config_$(date +%Y%m%d).tar.gz pve # Copy the backup file to a network storage scp /root/proxmox_pve_config_$(date +%Y%m%d).tar.gz user@backup_server_ip:/path/to/backup/ “` This backup file should be stored safely outside of the Proxmox host. 2. **Restore configuration (after a new Proxmox install):** After installing the new Proxmox host, simply delete the old `pve` directory and unpack the backup `tar.gz` file. “`bash ssh root@new_proxmox_ip systemctl stop pve-cluster systemctl stop corosync # Check if /etc/pve directory is in initial installation state and delete it rm -rf /etc/pve/* # Copy backup files to new Proxmox host (using scp) scp user@backup_server_ip:/path/to/backup/proxmox_pve_config_YYYYMMDD.tar.gz /root/ tar -xzvf /root/proxmox_pve_config_YYYYMMDD.tar.gz -C /etc/ systemctl start pve-cluster systemctl start corosync # Access the web UI and check if the VM/CT is registered properly “` **Caution:** This step is very important, so it is strongly recommended that you understand it well in advance and practice in a test environment. The `/etc/pve` directory also contains cluster-related information, so it should be done with extra care in a cluster environment. — ### 6. Backup Management and Monitoring 🔍 Backup tasks are not over once they are set up. * **Check job logs:** Periodically check the success/failure of backup tasks in `Data Center -> Job Logs` in the Proxmox web UI. * **Email Notifications:** If you set up email notifications when creating backup tasks, you can receive immediate notifications in case of failure, allowing you to respond quickly. (Requires Proxmox `Data Center -> Options -> Email` settings) * **Periodic Recovery Tests:** Most importantly! Periodically create dummy VMs and run recovery tests to verify that the backup files are actually recoverable. 🚨 Without this process, you cannot be sure that the backups are actually valid. — ### Conclusion 🏁 Backup is not an option in a Proxmox environment, but a must. We hope that you will safely protect your precious data through the Proxmox built-in backup features and how to utilize Proxmox Backup Server (PBS) that we explained today. Remember that backups are more than just copying files; they are a core insurance that allows you to continue your service and business in the event of an unexpected situation. Create and implement a backup plan for your Proxmox environment right now! 💪 If you have any questions, please leave a comment at any time. We’ll come back with more useful information next time! Thank you! G