How to Install Proxmox Backup Server as a VM and backup to NAS

A detailed guide on how to install Proxmox Backup Server as a VM and backup to NAS

How to Install Proxmox Backup Server as a VM and backup to NAS
Proxmox Backup Server installation and backup guide

Setting up a Proxmox Backup Server (PBS) as a virtual machine (VM) within Proxmox Virtual Environment (PVE) is a great way to manage your backups efficiently. This guide will walk you through the process of installing PBS as a VM and configuring it to back up your Proxmox VMs and LXC containers to a Network Attached Storage (NAS).

Step 1: Prepare the Proxmox Backup Server ISO

  1. Download the ISO: First, download the Proxmox Backup Server ISO from the official Proxmox website.
  2. Upload the ISO to Proxmox: Navigate to your Proxmox web interface, go to the storage section, and upload the ISO file.
Upload the Proxmox Backup Server ISO image to the Proxmox host

Step 2: Create a Virtual Machine for Proxmox Backup Server

  1. Create a New VM: In the Proxmox web interface, click on “Create VM”.
  2. Configure VM Settings:
    • Node: Select the node where you want to create the VM.
    • VM ID: Assign a unique ID for the VM.
    • Name: Give your VM a name, e.g., ProxmoxBackupServer.
    • Check Start At Boot box to make sure the PBS automatically start when the system boot.
  3. OS Configuration:
    • ISO Image: Select the Proxmox Backup Server ISO you uploaded.
    • Guest OS Type: Choose Linux and Other Linux 6.x or higher kernel.
  4. System Configuration: leave it as default
  5. Hard Disk:
    • Bus/Device: Choose VirtIO Block.
    • Storage: Select your storage location.
    • Disk Size: Allocate sufficient disk space (e.g., 32GB or more).
    • SSD Emulation: checked.
  6. CPU:
    • Cores: Assign at least 2 cores.
    • Type: Set to host for better performance.
  7. Memory:
    • RAM: Allocate at least 4GB.
    • Ballooning Device: unchecked.
  8. Network:
    • Model: Choose VirtIO (paravirtualized).

Step 3: Install Proxmox Backup Server

  1. Start the VM: Boot the VM from the ISO.
  2. Follow the Installation Wizard: Complete the installation by setting the root password, email, time zone, and network settings.
  3. Access the Web Interface: Once installed, access the PBS web interface via https://<PBS_IP>:8007.

Step 4: Add a CIFS for SMB mount and Configure NAS for Backup Storage in Proxmox Backup Server

Install CIFS Utils:

After PBS installation finished, login (or SSH) as root and install CIFS Utils:

apt install cifs-utils

Create a Mount Directory:

mkdir /mnt/omvnas

Add SMB credentials to mount NAS:

Create .smbcreds to store NAS login data:

nano /etc/samba/.smbcreds

Put the username and password to the file and Save (Ctrl+O, Enter, Ctrl+X):

username=smb_username
password=smb_password

Change file permission to be read-only by root:

chmod 400 /etc/samba/.smbcreds

Mount the SMB Share:

Create shared folder on OMVNAS, then mount it to the /mnt/omvnas folder. Remember to replace //IP-OF-NAS/SHARE-NAME to your actual NAS shared folder:

mount -t cifs -o rw,vers=3.0,credentials=/etc/samba/.smbcreds,uid=34,gid=34 //IP-OF-NAS/SHARE-NAME /mnt/omvnas
Step-by-Step Guide to Install OpenMediaVault on Proxmox and Enabling SMB Share
A comprehensive guide for installing OpenMediaVault on Proxmox and setting up an SMB share for easy file sharing across your network

Check if the shared folder is mounted successfully by make a new directory name "test" using the command in terminal, and check it appear in your NAS:

mkdir /etc/omvnas/test

Make the Mount Persistent:

Edit the fstab file to automatically mount the folder when the PBS server boot:

nano /etc/fstab

Add this line to the fstab file and Save. Remember to replace //IP-OF-NAS/SHARE-NAME to your actual NAS shared folder:

//IP-OF-NAS/SHARE-NAME /mnt/omvnas cifs vers=3.0,credentials=/etc/samba/.smbcreds,uid=34,gid=34,defaults 0 0

These steps will ensure your SMB share is mounted and accessible in Proxmox Backup Server.

Step 5: Configure Proxmox Backup Server

  1. Initial Setup:
    • Login: Use the root credentials to log in.
    • Network Configuration: Ensure the network settings are correct.
  2. Create a Datastore:
    • Navigate to Datastore: In the PBS web interface, go to Datastore and create a new datastore.
    • Path: Specify the path where backups will be stored.

Step 6: Add Proxmox Backup Server to Proxmox VE

Add Storage in PVE
    • Navigate to Datacenter: In the Proxmox web interface, go to Datacenter > Storage.
    • Add Storage: Click on Add and select Proxmox Backup Server.
    • Configuration: Enter the PBS ID pbs-main, PBS IP , username (root@pam), password, and datastore namepbs-main.
    • Fingerprint: Paste the PBS fingerprint here (to get it: go to Proxmox Backup Server, under Configuration -> Certificates -> View Certificate , copy the Fingerprint)
Copy the Fingerprint of Proxmox Backup Server

Step 7: Configure Backup Jobs

  1. Create Backup Jobs:
    • Navigate to Datacenter: In the Proxmox web interface, go to Datacenter > Backup.
    • Add a New Job: Click on Add and configure the backup job.
    • Storage: choose the PBS storage created in the previous step: pbs-main
    • Schedule: Set the schedule for the backups.
    • Selection: Choose the VMs and LXC containers to back up.

Step 9: Verify and Monitor Backups

  1. Run a Test Backup: Manually trigger a backup job to ensure everything is working correctly.
  2. Monitor Backups: Use the PBS web interface to monitor backup status and logs.

By following these steps, you can efficiently set up a Proxmox Backup Server as a VM within Proxmox and configure it to back up your VMs and LXC containers to a NAS. This setup ensures that your data is securely backed up and easily recoverable in case of any issues.

Feel free to ask if you have any questions or need further assistance!