Veeam Hardened Repository in v13: Build It from Scratch

Veeam v13 Series
Platform: Linux (Ubuntu 22.04, RHEL 8/9, Rocky Linux 8/9, AlmaLinux)
Applies to: Veeam Backup and Replication v13 (13.0.1+)
Hardened Repository Immutability VBR v13 Linux Ransomware Protection

What the Hardened Repository is and how immutability works

The Veeam Hardened Repository (VHR) is a Linux-based backup repository where backup files are set immutable after they are written. Immutable means that even root cannot delete, modify, or move those files until the immutability period you configure expires. This is enforced by the Linux kernel's chattr immutable flag, not by Veeam software alone. An attacker who compromises your VBR server, your backup server credentials, or even the root account on the Linux machine cannot delete the backup files while the flag is set. The Veeam Immutability Service checks and enforces the flag every 20 minutes.

This is different from object storage immutability like S3 Object Lock. The Hardened Repository is local or directly attached block storage on a Linux machine you control. No cloud dependency, no egress fees, full control over the hardware. It is the on-premises answer to immutable backups, and in v13 it has become significantly easier to deploy thanks to the Veeam Infrastructure Appliance option.

The authentication model in v13 also deserves a mention. When you add a Hardened Repository, you use single-use credentials for the initial deployment of Veeam Data Mover. After that, those credentials are discarded. VBR connects to the repository using certificate-based authentication instead of stored passwords. This means a credential theft from the VBR database does not yield usable access to the repository.

Hardware and OS requirements

For production use, size the Hardened Repository server with at least 8 CPU cores, 32 GB RAM, and dedicated storage. Shared storage between the OS and backup data is a management headache and a failure risk. Use at least two separate disks: one for the OS, one or more for backup data. The backup data disk should be dedicated block storage, not an NFS mount, not an SMB share. Veeam explicitly does not support NFS or CIFS as the underlying storage for a Hardened Repository.

For storage sizing, your target is raw capacity that can hold at minimum two full backup copies of your protected data, plus headroom for incremental chains and growth. A common starting point is protected data size multiplied by 1.5 to 2x for the data disk. Larger environments benefit from RAID 10 for the balance of performance and redundancy, or RAID 6 for better capacity efficiency when spinning disks are involved. RAID is configured at the hardware layer before the OS is installed.

Component Minimum (Veeam official) Recommended for production
CPU 2 cores 8 cores
RAM 2 GB 32 GB
OS disk 20 GB Dedicated SSD, 100 GB
Data disk Block storage only Dedicated RAID, sized to workload
Network 1 GbE Dual 10 GbE (redundant)
OS 64-bit Linux Ubuntu 22.04 LTS or Rocky Linux 9

Supported Linux distributions with advanced XFS integration in v13 include Ubuntu 20.04 and 22.04, RHEL 8 and 9, Rocky Linux 8 and 9, AlmaLinux 8 and 9, Debian 11 and 12, and SLES 15. Ubuntu 22.04 and Rocky Linux 9 are the most commonly deployed choices in production environments today.

Do not install Veeam Agent for Linux on this machine

Veeam Agent for Linux must not be present on a Hardened Repository server. The two components are explicitly incompatible. If you need to protect the Hardened Repository server itself, use a backup copy job that targets a separate repository, not an agent on the same machine.

Preparing the Linux server

Install your chosen Linux distribution with a minimal or server configuration. Do not install a desktop environment. After installation, apply all available security updates before you do anything else. The VHR is a security-critical machine and you do not want it to start life with outstanding kernel CVEs.

Security

Disable root SSH login and restrict access

Set PermitRootLogin no in /etc/ssh/sshd_config and enable key-based authentication. Create a dedicated non-root user account that VBR will use. This account does not need to be in the sudo group for general access. Veeam documents the specific granular sudo permissions this account needs. Grant only those permissions in the sudoers file using the NOPASSWD tag for those specific commands. Configure a firewall to allow inbound SSH only from your management subnet and inbound TCP 2500-3300 and 6160 only from your VBR server IP.

Account

Create the Veeam service account

Create a local Linux user account that VBR will use to connect. This account must use the bash shell, must not be a member of the wheel or sudo groups, and must not have a home directory on the backup data volume. Its sudo permissions come only from a specific drop-in sudoers file.

