Back Up a Windows VPS from the Command Line
Back up a Windows VPS from PowerShell and wbadmin: system state, selected files, and scheduled jobs you can restore without opening Server Manager.
Netbay Engineering
Netbay Engineering
On this page
A Windows VPS without a backup is a High-Speed SSD with a timer on it. Disk snapshots at the panel, if you use them, are not a substitute for an application-aware backup you can restore a single folder from. Windows Server Backup (wbadmin and the WB PowerShell module) talks to VSS, can include system state, and runs from Task Scheduler. You can do the whole loop without Server Manager.
The rule is the same as anywhere else: backup is not the job, restore is the job. A backup that has never been restored is a story you tell yourself. Keep the backup target off C:, copy the result off the guest, and rehearse a file restore before you need a bare-metal one.
Install the feature and pick a target
Windows-Server-Backup is not always installed. Add it. The backup target should be a second volume or a network path you control. Backing up C: onto C: fails in obvious ways when the volume fills. A second virtual disk on the same guest is better than nothing and worse than a copy that leaves the machine. Budget the target at least as large as the used data plus VSS overhead.
Install-WindowsFeature -Name Windows-Server-Backup -IncludeManagementTools
Get-WBVolume | Format-Table VolumePath, FileSystem, UsedSpace, FreeSpace
vssadmin list writers
wbadmin get versions
New-Item -ItemType Directory -Path 'E:\backups' -Force
wbadmin start backup -backupTarget:E: -include:C:\inetpub,C:\apps -allCritical -quiet
wbadmin get versions-allCritical includes system state and volumes needed to recover the OS. -include adds extra folders. -quiet skips prompts, which is what you want in a scheduled task. If E: does not exist, attach a second disk in the panel, initialize it in Disk Management or Initialize-Disk, format NTFS, and assign E:. Do not format C: while you figure that out.
vssadmin list writers should show SQL, IIS, and the system writers as Stable. A writer in Failed means this backup will lie about that application. Reboot once after a failed writer if the service looks fine; if it stays Failed, fix that app before you trust the backup.
Policy objects for repeatable jobs
wbadmin is enough for a one-shot. For a scheduled job you can inspect, use the WB cmdlets. New-WBPolicy is a document: file specs, target, optional bare metal, optional system state. Start-WBBackup runs it now. Set-WBSchedule writes a time of day. Keep one policy you understand rather than five overlapping tasks.
$Policy = New-WBPolicy
$Inet = New-WBFileSpec -FileName 'C:\inetpub'
$Apps = New-WBFileSpec -FileName 'C:\apps'
Add-WBFileSpec -Policy $Policy -FileSpec $Inet
Add-WBFileSpec -Policy $Policy -FileSpec $Apps
Add-WBSystemState -Policy $Policy
$Target = New-WBBackupTarget -VolumePath 'E:'
Add-WBBackupTarget -Policy $Policy -Target $Target
Set-WBPolicy -Policy $Policy
Set-WBSchedule -Policy $Policy -Schedule 02:30
Start-WBBackup -Policy $Policy -Force
Get-WBJob -Previous 1 | Format-List
Get-WBBackupSet | Format-Table BackupTime, BackupTarget, VersionId02:30 local should sit outside the IIS busy hours and outside the Windows Update window you already picked. Do not schedule backup, update, and reboot in the same 20 minutes. VSS will lose.
After the job, copy E:\WindowsImageBackup (or your target layout) to another machine you own. rclone, robocopy over a scoped SMB share, or an off-box disk all work. Netbay is not an object-storage product; treat off-box as your problem. A second VPS in Lucknow you copy to with robocopy is a valid 2-of-3 if the first guest dies.
Restore a file before you restore the world
wbadmin start recovery can restore files, volumes, or system state. Practice a single-file restore into a staging folder. If you cannot restore C:\inetpub\wwwroot\site\index.html to C:\restore-test, you do not have a backup.
Keep at least two versions. A backup that ran after a ransomware event or a bad deploy is a snapshot of the mistake. Retention is a folder-management problem on E: and on the off-box copy. wbadmin get versions is the index. Delete old sets on purpose, not when the volume hits 0 bytes free in the middle of a job.
Bare-metal recovery needs the Windows recovery environment and is slower than people expect on a VPS. For a single guest, rebuilding Server 2022 and restoring C:\apps plus IIS config is often faster. That only works if you actually included those paths. System state matters if you customized local users, certs, and IIS heavily.
What this does not cover
This is not a SQL Server maintenance plan. Use native SQL backups for databases, then include the .bak files in the file spec. This is not a domain controller system-state religion on a singleton VPS; you should not be running AD as your public web box. This is not an excuse to skip application-level export of TLS certs you cannot reissue.
Takeaway
Install Windows Server Backup, send VSS-aware jobs to a volume that is not C:, copy off-box, and restore a file on purpose. Schedule around patching, not on top of it. You can attach a second disk to a Windows VPS on Netbay in Lucknow and run wbadmin on High-Speed SSD the same day you provision, starting at netbayhosts.in.
Keep reading
Follow along on a real VPS
Deploy Linux in under 60 seconds
These guides are written against Ubuntu, Debian, and RHEL-family images — the same ones on NetBay.
Deploy an instance