How to back up a Windows Server VPS
For Windows VPS backup, three tools work together inside the system: Windows Server Backup, which ships with Windows Server, the free edition of Veeam Agent for Microsoft Windows, and Robocopy. This guide shows how to set them up, send a copy off the server and test a restore. The automatic backup option in the client area has its own guide.
Choose your method
A sound strategy follows the 3-2-1 rule: three copies of the data, on two different media, one of them off the server.
| Method | What it backs up | Full system restore | Use |
|---|---|---|---|
| Windows Server Backup | System, volumes or folders | Yes | Native backup to a network share |
| Veeam Agent Free | Entire computer, volumes or files | Yes | Full backup with a clear interface |
| Robocopy | Selected folders | No | Light copy of critical files, as an extra |
The client area also offers an automatic backup option. Every night, it makes a full copy of the VPS, kept off the server and restorable from the Backups tab of the VPS page. The guide How to set up automatic VPS backups explains how to add it. The methods in this guide come on top, to keep your own copies.

Back up with Windows Server Backup
Windows Server Backup ships with Windows Server, from 2016 to 2025. It makes full, volume or folder backups and allows a full system restore. Its target must sit outside the disk being backed up. On a VPS, this is usually a network share, for example on another of your servers linked by the How to connect two VPS over a private network.
Install the feature
Install-WindowsFeature Windows-Server-Backup -IncludeManagementTools
Get-WindowsFeature Windows-Server-Backup
The Install State line should read Installed. No restart is needed. Until it is installed, the wbadmin.msc console shows the message below.

