Backup retention, pruning and protected backups in Proxmox VE

Set keep-last, daily, weekly and monthly retention for Proxmox VE backup jobs, protect important backups from pruning and deletion, and confirm what protection does and does not stop on file-based storage.

On this page

Backup retention and protected backups in Proxmox VE: what teams need to decide

Backups accumulate faster than most teams expect, and storage fills long before anyone reviews what is kept. In Proxmox VE, retention decides which backups a job keeps over time, and protection decides which individual backups survive that pruning. Retention is a rule set on a backup job, such as how many recent, daily, weekly and monthly copies to hold. Protection is a flag on one specific backup that exempts it from pruning and from deletion through normal cleanup. Your restore window is the combination of both settings, so they belong in the same design review.

Start by writing down the recovery questions the business will ask: how far back a restore must reach for a given workload, how many restore points are needed for ransomware or silent corruption, and which backups must be kept for a fixed period for contractual or regulatory reasons. Retention rules answer the first two questions for every workload in a job. Protection answers the third for specific backups, such as a pre-upgrade snapshot or a backup taken before an audit. Confirm with your PBS and Proxmox VE versions how the retention keep settings and the protected flag interact in your environment, and test the outcome on a non-production datastore before you rely on it.

Protection has limits that matter most on file-based storage. A protected backup is still a file or set of chunks that anyone with sufficient rights on the storage can delete or overwrite, so protection alone does not defend against an attacker who controls the backup server. Protection also does not stop a full datastore from filling, so capacity planning and pruning review remain your responsibility. Ask your team to confirm which accounts can change retention or remove protection, to record who approved each protected backup, and to review the Proxmox Backup Server documentation for the current behavior of each setting before you set the policy.

Retention and protection options and when each fits

This table compares the retention settings and per-backup protection available for Proxmox VE backup jobs against common goals, from short operational recovery to long historical retention and protecting a golden image. Read each row for what the setting keeps, what it costs in storage and restore granularity, and whether an administrator can still delete the backup. The main takeaway is that retention limits how many restore points exist, while protection is only as strong as the storage and permissions behind it.

OptionWhat it keepsMain trade-offWhen it fits
keep-lastThe most recent N backups, regardless of ageSimple to reason about, but a burst of frequent runs can push older days or weeks out of historyShort operational recovery where the latest few restore points matter most
keep-dailyOne backup per day for the number of days setStorage grows with daily change volume, and intra-day restore points are lost after the windowRecovering from a bad change discovered within days
keep-weeklyOne backup per ISO week for the number of weeks setGives longer history at low storage cost, but restore granularity is coarse for older periodsMedium-term history for workloads where a week-old state is acceptable
keep-monthlyOne backup per month for the number of months setLowest storage cost for long history, but few restore points exist for any given recent periodLong-horizon retention such as audit or contractual history, confirmed against your own policy
Protected backupA single backup that pruning jobs do not removeProtection stops pruning, not deletion, so an administrator with rights can still remove it, and protected backups consume storage until releasedGolden images or a known-good baseline that must survive routine pruning
Storage-level immutability or separate credentialsBackups that the Proxmox VE host cannot easily delete, depending on the storage usedRequires storage features and a separate permission model that must be confirmed for your target, and adds administrationRansomware and insider risk, where a retained backup must resist deletion by the platform admin
Off-site copy with independent retentionA copy kept under a different retention policy on another systemExtra storage and bandwidth, and the copy's retention must be set separately from the sourceRecovery after loss of the primary site or storage, and as a second line of retention

How to configure retention and protection on a backup job