Create the account with bash as its shell and no group membership beyond its own primary group:

useradd -m -s /bin/bash veeamrepo

Set a password (VBR uses this for the initial connection only):

passwd veeamrepo

Confirm the account is NOT in the sudo or wheel group:

groups veeamrepo

Create the granular sudoers drop-in file that grants only the specific commands Veeam requires. Create /etc/sudoers.d/veeamsvc with the content from Veeam KB4667. The file covers all supported package managers (yum/dnf for RHEL-family, zypper for SUSE-family, dpkg for Debian/Ubuntu). At minimum it must contain entries for package management, service management, permission assignment, file removal, and the immutability flag operations. After creating the file, validate it with:

visudo -cf /etc/sudoers.d/veeamsvc

A clean output means the syntax is valid. Any syntax error in this file can lock you out of sudo on the machine, so always validate before saving. After the Hardened Repository is configured in VBR, VBR discards the stored credentials and switches to certificate-based authentication.

Partitioning and formatting with XFS

XFS is Veeam's recommended file system for Hardened Repositories for two reasons. First, it supports immutable file attributes via chattr, which is the kernel mechanism Veeam relies on. Second, XFS supports block cloning (reflinks), which allows Veeam to create synthetic full backups without actually duplicating data on disk. The space savings from block cloning can be substantial, especially when you have a lot of incremental backups referencing the same base data blocks.

Step 0 — Prerequisites

Install required packages (all distros)

Before partitioning, install XFS tools and the attr package. The attr package provides lsattr and chattr, which Veeam uses to set and verify the immutable flag.

RHEL / Rocky Linux / AlmaLinux / Oracle Linux: dnf install xfsprogs attr -y

Ubuntu / Debian: apt-get install xfsprogs attr -y

SLES / openSUSE: zypper install xfsprogs attr

Step 1

Identify and partition the backup data disk

Confirm the device name of your backup disk. Never assume — run lsblk first and confirm which device is the dedicated backup disk before touching anything:

lsblk

Create a GPT partition table and a single partition spanning the full disk. Substitute /dev/sdb with your actual device name:

parted /dev/sdb --script mklabel gpt

parted /dev/sdb --script mkpart primary xfs 0% 100%

Confirm the partition exists:

lsblk /dev/sdb

Step 2

Format with XFS

Format the partition. The -f flag forces the format if the device already has any filesystem signature. For SATA/SAS use /dev/sdb1; for NVMe use /dev/nvme1n1p1:

mkfs.xfs -f /dev/sdb1

Record the UUID Veeam will need for the fstab entry:

blkid /dev/sdb1

Step 3

Mount and configure the backup directory

Create the mount point:

mkdir -p /mnt/veeam-backup

Add a persistent fstab entry. Open /etc/fstab and add the following line, replacing the UUID value with the one from blkid:

UUID=<your-uuid> /mnt/veeam-backup xfs defaults,noatime 0 2

Mount and verify:

mount -a

df -h /mnt/veeam-backup

Create the Veeam data subdirectory and set ownership and permissions. The directory must be owned by the Veeam service account with mode 0700. No sticky bit — Veeam explicitly prohibits it:

mkdir -p /mnt/veeam-backup/veeamdata

chown veeamrepo:veeamrepo /mnt/veeam-backup/veeamdata

chmod 0700 /mnt/veeam-backup/veeamdata

Verify the result — you should see drwx------ owned by veeamrepo:

ls -la /mnt/veeam-backup/

Adding the Linux server to VBR

Before you can add the Hardened Repository, the Linux machine must be added as a managed Linux server in VBR. Go to Backup Infrastructure, right-click Managed Servers, select Add Server, and choose Linux. Enter the FQDN or IP address of the machine. On the credentials step, select or add the SSH credentials for the Veeam service account you created. VBR will connect and deploy the required components. During this step, VBR uses the credentials to install Veeam Data Mover and Veeam Installer Service. After this step, the credentials are stored in VBR's credential manager but will be used as single-use credentials once the Hardened Repository is configured.

Adding the Hardened Repository in VBR

Step 1

Launch the New Backup Repository wizard

Go to Backup Infrastructure, expand Backup Repositories, right-click and select Add Backup Repository. In the type selection, choose Hardened Repository. Give it a descriptive name.