Schedule a backup
Windows labels are quoted in English, the language of the delivered system. In wbadmin.msc, click Backup Schedule… in the right-hand pane. Choose Full server, then Once a day at the time you want, and the Back up to a shared network folder destination.
On the command line, give an account that can write to the share. Replace the address, share and credentials with yours.
wbadmin enable backup -addtarget:\\203.0.113.20\Backups -schedule:02:00 -include:C: -allCritical -user:backupuser -password:Ch@ngeMe-Now! -quiet
On a network share, each backup overwrites the previous one. If a backup fails, you may end up with no valid copy. Keep another copy, for example with the client area option.
The same schedule also exists in PowerShell, with the system state and full system recovery.
$Policy = New-WBPolicy
Add-WBSystemState $Policy
Add-WBBareMetalRecovery $Policy
$BackupLocation = New-WBBackupTarget -NetworkPath "\\203.0.113.20\Backups" -Credential (Get-Credential)
Add-WBBackupTarget -Policy $Policy -Target $BackupLocation
Set-WBSchedule -Policy $Policy -Schedule 02:00
Set-WBPolicy -Policy $Policy
Run a one-off backup
wbadmin start backup -backupTarget:\\203.0.113.20\Backups -include:C: -allCritical -quiet
-backupTarget gives the share path, -include the volumes to back up. -allCritical adds every volume needed to restore the system. -quiet skips confirmations, which helps in a script. Separate several volumes with a comma.
wbadmin start backup -backupTarget:\\203.0.113.20\Backups -include:C:,D: -allCritical -quiet
Restore files
List the available backups, then restore a folder using the version identifier shown.
wbadmin get versions
wbadmin start recovery -version:11/04/2026-02:00 -itemType:File -items:C:\inetpub\wwwroot -recursive -recoveryTarget:C:\Restore
A full system restore boots from the Windows Server installation media, through Repair your computer › Troubleshoot › System Image Recovery. On a VPS, open a ticket to find out how to boot from this media.
Back up with Veeam Agent Free
Veeam Agent for Microsoft Windows has a free edition that needs no license. It backs up the entire computer live through VSS, without stopping the server. According to Veeam's documentation, it has two limits: a single backup job, and a target that is a local drive, a shared folder or a Veeam repository. Direct backup to object storage (S3) is reserved for the paid editions.
Install Veeam Agent
Download the installer from veeam.com. A free account is required.
Run
VeeamAgentWindows_x.x.x.exeas administrator, accept the license and click Install.Restart if the installer asks you to. The Veeam icon appears in the notification area.
Create the backup job
Right-click the Veeam icon, then Configure backup.
In Name, give a clear name, for example
VPS-Full.In Backup Mode, choose Entire Computer.
In Destination, choose Shared folder and enter the network share and its credentials.
Keep 7 restore points, or 14 if space allows.
In Schedule, tick the daily backup and choose the time, for example 02:00. Click Finish.
For an off-server copy to S3 storage, send the backup folder with rclone afterwards, as explained below.
Restore with Veeam
For files, right-click the Veeam icon, then Restore › Individual files. Choose the restore point and copy the files you need.
For a full restore, create the recovery media in advance with Create Recovery Media, as an ISO file. The VPS must then boot from this ISO, after which you choose Bare Metal Recovery and the restore point. Open a ticket to find out how to boot the VPS from your ISO.
Copy folders with Robocopy
Robocopy, which ships with Windows, copies and synchronizes folders. It does not replace a system backup, but it suits configurations, application data or database exports, on top of Windows Server Backup or Veeam.
The backup script
Save this script as C:\Scripts\robocopy-backup.bat. It copies C:\inetpub\wwwroot to C:\Backups\wwwroot and writes a dated log. Create the C:\Backups\logs folder before the first run, and adjust SOURCE and DEST.
@echo off
:: Robocopy backup of a website folder
SET SOURCE=C:\inetpub\wwwroot
SET DEST=C:\Backups\wwwroot
for /f %%i in ('powershell -NoProfile -Command "Get-Date -Format yyyyMMdd"') do set TODAY=%%i
SET LOG=C:\Backups\logs\robocopy_%TODAY%.log
robocopy "%SOURCE%" "%DEST%" ^
/MIR ^
/R:3 ^
/W:10 ^
/LOG:"%LOG%" ^
/TEE ^
/NP ^
/NDL
:: A code below 8 means no copy failed
IF %ERRORLEVEL% LSS 8 (
echo Backup OK >> "%LOG%"
) ELSE (
echo Backup ERROR - code %ERRORLEVEL% >> "%LOG%"
)
| Option | Effect |
|---|---|
/MIR | Mirror: copies new files, updates changed ones and deletes those removed from the source |
/R:3 | Three retries if a file fails |
/W:10 | Wait between two retries |
/LOG: | Writes the result to the dated log |
/TEE | Also shows the result in the console |
/NP, /NDL | Lighter log (no progress, no folder names) |
With
/MIR, a deletion in the source is carried over to the copy. A Robocopy copy therefore does not protect against accidental deletion. Also keep dated backups.
Schedule the script
This command creates a daily task at 03:00, run under the SYSTEM account, with no password to store. /f replaces the task if it already exists.
schtasks /create /tn "Robocopy-Backup-wwwroot" /tr "C:\Scripts\robocopy-backup.bat" /sc DAILY /st 03:00 /ru SYSTEM /f
With the GUI, open taskschd.msc, click Create Basic Task, name the task, choose Daily at 03:00, then Start a program with the script path. In its properties, tick Run whether user is logged on or not.
Read the log and exit codes
Get-Content "C:\Backups\logs\robocopy_20261104.log" | Select-String "ERROR|New File|Newer"
| Code | Meaning |
|---|---|
| 0 | Nothing to copy, source and destination identical |
| 1 | Files copied without error |
| 2 | Extra files in the destination, nothing copied |
| 3 | Files copied and extra files present, no error |
| 4 to 7 | Mismatches between source and destination, no failed copy, worth checking |
| 8 and above | At least one copy failed (16: serious error, nothing copied) |
According to Microsoft, a code below 8 means no copy failed. From 8 upwards, look for ERROR lines in the log.
Send a copy off the server
Ransomware encrypts everything the server can reach, including mounted network shares. A copy in versioned object storage, out of the server's reach, protects against this, against a mistake that spreads and against losing the server.
Backblaze B2 and Wasabi are two S3-compatible storage services with regions in Europe. With Backblaze B2, setup takes three steps.
Create an account at backblaze.com and choose the storage region. In Buckets, click Create a Bucket, give it a unique name, for example
vps-backups, and leave it Private. Keep the default Keep all versions of the file rule.In Application Keys, click Add a New Application Key and limit it to this bucket. Note the
keyIDand theapplicationKey, shown only once, as well as the bucket's S3 endpoint, in the formhttps://s3.<region>.backblazeb2.com.Install rclone on the VPS, declare this storage with
rclone config, then send your backups.
rclone sync C:\Backups backblaze-b2:vps-backups/robocopy --progress
The guide Rclone: cloud synchronization covers rclone configuration in detail. The commands are the same on Windows.
Test a restore
A backup that has never been tested may turn out to be unusable on the day you need it. Every month, run these checks.
Read the Windows Server Backup, Veeam and Robocopy logs, and look for errors since the last check.
Restore one file, for example a configuration, and check its content.
Check that the backups are there, with
wbadmin get versionsfor Windows Server Backup and the Veeam control panel for Veeam.Watch free space on the destination. Act before it is 80% full.
Once a year, test a full restore on a test machine, never on production.
If your VPS has the client area backup option, the nightly copy is your safety net during a test. If something goes wrong, restore it from the Backups tab. To test a full restore, a second Windows VPS can take the backup while you check that the services start.
Fix common errors
0x80070005, access denied (Windows Server Backup)
The message says "Access is denied". The backup service has no rights on the destination. Grant them on the local folder, or check that the account used can reach the share and has the NTFS rights.
icacls "C:\Backups" /grant "NETWORK SERVICE:(OI)(CI)F"
icacls "C:\Backups" /grant "SYSTEM:(OI)(CI)F"
Veeam "Failed to create snapshot"
The Volume Shadow Copy service (VSS) or one of its writers is failing. List the writers, then restart the VSS services.
vssadmin list writers
net stop vss
net stop swprv
net start swprv
net start vss
If a writer is in the Failed state, restart the related service, for example SQL Server for SQL Server VSS Writer.
Robocopy ERROR 5, access denied
The account running the script cannot reach the source folder. Run the task as SYSTEM or grant read rights.
schtasks /change /tn "Robocopy-Backup-wwwroot" /ru SYSTEM
icacls "C:\inetpub\wwwroot" /grant "SYSTEM:(OI)(CI)R"
"The network path was not found" (0x80070035)
The network share is unreachable, because of the firewall, a missing share or rejected credentials. Test access to the share, then check that port 445 is open on the machine that hosts it and that its Server service is running.
net use \\203.0.113.20\Backups /user:backupuser Ch@ngeMe-Now!
Get-Service LanmanServer
The guide How to open a port in Windows Firewall on a VPS explains how to open port 445 to a single address.
Need help?
Open a ticket from Tickets › Open a Ticket, or from the Contact support tile at the bottom of the VPS page. In the Related Service field, pick the VPS so the team saves time. You can also ask your question on the OuiHeberg Discord.
Windows Server 2025 with the license included, Remote Desktop access and management from the client area.
View plans →