I back up my Proxmox workstation to the cloud with TrueNAS Scale

Featured Image

Understanding the Importance of Backups

Backups are a fundamental aspect of maintaining any computing device, especially in environments where data integrity and availability are critical. Neglecting this essential task can lead to significant losses when unexpected issues arise. This is particularly true for home labs, which often involve experimental setups that increase the risk of accidental data loss. From mistakenly edited configuration files to DNS-related problems, there are numerous scenarios where having a reliable backup system becomes crucial.

My Backup Strategy: A 3-2-1 Approach

To ensure my data remains secure, I've implemented a 3-2-1 backup strategy. This means I maintain three copies of my data, stored on two different types of media, with one copy kept offsite. I currently use a dedicated NAS for data archival, paired with a Proxmox Backup Server (PBS). However, this setup isn't sufficient on its own, as it doesn't account for potential failures of both the Proxmox node and the NAS simultaneously. To address this, I've added an additional layer by integrating my TrueNAS Scale dataset, which contains my PBS backups, with a Google Drive account.

Setting Up the Backup Environment

My backup environment includes a combination of Proxmox, Proxmox Backup Server, TrueNAS Scale, and Google Drive. The Proxmox Backup Server runs on my PVE node and schedules regular backups of my virtual guests to a TrueNAS Scale dataset over NFS. Initially, I considered keeping each server separate, but I encountered permission and compatibility issues that made this approach impractical. Instead, I opted for a PBS server running on top of Proxmox, which simplifies the process and ensures recoverability even if my PVE node fails.

If you're looking to simplify your setup, you could bypass the Proxmox Backup Server and directly link Proxmox with an NFS share on TrueNAS Scale. However, the deduplication and compression features of PBS help save valuable disk space on my NAS, making it a more efficient choice for my specific needs.

Choosing a Cloud Platform

While I initially wanted to use Backblaze for my cloud storage, the subscription fees were not feasible at the moment. As a result, I opted for the 15GB free storage offered by Google Drive. This decision allows me to maintain an offsite backup while managing costs effectively.

Configuring Proxmox Backup Server

Setting up the Proxmox Backup Server on a PVE node involves several steps. First, I created an NFS share on TrueNAS Scale and connected it to my Proxmox Datacenter. Then, I modified the /etc/pve/storage.cfg file to include the options vers=3,soft parameter within the nfs section.

Proxmox does not include the PBS package by default, so I manually adjusted the /etc/apt/sources.list configuration file. After running the apt update && apt install proxmox-backup-server -y command in the Proxmox Shell, the installation proceeded smoothly. The next step was to access the web UI of the newly configured PBS instance and connect the NFS share to a new Datacenter using my Proxmox node's credentials.

Integrating TrueNAS Scale with Google Drive

Connecting TrueNAS Scale with Google Drive is a straightforward process. Using the Backup Credentials tab, I added Google Drive as my preferred platform. By pressing the Add button and selecting Google Drive, I was able to pair my Google account easily through the Log In To Provider option.

Once Google Drive was connected, I navigated to the Data Protection tab to create a new Cloud Sync Task. I selected my Google Drive credentials as the Provider and set the Direction to PUSH instead of PULL to prevent overwriting the backup files generated by PBS. I also set the Transfer Mode to COPY, chose the /mnt/pbs dataset as the Directory, and selected the root folder of the dataset before giving it a Description and hitting Save.

Verifying the Backup Process

To ensure everything works as intended, I pressed the Run command, and TrueNAS Scale began saving my LXCs and VMs to my Google Drive. Additionally, the Restore button within the Cloud Sync Task allows me to overwrite the dataset using the cloud files, which will be essential if my TrueNAS Scale drives fail and the backup dataset becomes unusable.

Future Plans and Considerations

While I'm currently using Google Drive for my backups, I anticipate needing more storage as the number of LXCs and VMs on my Proxmox nodes grows. I plan to transition to Backblaze once I have the budget, or explore integrating my backups with Amazon S3 as I delve deeper into the AWS service stack in the coming weeks.

Post a Comment for "I back up my Proxmox workstation to the cloud with TrueNAS Scale"