Back up a Windows VPS

Decide what to back up, copy it with Robocopy or Windows Server Backup, keep a copy off the server and test your restores.

  • Intermediate
  • Windows VPS · Admin RDP
  • 3 min read

By RunRacks Team · Published

A backup only protects you if a copy lives somewhere other than the server itself. This guide covers the built-in Windows tools and a simple, reliable routine you can set up today.

What to back up

  • Your own files: documents, website folders, scripts and settings.
  • Database backups (.bak files from SQL Server, not the live database files).
  • Program data that is hard to rebuild, for example a MetaTrader data folder with your EAs, indicators and templates (File → Open Data Folder in the terminal).

Option 1: copy folders with Robocopy

Robocopy is built into Windows and copies only changed files. This mirrors a folder to a second drive or a network share:

PowerShell
robocopy "C:\inetpub\example" "D:\Backup\example" /MIR /R:2 /W:5 /LOG:"D:\Backup\robocopy.log"

Run it every night with Task Scheduler.

Option 2: Windows Server Backup

Windows Server Backup can back up whole volumes or the full system on a schedule. Install it first:

PowerShell
Install-WindowsFeature -Name Windows-Server-Backup -IncludeManagementTools

Then open wbadmin.msc and choose Backup Schedule or Backup Once. A one-off backup of C: to D: from the command line:

PowerShell
wbadmin start backup -backupTarget:D: -include:C: -allCritical -quiet

On Windows 10/11, use File History (Settings → Backup or Control Panel → File History) for your user folders.

Get a copy off the server

A backup on the same server will not help if the server is reinstalled or its disk fails. At least weekly, copy your backups to:

Snapshots

If your plan includes snapshots, take one in the control panel before big changes such as major updates or software upgrades. Treat it as a quick way back, alongside your file backups rather than instead of them.

Test a restore

Once a month, restore a file or a database backup to a test folder and open it. A backup you have never restored is a guess.

Troubleshooting

  • Robocopy exit code 1–7: these are success codes (files copied, extra files, and so on). Codes of 8 and above mean something failed; check the log.
  • wbadmin cannot use the target: the target must be a different volume from the one being backed up.

Next steps

Was this guide helpful?

Still stuck?

Ask RunRacks AI for a quick answer, or open a ticket and our team will take a look at your server.

Windows VPS & RDP

Allow or block multiple RDP sessions for one user

Understand why a new Remote Desktop login takes over your old session, how the single-session policy works on Windows Server, and which setting suits a team.

  • Advanced
  • Windows VPS
  • 5 min read