This sequence sets retention for each workload, protects the backups that must outlast normal pruning, and proves the result with a test backup and prune cycle. The output is a documented retention policy, a verified list of protected restore points and a record of what the storage actually keeps.

  1. Define restore points for each workload

    Before changing any setting, list each VM and container in scope with the number of daily, weekly and monthly restore points its owner needs. Note which workloads hold records that must survive a longer window, and which can keep fewer copies. Record who approved the list. This step is done when every guest has a written retention target and an owner, so each retention value set later traces back to a recorded decision.

  2. Set retention on the backup job

    In the Proxmox VE web interface, open Datacenter, then Backup, and edit the job. Set keep-last, keep-daily, keep-weekly and keep-monthly to match the list from the previous step. If backups go to Proxmox Backup Server, retention is also applied by prune settings on the datastore, so check that the datastore prune schedule does not remove what the job keeps. This step is done when the job and the datastore settings both match the written targets.

  3. Protect the backups that must survive

    In the Proxmox Backup Server interface, open the datastore content view, select the snapshots that must outlast normal pruning, and set the protected flag. Give this action to a restricted account so routine operators cannot change it. Protection is set per snapshot, so new backups are not protected automatically unless your process adds that step. This step is done when the protected marker appears on each selected snapshot and the list matches your written selection.

  4. Run a test backup on disposable guests

    Use a test VM and a test container that hold no production data. Run the backup job against the target storage twice, so the test guests have at least two restore points for pruning to act on. Compare the snapshot list with the job run log. This step is done when each test guest shows the expected number of snapshots with matching timestamps and sizes, and no production guest was included in the test.

  5. Run a prune cycle with a protected snapshot

    Mark one older test snapshot as protected, then start a prune run. If your Proxmox Backup Server version offers a prune simulator, run it first to see which snapshots would be removed. Then run the prune for real. This step is done when the protected snapshot still exists, unprotected snapshots outside the keep settings are gone, and the result matches the simulator output. If the protected snapshot disappears, stop and check account permissions and job scope before any further prune.

  6. Confirm retention on the storage itself

    Check the remaining snapshots on the datastore or storage target directly, not only in the Proxmox VE interface, and compare them with your written targets. Then test the limits. On file-based storage such as directory or NFS targets holding vzdump archives, protection and pruning may behave differently from a Proxmox Backup Server datastore, so confirm in your version's documentation what is enforced. Test whether an ordinary write account can delete a protected archive, and restrict delete rights if it can. This step is done when the storage listing matches your targets and the limits are written down.

Where protection stops on file-based storage

Protected backups resist pruning and removal through the normal retention path, but that is only one layer. The cards below cover what protection does not stop, including filesystem access, shared credentials and single-site storage, and what to confirm on your chosen storage and version before relying on it.

Protection covers the retention path only

Protection stops pruning and removal through the Proxmox VE and Proxmox Backup Server tooling that runs retention. It does not stop someone with the right privileges from deleting a backup through another route. Treat protection as one control among several, and test whether a prune job or a manual delete attempt actually refuses to remove a protected snapshot in your setup.

Proxmox VE docs

**Filesystem access bypasses tooling**

On directory-based or other file-based storage, backup files are ordinary files on a filesystem. Anyone with write access to that path, including a root user on the host, a compromised service account or a backup script, can delete or overwrite them outside Proxmox tooling, and the protection flag will not stop that. Map who can reach the storage path at the operating system level, not only in the Proxmox web interface.

Shared credentials weaken the boundary

If the account that writes backups is the same account that prunes them, or the same account that administers the host, a single compromise removes both the copies and the protection. Separate the write path from the delete path where your storage allows it, and review which API tokens and users can change backup job retention and protection settings.

Protection is not an off-site copy

A protected backup on the same host, array or NFS share still shares the failure domain of the source. Fire, theft, a storage controller fault or a ransomware event that encrypts the mounted path can take every copy at once. Plan an off-site copy through a separate system, such as a sync to another Proxmox Backup Server or an offline medium, and record where each copy lives.

Confirm behavior on your version

How protection interacts with pruning, verification and garbage collection depends on the storage type and the Proxmox release in use. Confirm with the vendor documentation for your exact version, and run a controlled test on a non-production datastore that attempts a prune, a manual removal and a restore of a protected backup before you rely on the setting.

Document the access and recovery path

Write down who can change retention, who can delete files at the storage layer, where the encryption keys live and how a restore is performed without the original host. Auditors and incident responders will ask for this evidence. Keep it current after upgrades, storage migrations and staff changes, since each can quietly widen access.

Questions teams ask before configuring backup retention

How many backups should we keep for each VM and container?

There is no universal count. The right retention follows from how far back you may need to recover, how much data you can lose between backups, and how much storage you can afford to hold. Most teams start from their recovery requirements and work backward: how many days a bad change might go unnoticed, how many weeks a compliance or contract obligation requires, and how many months a finance or legal hold may demand. Keep-last covers recent restore points, while daily, weekly and monthly settings thin out older ones. Write the numbers down per workload class, since a domain controller and a test VM rarely deserve the same policy. Confirm the exact retention options in your Proxmox VE version against the Proxmox VE administration guide.

