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.
- 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.
- Then open your PVE and go to Datacenter > Storage > +Add and select Proxmox Backup server
- Fill in the credentials of your backup server that you gathered at 1.
- 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.
- 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:
- keep-hourly: 24 — Keep the last 24 hours of backups (one per hour). This is a common choice for high-availability or critical systems.
- keep-hourly: 48 — Keep the last 2 days of hourly backups for more granular recovery options.
- keep-hourly: 6 — Keep only the last 6 hours if you want minimal storage overhead.
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:
- Backups created at: 1 AM, 2 AM, 3 AM, ..., 11 PM every day
- When pruning runs, it usually keeps the latest backup from each 24-hour period
- So the 11 PM backup from 7 days ago would be kept as your "daily" representative
The Real Benefit
With hourly backups and keep-daily=7, you actually get much better recovery granularity than traditional daily backups:
- You have all hourly backups from the last 1 day (keep-hourly: 24)
- Plus one backup per day for the previous 6 days (keep-daily: 7)
- Plus your 4 weekly and 1 monthly backup
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.
![]() |
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:

No comments to display
No comments to display