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
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 (
.bakfiles 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:
robocopy "C:\inetpub\example" "D:\Backup\example" /MIR /R:2 /W:5 /LOG:"D:\Backup\robocopy.log"/MIR makes the destination an exact mirror, including deletions. If a file is deleted or encrypted by malware at the source, the next run removes it from the copy too. Keep dated copies or a second, off-server copy as well.
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:
Install-WindowsFeature -Name Windows-Server-Backup -IncludeManagementToolsThen open wbadmin.msc and choose Backup Schedule or Backup Once. A one-off backup of C: to D: from the command line:
wbadmin start backup -backupTarget:D: -include:C: -allCritical -quietOn 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:
- your own computer (how to transfer files), or
- cloud storage you control, or
- another server.
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.
Related guides
Windows VPS & RDP
RunRacks RDP port 12230: how to connect to your Windows VPS and Admin RDP
RunRacks Windows VPS and Admin RDP servers accept Remote Desktop on port 12230, not 3389. Here is how to connect from every device and keep the port open.
- Beginner
- Windows VPS · Admin RDP
- 5 min read
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
Windows VPS & RDP
Create Windows users with Remote Desktop access
Give each person their own Windows login, add them to Remote Desktop Users, test the account and remove access cleanly later.
- Beginner
- Windows VPS · Admin RDP
- 2 min read