Step 2

Select the server

On the Server step, click Choose and select the Linux server you just added. VBR will connect to it and retrieve disk information.

Step 3

Configure repository settings

Click Populate to load the disk and folder list. Navigate to the backup directory you created on the XFS volume. Enable the Use fast cloning on XFS volumes checkbox. This activates reflink-based synthetic full backups and is the primary reason you formatted with XFS. Set the Immutability period. This is the number of days that backup files will be locked after they are written. A minimum of 7 to 14 days is a good starting point for ransomware protection. Set it higher if your compliance requirements demand a longer period. Click Advanced to review the per-task limit and adjust if needed.

Step 4

Set the mount server

Select the mount server for file and application item restores. This should be a Windows machine near the repository. It does not run on the Linux machine itself.

Step 5

Apply and finish

Click Apply. VBR will configure the repository, validate the directory permissions, and confirm that immutability can be set on files in that path. If there are permission issues with the backup directory, the wizard will report them here. Fix any reported issues and retry. After Apply completes, click Finish.

Targeting backups at the Hardened Repository

With the repository added, target your backup jobs at it the same way you would any other repository. In the job wizard, select the Hardened Repository as the backup repository on the Storage step. There is one important constraint: the only permitted backup methods are Forward Incremental with active full, and Forward Incremental with synthetic full. Reverse incremental and Forever Forward Incremental are not compatible with immutable repositories because they require modifying backup files after the fact, which the immutability flag prevents.

Set your active full or synthetic full schedule. Weekly synthetic fulls are the most common configuration. Each synthetic full benefits from XFS reflinks, so the space cost of a synthetic full on a properly configured Hardened Repository is much lower than on a standard repository.

Backup copy jobs and GFS

If you want immutability on backup copy jobs targeting the Hardened Repository, you must enable the GFS (Grandfather-Father-Son) retention policy on the backup copy job. Immutability for backup copy jobs requires GFS. Standard retention backup copy jobs targeting a Hardened Repository do not have immutability applied to them.

Verifying immutability is active

After the first backup job runs to the Hardened Repository, you can verify that immutability is working by SSHing to the Linux machine and checking file attributes on a backup file. Use lsattr on a .VBK or .VIB file in the backup directory. The output should include the i flag, which is the immutable attribute. A file with this flag set cannot be deleted or modified even by root until the flag is cleared, which only happens when the Veeam Immutability Service determines the immutability period has expired.

In the VBR console, you can see the immutability expiry date for each restore point by right-clicking a backup in the inventory and selecting Properties. The immutability expiry date will be listed alongside the standard restore point metadata.

Limitations to know before going to production

A few constraints that catch people off guard. VBM metadata files are not immutable. The .VBM file for each backup chain is updated on every job run, so immutability cannot be applied to it. This does not compromise the protection on the actual backup data files (.VBK and .VIB), but it is worth knowing. Symlinks in the backup directory path are not supported. The repository path must be a direct path to a real directory. The Hardened Repository cannot be shared between two different VBR servers. One VBR installation owns it. If you add it to a second VBR server, backups from the first will fail. Use a Scale-Out Backup Repository with multiple extents if you need to spread backup load across multiple repositories managed by one VBR server.

The immutability period cannot be shortened after it is set. It can only be extended. Think carefully about the period you configure before writing the first backups. A 30-day immutability period means that even if you want to free up space urgently, you cannot delete those files for 30 days.

What you have set up
  • Dedicated Linux server with XFS-formatted backup data disk
  • SSH hardened, firewall restricted, sudo-limited Veeam service account
  • Hardened Repository registered in VBR with immutability period configured
  • Fast cloning on XFS enabled for space-efficient synthetic fulls
  • Backup jobs targeting the repository with forward incremental method
  • Immutability verified with lsattr on backup files

The Hardened Repository is the most important component in a modern Veeam architecture that does not have it yet. Every article in this series has mentioned it at least once. Now you have a dedicated guide for it. The setup is not complicated, but the Linux preparation steps matter more than the VBR wizard. Get the XFS formatting, directory permissions, and SSH lockdown right, and the wizard takes five minutes. Skip those steps and you will spend time debugging permission errors and wondering why immutability is not being applied.

Read more