2. PBS Container on TrueNas Scale

02. PBS Configruation

1. After installing Proxmox backup server we need to configure it to our needs. As with Proxmox we will also start with the post install script but then for Proxmox Backup Server. The command is according to proxmox helper scripts  is

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pbs-install.sh)"

2. Next is setting up a datastore

3. This datastore can be local, removable, s3 or an nfs share.

For an LXC container 

03. Setup VM replication tasks

Now that you have setup the datastore on your PBS host you can start connecting it to your PVE system. 

  1. On the PBS you click on your datastore > Show connection information and keep the tab open s.t you can copy paste it to your PVE you want to backup.
  2. Then open your PVE and go to Datacenter > Storage > +Add and select Proxmox Backup server
  3. Fill in the credentials of your backup server that you gathered at 1. 
  4. Then add it and done !!

Sweet the pbs is now connected so now we can set up some backup tasks to the VM's you wan to back up.

  1. Go to Datacenter > Backup > + Add

Backup Job

Retention Period

After you have set when you want to take backups you need to set how long you want to keep your backups. If you don't set a retention period for Proxmox backup jobs, backups will accumulate indefinitely, potentially leading to excessive storage use and making it difficult to manage backup data effectively. Now there are different retention variables that can all be found on the Proxmox Wiki page. For instance

keep-last <N>: Keep the last <N> backups

keep-hourly <N>: Keep backups for the last <N> hours. If there is more than one backup for a single hour, only the latest is kept.

keep-daily <N>: Keep backups for the last <N> days. If there is more than one backup for a single day, only the latest is kept.

keep-weekly <N>: Keep backups for the last <N> weeks. If there is more than one backup for a single week, only the latest is kept.

Now, you need to set 

How Many Hourly Backups to Keep?

The right value depends on your needs:

Which Daily Backup Gets Kept?

The backup that's retained as your "daily" backup is typically the most recent one from that day—but the exact one depends on when pruning runs.

Example scenario with hourly backups:


The Real Benefit

With hourly backups and keep-daily=7, you actually get much better recovery granularity than traditional daily backups:

This means you can recover to any hour for the last day, and any day for the last 7 days—far better than just having one backup per day.

With the prune-backups option you can specify which backups you want to keep in a flexible manner. 

The following retention options are available:

keep-all <boolean>

Keep all backups. If this is true, no other options can be set.

keep-last <N>

Keep the last <N> backups.

keep-hourly <N>

Keep backups for the last <N> hours. If there is more than one backup for a single hour, only the latest is kept.

keep-daily <N>

Keep backups for the last <N> days. If there is more than one backup for a single day, only the latest is kept.

keep-weekly <N>

Keep backups for the last <N> weeks. If there is more than one backup for a single week, only the latest is kept.

Note Weeks start on Monday and end on Sunday. The software uses the ISO week date-system and handles weeks at the end of the year correctly.
keep-monthly <N>

Keep backups for the last <N> months. If there is more than one backup for a single month, only the latest is kept.

keep-yearly <N>

Keep backups for the last <N> years. If there is more than one backup for a single year, only the latest is kept.

The retention options are processed in the order given above. Each option only covers backups within its time period. The next option does not take care of already covered backups. It will only consider older backups.

Specify the retention options you want to use as a comma-separated list, for example: