The Veeam Hardened Repository wizard ends with a green tick, and most teams think the job ends there. It doesn’t. As long as the repository server’s root account, management card, SSH and time source stay open, the attacker’s route around immutability stays open too. The steps below go through the setup in order, from choosing hardware and preparing XFS to adding with single-use credentials and hardening the server, with a verification test for each stage.
The hardened repository’s protection model
The model rests on three ideas. First, the backup server doesn’t connect to the repository with root or a permanent administrator identity. The repository is added only with single-use credentials used during installation and not written to the Veeam Backup & Replication database; after that, communication runs through the Veeam Data Mover service installed on the repository over a certificate-based connection. Second, Linux’s immutable (i) attribute is set on written backup files. This attribute prevents the file from being deleted, renamed or overwritten for everyone, including root; only a process with the CAP_LINUX_IMMUTABLE capability, in practice root, can remove the attribute. Third, the component that sets the attribute and removes it when the period expires runs locally on the repository server; a delete request from the console isn’t carried out before the period expires.
The risk the model closes is the compromise of the backup console or backup server. The risk it doesn’t close is someone reaching root on the repository server. Root can remove the attribute with chattr -i, format the file system, or move the system clock forward to make the period appear expired. That’s why all the hardening steps below work toward a single goal. Closing every path to root. For a comparison of the technology with other options, see the immutable backup options article.
Hardware and operating system requirements
The repository server should be single-purpose: no other applications, shares, monitoring agents or management tools on it. Every extra service is a new door to root.
| Component | Recommended | To avoid |
|---|---|---|
| Server type | Physical server | A virtual machine on the production hypervisor |
| Storage | Local disks or a directly attached (DAS) disk enclosure | A SAN/NAS volume other systems can manage |
| RAID | Hardware RAID with cache and battery/flash protection | Heavy writes with software RAID without a cache |
| Operating system | A current 64-bit distribution supported by Veeam | A version not on the support list or past end of life |
| Management card | iLO/iDRAC/IPMI on a separate network with a strong local password | A card on the production network accessed with domain credentials |
The list of supported distributions and versions changes with the Veeam version; before installing, check the system requirements page for the Veeam Backup & Replication version you use. Veeam also offers a ready-made, ISO-based installation option for the hardened repository; if you choose this route, verify its support status and limitations in the current documentation. If a virtual machine is unavoidable, the hypervisor hosting the repository should also be a system independent of production, managed with separate credentials. Otherwise the hypervisor administrator deletes the virtual disk and the protection ends.
Preparing the disk, XFS and the user
For fast clone (block cloning), the backup volume must be formatted with XFS and with reflink enabled. Reflink is decided when the file system is created. It can’t be turned on later. The example assumes the backup disk is /dev/sdb; before running the command, make sure with lsblk that you’ve selected the right disk; running mkfs on the wrong disk is one of the most expensive mistakes in the field.
# Partition and file system
sudo parted -s /dev/sdb mklabel gpt mkpart primary xfs 0% 100%
sudo mkfs.xfs -b size=4096 -m reflink=1,crc=1 /dev/sdb1
# Persistent mount
sudo mkdir -p /mnt/veeam
echo "UUID=$(sudo blkid -s UUID -o value /dev/sdb1) /mnt/veeam xfs defaults 0 0" | sudo tee -a /etc/fstab
sudo mount -a
xfs_info /mnt/veeam | grep reflink # should show reflink=1
# Repository user and folder
sudo useradd -m -s /bin/bash veeamrepo
sudo passwd veeamrepo
sudo mkdir -p /mnt/veeam/backups
sudo chown veeamrepo:veeamrepo /mnt/veeam/backups
sudo chmod 700 /mnt/veeam/backups
The repository user shouldn’t be root. While adding the repository, Veeam meets this user’s temporary need for elevated rights through sudo. On Ubuntu, add the user temporarily to the sudo group; you’ll take this right back once the addition is done:
sudo usermod -aG sudo veeamrepo # only while adding the repository
# ... after the repository has been added:
sudo gpasswd -d veeamrepo sudo
id veeamrepo # the sudo group shouldn't be listed
Adding with single-use credentials
When adding a new Linux server under Backup Infrastructure in the backup console, choose single-use credentials as the credential type. The username and password entered are used only for installing the Data Mover and the certificate exchange, and aren’t written to the database. The option to elevate privileges automatically should be checked in the wizard; once the user is removed from the sudo group, this option no longer has any effect.
After adding the server, choose the “Hardened Repository” type in the Backup Repository wizard, point to /mnt/veeam/backups as the path, and check that the fast clone option is enabled. If the wizard doesn’t see XFS reflink support, go back to disk preparation; otherwise synthetic full backups are written as full-size copies and the capacity plan collapses within a few weeks.
- Add the Linux server with single-use credentials.
- Create the repository as the Hardened Repository type and enter the immutability period.
- Remove the repository user from the sudo group, change its password and record it securely.
- Turn off the SSH service (see the hardening section below).
- Verify in the console that the repository status looks healthy and that a test job completed successfully.
Immutability setting and verification
The “make recent backups immutable for the specified number of days” option in the repository settings ensures each new backup file stays locked for at least this long. To keep the chain restorable, Veeam keeps the full backup locked until the newest incremental backup tied to it expires. The actual lock period is often longer than the configured value, and capacity should be calculated accordingly. On an immutable repository, jobs should run with the forward incremental method and periodic synthetic or active full backups; the reverse incremental method can’t be used with this repository.
Don’t set the period by looking at capacity alone. The period should be enough for the attack to be noticed and for a clean recovery point to be searched for backwards. This search process is explained in detail in the choosing a clean recovery point article.
When the first job completes, test the protection in place. Do the test from the server’s local console; don’t open SSH just for this test.
# Check the attribute: the flags field should show "i" (e.g. ----i---------e-------)
sudo lsattr -R /mnt/veeam/backups | grep -E "\.(vbk|vib)$"
# Delete attempt as the repository user: should be refused
sudo -u veeamrepo rm /mnt/veeam/backups/<job-folder>/<file>.vbk
# rm: cannot remove '...': Operation not permitted
# Deletion should be refused as root too; chattr -i is needed first (that's why root must be protected)
sudo rm /mnt/veeam/backups/<job-folder>/<file>.vbk
Then try deleting an unexpired backup from the console with “Delete from disk”; the operation should fail because of immutability. These two tests show the protection works at both the operating system and console levels. Keep the outputs as audit evidence. Untested protection is an assumption.
Server hardening: SSH, local access, time source
SSH and network access
In day-to-day operation, the backup server talks to the repository through the Data Mover and doesn’t need SSH. After adding the repository, turn off SSH and, in the local firewall, allow only Veeam traffic and only from the necessary sources. Veeam’s Linux components use TCP 6162 for the Data Mover control connection and the TCP 2500–3300 range for data transfer; verify the list for your environment in your version’s port reference.
sudo systemctl disable --now ssh
sudo systemctl disable --now ssh.socket # if Ubuntu 22.10+ uses socket activation
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow from 10.20.30.10 to any port 6162 proto tcp # backup server
sudo ufw allow from 10.20.30.0/28 to any port 2500:3300 proto tcp # proxy servers
sudo ufw enable
sudo ufw status verbose
In situations such as a Data Mover update or re-adding the server, SSH and sudo rights may need to be opened temporarily. Do this with a change record and with two people aware; when the work is done, close both again. SSH left open with “I’ll close it later” is a gap we often find.
Local access and the management card
Once SSH is closed, the paths to root are the local console and the management card. Move the management card (iLO, iDRAC, IPMI) to a management network separate from production, manage it with a local account with a strong password rather than domain credentials, and turn off virtual media and the remote console if not needed. Set a BIOS/UEFI password, disable booting from external media and define a GRUB password; otherwise someone can switch to single-user mode and reset the root password. The root and repository user passwords should be kept not in an everyday vault but in a separate vault where access is logged.
Time source
The immutability period is calculated from the system clock. Someone who can move the clock forward creates the impression that the period has expired. Connect the server only to internal NTP sources you trust and that an attacker can’t influence, and monitor large clock jumps. If you use chrony, regularly check the source and drift with the output of chronyc tracking and chronyc sources -v. Making the domain controller the only time source means the repository is also affected when the domain goes down.
Updates
The repository server should keep receiving security updates. Automatic security updates can be turned on; restarts after kernel updates should be planned, and the repository status and attributes checked afterwards. The general hardening approach on the server side is part of system and server hardening work.
Common mistakes and a checklist
A picture we often run into is an installation that’s technically successful but where protection remains weak in practice from an enterprise cybersecurity standpoint:
- The repository user staying in the sudo group: Someone who takes over the Data Mover or knows the user’s password becomes root.
- SSH left open: Password-based SSH exposes the repository to brute-force and credential reuse attacks.
- XFS without reflink: Synthetic fulls are written at full size, capacity runs out much faster than planned; the fix is reformatting the volume.
- The management card on the production network: The root password can be reset through boot intervention from the remote console.
- A short immutability period: An attacker who stays in the environment unnoticed waits for the lock to expire and deletes the backups from the console.
- No test done: It has never been verified that the attribute is really set.
Post-installation checklist:
- The server is physical, single-purpose and not a domain member.
reflink=1appears in thexfs_infooutput.- The repository user isn’t root and isn’t in the sudo group.
- The repository was added with single-use credentials; no credentials for the repository are stored on the backup server.
- SSH is off; the local firewall allows only Veeam ports from the backup server and proxies.
- The management card is on a separate network and protected with a local account; BIOS and GRUB are password-protected.
- The NTP source is trusted and clock drift is monitored.
- The
iattribute and refusal of the delete attempt were verified withlsattr, and the result is on record.
Hardening the repository is part of the job; the backup server itself also needs to be separated from the domain and production identities. This design is in the identity isolation in backup infrastructure article. Reviewing your existing repositories together against this list is within the scope of our backup security and ransomware readiness work. The primary source for product-specific details is the Veeam Hardened Repository documentation. To tie the isolated copy to a working recovery scenario, define the test and verification steps in the design of your backup and disaster recovery infrastructure.
Frequently asked questions
Can a hardened repository be set up as a virtual machine?
Technically it works, but the protection model weakens. A hypervisor administrator can delete the virtual disk, revert to an older state from a snapshot, or reset the root password from the console. For immutability to be meaningful, choose a separately managed physical server with local disks.
Can SSH be turned off completely after adding the repository?
Yes, SSH isn’t needed in day-to-day operation; the backup server talks to the Data Mover service over a certificate-based connection. You may need to open SSH temporarily when the Data Mover needs updating or the credentials need re-entering. Because this need varies by version, check the documentation for your version.
Can a backup file be deleted before the immutability period expires?
Not from the console or with the repository user; the files have the Linux immutable attribute. Someone who reaches root can remove the attribute. The strength of the protection depends on how well the root account, the local console and the management card are protected.
Why is XFS reflink required for fast clone?
Reflink lets synthetic full backups share existing blocks by reference instead of copying unchanged blocks. This both shortens the synthetic full backup time and lowers the capacity consumption of chains that stay locked for a long time. Reflink must be enabled when the file system is created; it can’t be added later.