How to Back Up Windows Server to the Cloud on a Small Budget
Most small offices have a backup. Far fewer have one that is offsite, encrypted, keeps old versions, and has actually been restored. This guide sets that up with free software and storage that costs a few dollars a month.
Some links on this page are affiliate links. If you buy through them we may earn a commission at no extra cost to you. It never changes what we recommend. Details.
What "good enough" looks like for a small server
The old 3-2-1 rule still holds: three copies of your data, on two different kinds of storage, with one copy offsite. For a typical office with one Windows Server (file shares, maybe a SQL Server database, maybe a domain controller), that means:
- Copy 1: the live data on the server.
- Copy 2: a local backup to a USB disk or NAS, for fast restores. Windows Server Backup is fine for this.
- Copy 3: an encrypted, versioned copy in the cloud, for when the building floods or ransomware encrypts both the server and the NAS.
This guide is about copy 3. Windows Server Backup cannot write directly to cloud storage, so we add a second tool next to it.
The tools
| Piece | What we use | Cost |
|---|---|---|
| Backup software | restic, open source, single .exe, encrypts everything before upload, deduplicates, keeps snapshots | Free |
| Cloud storage | Backblaze B2, S3-compatible object storage | Pay per TB stored (check current pricing; it is one of the cheapest) |
| Scheduler | Windows Task Scheduler | Free |
Prefer a point-and-click tool with a GUI, email reports and image-level restores? Skip to the paid option at the end. The storage side is the same.
Step 1: Create the B2 bucket and a restricted key
- Create a Backblaze account and open B2 Cloud Storage → Buckets → Create a Bucket. Make it Private. Name it something like
acme-fs01-backup. - Go to Application Keys → Add a New Application Key. Give it access to only this bucket, read and write. Never use the master key on a server.
- Copy the keyID, the applicationKey and the bucket's S3 endpoint (it looks like
s3.us-west-004.backblazeb2.com). The key is shown once.
Step 2: Install restic on the server
Download the Windows build from the official releases page, rename it to restic.exe and put it in C:\Tools\restic\. Then create a folder only Administrators and SYSTEM can read, for example C:\Tools\restic\secure\, and lock it down:
icacls C:\Tools\restic\secure /inheritance:r /grant:r "Administrators:(OI)(CI)F" "SYSTEM:(OI)(CI)F"
Inside it, create repo-password.txt containing a long random password. Store a copy of this password in your password manager too. Without it, the backup cannot be decrypted by anyone, including you.
Step 3: Create the repository
Create C:\Tools\restic\secure\env.ps1:
$env:AWS_ACCESS_KEY_ID = "your-keyID"
$env:AWS_SECRET_ACCESS_KEY = "your-applicationKey"
$env:RESTIC_REPOSITORY = "s3:s3.us-west-004.backblazeb2.com/acme-fs01-backup/restic"
$env:RESTIC_PASSWORD_FILE = "C:\Tools\restic\secure\repo-password.txt"
Then, in an elevated PowerShell window:
. C:\Tools\restic\secure\env.ps1
C:\Tools\restic\restic.exe init
We use B2's S3-compatible endpoint because that is what the restic documentation currently recommends for Backblaze.
Step 4: Get SQL Server databases into a safe state first
Copying live .mdf and .ldf files is not a reliable database backup. Let SQL Server write a proper backup file first, then let restic upload that file. A nightly SQL Agent job (or Task Scheduler with sqlcmd on Express edition) like this is enough for most small offices:
BACKUP DATABASE [AccountingDB]
TO DISK = N'D:\SQLBackups\AccountingDB.bak'
WITH INIT, COMPRESSION, CHECKSUM;
Remove COMPRESSION on Express edition, which does not support it. If the database uses the full recovery model, schedule log backups too, or the log file will keep growing.
Step 5: The backup script
Save as C:\Tools\restic\backup.ps1:
. C:\Tools\restic\secure\env.ps1
$restic = "C:\Tools\restic\restic.exe"
$log = "C:\Tools\restic\logs\backup-$(Get-Date -Format yyyy-MM-dd).log"
New-Item -ItemType Directory -Force -Path (Split-Path $log) | Out-Null
# --use-fs-snapshot makes restic read from a VSS snapshot, so open files are copied safely
& $restic backup "D:\Shares" "D:\SQLBackups" `
--use-fs-snapshot `
--exclude '*.tmp' --exclude '~$*' `
--tag nightly *>> $log
# Keep 7 daily, 4 weekly and 6 monthly snapshots, delete the rest
& $restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune *>> $log
# Read back a random 5% of the data each night to catch silent corruption
& $restic check --read-data-subset=5% *>> $log
Change the paths to match your server. The first run uploads everything and can take a long time on a slow line. After that, only changed blocks are sent.
Step 6: Schedule it
$action = New-ScheduledTaskAction -Execute "powershell.exe" `
-Argument "-NoProfile -ExecutionPolicy Bypass -File C:\Tools\restic\backup.ps1"
$trigger = New-ScheduledTaskTrigger -Daily -At 1:30am
Register-ScheduledTask -TaskName "Offsite backup (restic)" -Action $action `
-Trigger $trigger -User "SYSTEM" -RunLevel Highest
Pick a time after your SQL backup job finishes. Running as SYSTEM gives restic the rights it needs to create VSS snapshots.
Step 7: Do a restore test (this is the step everyone skips)
. C:\Tools\restic\secure\env.ps1
C:\Tools\restic\restic.exe snapshots
C:\Tools\restic\restic.exe restore latest --target C:\RestoreTest --include "D:\Shares\Finance"
Open a few restored files. For SQL, restore the .bak to a test database name with RESTORE DATABASE ... WITH MOVE and run DBCC CHECKDB on it. Put a reminder in your calendar to repeat this every quarter. A backup you have never restored is a hope, not a backup.
Common mistakes
- Losing the repository password. Keep it in a password manager that does not live only on this server.
- Using the B2 master key. If the server is compromised, the attacker gets every bucket in the account.
- No alerting. At minimum, check the log weekly. Better, send the log to a monitored mailbox or use a free heartbeat service that alerts when a job does not check in.
- Backing up the cloud copy from the same admin account that ransomware can reach. Consider B2's Object Lock (immutability) for higher-risk clients; tools with built-in Object Lock support make this easier.
The paid option: a GUI tool on the same storage
If you manage several servers, or you hand the system over to someone who does not want to touch PowerShell, a commercial tool saves time. MSP360 Backup (formerly CloudBerry) runs on Windows Server, writes to Backblaze B2, supports image-based backups and bare-metal restore, has native SQL Server backup plans, and can use B2 Object Lock for immutable copies. It is licensed per server, so check the current price against your budget. The restic setup above does the core job for free; the paid tool adds convenience, reporting and image restores.
NightDesk IT does after-hours Windows Server work remotely, including backup setup and restore testing.
Book a free 30-minute check