Does backup protection replace an off-site copy?

No. Protection from pruning keeps a specific backup from being removed by retention rules, but it lives on the same storage as the source system. A fire, a compromised backup server, or a destroyed datastore can take protected and unprotected copies together. An off-site copy is a separate location with separate credentials, which is why teams pair local protection with a second site, a sync target or tape. Protection answers the question of how long a known-good restore point stays available. An off-site copy answers whether any restore point survives a site-level or administrative failure. Treat them as complementary controls and document both in your recovery plan.

What changes between file-based storage and Proxmox Backup Server?

The main difference is what the storage can enforce. Proxmox Backup Server stores backups in datastores with deduplicated chunks, and it manages retention and pruning as part of the backup server itself. File-based storage such as a directory, NFS or CIFS share holds whole backup files, and the Proxmox VE host or any client with write access to that path can often delete them. Protection on file-based storage therefore depends on filesystem permissions, share access control and the credentials used by the backup job, not on a server-side lock. Check the storage types your Proxmox VE release supports and confirm, in your own test environment, what a delete request from the backup node can actually remove.

Can our in-house team configure retention and protection alone?

Often yes, for a small estate with clear recovery objectives and a team that already runs Proxmox VE. The configuration itself is short. The difficult parts are deciding the policy, separating the credentials that write backups from the ones that delete them, testing restores, and recording evidence that the policy works. Teams usually struggle when the policy has no owner, when backup and infrastructure administrators share one account, or when no one has run a restore in the last year. A partner can provide an independent review of the design and a rehearsal of the deletion path. Decide in advance which of these you will own and which you will hand over.

What drives the effort and cost of a retention review?

Effort scales with the number of workloads, the number of backup storage targets, and how many distinct recovery requirements exist. The work includes inventorying jobs, mapping each workload to a recovery objective, checking which storage enforces which rule, reviewing who can delete backups, and running a test that proves an expected restore point survives pruning. Cost components are the internal time of your staff, any external reviewer's fee, and the storage you consume while retention is extended. Retention costs recur because capacity grows with every kept restore point, while the review itself is mostly one-time unless you later rerun it after changes. Ask any provider to price these components separately.

Does our policy cover ransomware and deletion by an attacker?

It can, but only if the design removes the attacker's ability to delete the backups they would target. Retention rules alone do not stop a user with full administrative rights from pruning every restore point. Look for separate backup credentials with limited permissions, protected snapshots where the storage supports them, and an off-site or offline copy that the production administrators cannot change. Then test the deletion path under those credentials. Record which account can prune, which can remove a protected backup, and what happens when an automated job runs with the wrong scope. Dedicated ransomware planning covers this in more depth.

What should we ask a partner for in a written retention scope?

Ask for a scope that names the systems, storage targets and retention classes in writing, along with the deliverables. Useful items include an inventory of backup jobs with their keep-last, daily, weekly and monthly settings, a list of protected backups and the rule for protecting them, a permission matrix for backup, delete and admin accounts, and a restore test that shows an expected restore point survives pruning. Also ask what the partner will not do, such as issuing an audit opinion, and what evidence you will receive afterward. DeployOpen plans and implements these controls in your infrastructure, and most engagements are fixed-scope with the scope and timeline agreed in writing before work starts.

How do we show that our retention settings meet an audit requirement?

Auditors generally want to see that a documented retention requirement exists, that the configuration matches it, and that the setting is applied consistently across systems. Keep the policy, the job configuration exports, the permission matrix and records of restore tests together. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies make that determination. Confirm with your assessor which artifacts they expect before you collect them.

Protection is checked before retention rules run

The path starts when a backup job finishes and a new snapshot lands in the datastore. The job first checks whether the snapshot or its group is marked protected. Protected snapshots skip the prune step entirely. Unprotected snapshots are evaluated against the keep-last, daily, weekly and monthly counts, and each one is either retained or pruned. Administrator deletion sits outside this path, so access control on the datastore decides whether a snapshot survives manual removal. Confirm the exact protection behavior for your Proxmox Backup Server version.

Protected snapshots bypass pruning, while manual deletion bypasses the retention path entirely.

What to confirm in your environment before relying on protection

Before you rely on retention or protection settings, confirm five facts about your environment: the Proxmox VE version and its support status, the storage type behind your backup target, whether backups go to Proxmox Backup Server or to a plain file-based target, who holds delete rights on the backup storage and on Proxmox Backup Server, and how you will prove that retained restore points are usable. Support status comes first. The Proxmox VE FAQ explains that a release is supported for about as long as its matching Debian release receives security support, so a host on an end-of-life version may still run its backup jobs while receiving no fixes for the components that handle them. Check the Proxmox VE FAQ for your version's end date rather than relying on memory.

Next, confirm the target. Retention rules and protection behave differently on Proxmox Backup Server than on a directory or NFS share used as a backup storage. Read the backup section of the Proxmox VE administration guide for the storage type you use, and test pruning on a non-production job before you trust the keep settings. Assume that file-based storage offers no protection against deletion by anyone with write access to the directory until your own test shows otherwise.

Finally, map delete rights and set a restore test. List every account and API token that can remove backups, prune a datastore or edit a job, including root on the host and administrators on the backup server. Remove delete rights from routine service accounts where the product allows it, and record who can override protection. Then schedule restore drills that restore a sample from each retention tier, such as the oldest kept monthly point, and boot or inspect the result. A retained restore point that has never been restored is an assumption, not a recovery option. Document the drill results and the owner of each step so the evidence is available when someone asks.

Trade-offs between short and long retention

Every retention policy trades storage and review effort against the restore and audit choices you keep. The four cards below set out the main tensions so you can size retention from the questions your team and auditors will actually ask, rather than from whatever the job wizard defaults to.

Shorter retention lowers storage use

Fewer retained snapshots mean less capacity consumed on the Proxmox Backup Server datastore, and less data to verify, sync and replicate off-site. The cost is that the oldest restore point you can reach moves forward every day. Before shortening, check how long corruption or a ransomware dwell time could stay undetected in your environment, because a short window can leave only infected or already-damaged copies to choose from.

Longer retention widens restore choices

Keeping monthly or yearly points gives you older restore points for slow-surfacing problems, such as silent data corruption, a bad application release or a compromised account that was active for weeks. Each extra point adds deduplicated chunks that must be tracked and checked. Ask who reviews these long chains and how often, because a retention window nobody reviews is only a storage bill.

Protected backups can crowd out rotation

Marking backups as protected keeps them from pruning, which is useful for a known-good baseline or an audit snapshot. However, every protected backup stays in the datastore regardless of the keep settings. If protection accumulates without an owner and an expiry, the datastore can fill, and routine daily and weekly rotation then stops working. Set a review cadence and remove protection when the reason for it has passed.

Match retention to restore and audit needs

Start from concrete questions: how far back must a restore reach for operations, which records must be available for your regulator or internal audit, and how long an attacker could plausibly remain undetected. Write those answers down as retention periods, then map them to keep-daily, keep-weekly, keep-monthly and keep-yearly values. Confirm the requirements with your compliance owner and your auditors rather than assuming a default meets them.

How DeployOpen scopes backup retention work for Proxmox VE

DeployOpen scopes retention and protection as a fixed-scope piece of work, with scope, deliverables and timeline agreed in writing before any change is made to a backup job or datastore. The written scope is where the retention schedule, the protected snapshots and the restore tests are named, so that the people who own the backups and the people who will restore them agree on what "done" means. DeployOpen does not publish prices, and a quote follows from that written scope rather than from a rate card.

The engagement typically starts with an environment review: which Proxmox Backup Server datastores and backup jobs exist, which guests they cover, what each job's keep-last, daily, weekly, monthly and yearly values are, and whether any snapshots are already protected. The review also records who holds the credentials that can prune or delete snapshots and where any file-based storage limits apply. Configuration then follows the agreed schedule, and restore tests confirm that the retained points can actually be recovered. Each step is documented in a handover pack that the client's operations team can keep and audit.

Clients should confirm several items before requesting a quote: the number of backup jobs and datastores in scope, the retention periods their business or regulatory obligations require, the storage types behind each datastore, and who will receive the handover documentation. Whether a Proxmox VE subscription is in place, and which support tier applies, is a separate commercial question that the client should confirm with Proxmox directly. DeployOpen can describe what it will test and deliver, but it does not issue audit reports or attestations, so any evidence needed for an external assessment should be agreed with the assessor in advance.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.