SQL Server backups to cloud storage: what BACKUP TO URL costs at each vendor
Prices checked · Microsoft's SQL Server documentation read
For a SQL Server database whose nightly full backup is 200 GB, with a log backup every 15 minutes and everything kept 30 days, OVHcloud Object Storage Infrequent Access costs least: $322.12 a year with one restore, that is $26.77 a normal month and $27.65 the month you restore last night's backup. SQL Server uploads every file in parts of 10 MB, about 629,010 requests a month here: they cost nothing at 7 of the 12 vendors ranked and as much as $15.56 a month at Azure Blob Storage Cool LRS.
One URL holds about 100 GB. SQL Server 2022 and later write to any S3-compatible bucket, each file in at most 10,000 parts of 10 MB
by default, so "the size of a single backup file … can't exceed 100 GB per file". A bigger backup fails unless you stripe it over several URLs, up to 64, or raise the part size
to 20 MB, which needs COMPRESSION. The 200 GB backup here takes 3 URLs, or 2 at 20 MB parts.
Microsoft, backup stripe exceeding 100 GB · Microsoft, part numbers and file size limits
Every vendor for SQL Server backups, cheapest year first
One row per vendor: its cheapest class you can read back at once, on SQL Server's defaults, 11 normal months and the month you restore, with every backup deleted at 30 days. The next column is the same class with 20 MB parts, MAXTRANSFERSIZE = 20971520.
| # | Offer, and where it keeps the backups | Year with one restore | Normal month | Parts of 20 MB | Month you restore | Checked |
|---|---|---|---|---|---|---|
| 1 | OVHcloud Object Storage Infrequent Access France (Gravelines) | $322.12 | $26.77 Deleting at 30 days $0.36 | $26.77 | $27.65 | |
| 2 | IDrive e2 United States (Virginia) | $468.48 | $39.04 | $39.04 | $39.04 | |
| 3 | | $541.80 | $45.15 | $45.15 | $45.15 | |
| 4 | | $548.12 | $45.55 | $45.55 | $47.07 | |
| 5 | DigitalOcean Spaces Cold Storage United States (New York 3) | $569.04 | $47.42 | $47.42 | $47.42 | |
| 6 | Oracle OCI Object Storage Infrequent Access United States (Ashburn) | $754.56 | $62.72 Upload requests $0.20 Deleting at 30 days $2.02 | $62.61 | $64.64 | |
| 7 | Tigris Infrequent Access Automatic location | $766.42 | $63.70 Upload requests $3.10 | $62.14 | $65.72 | |
| 8 | Amazon S3 One Zone-IA United States (Northern Virginia) | $813.88 | $66.89 Upload requests $6.29 | $63.79 | $78.09 | |
| 9 | | $891.91 | $74.07 Upload requests $9.00 | $74.07 | $77.14 | |
| 10 | Azure Blob Storage Cool LRS Netherlands (West Europe) Through SQL Server's Azure connector, in 4 MB blocks | $926.26 | $76.16 Upload requests $15.56 | Blocks stay 4 MB on Azure | $88.50 | |
| 11 | Filebase Object Storage Distributed worldwide | $1,090.80 | $90.90 | $90.90 | $90.90 | |
| 12 | | $1,702.20 | $141.85 Deleting at 30 days $94.57 | $141.85 | $141.85 |
"Upload requests" is what the month's parts cost to upload. "Deleting at 30 days" is what a class with a longer minimum storage period bills for each backup deleted younger than it.
Classes that make each file wait to be restored are left out: RESTORE … FROM URL reads the backup straight from the bucket.
Azure Blob Storage has no S3 interface, so SQL Server reaches it through its own Azure connector, in blocks of at most 50,000 a file; Microsoft recommends 4 MB blocks, which makes 1,556,280 requests a month here.
Price your own SQL Server backups Price it with 20 MB parts
The calculator opens on these backups, with 30 days of them entered as the data kept and their parts as upload requests: when you change the size to yours, change the requests too. It does not count the deletions at 30 days, which the table above adds.
Vendors not ranked, and why
- Akamai Cloud Object Storage: not confirmed. It costs $1,561.68 a year before any minimum-stay charge, but its pricing names no minimum storage period, so what deleting a backup at a month old costs is not confirmed. If it has none, it would rank 12th here.
- Google Cloud Storage: not confirmed. Google Cloud Storage Nearline costs $816.34 a year, but its own documentation does not claim full S3 compatibility and Microsoft's list of S3 providers does not name it, so whether SQL Server's S3 connector works with it is not confirmed. If it works, it would rank 9th here.
- Hetzner Object Storage: not confirmed. It costs $689.28 a year before any minimum-stay charge, but its pricing names no minimum storage period, so what deleting a backup at a month old costs is not confirmed. If it has none, it would rank 6th here.
- Scaleway Object Storage: not confirmed. Standard One Zone costs $703.35 a year before any minimum-stay charge, but its pricing names no minimum storage period, so what deleting a backup at a month old costs is not confirmed. If it has none, it would rank 6th here.
- Telnyx Cloud Storage: not confirmed. Regular Storage costs $435.60 a year before any minimum-stay charge, but its pricing names no minimum storage period, so what deleting a backup at a month old costs is not confirmed. If it has none, it would rank 2nd here.
- Vultr Object Storage: not confirmed. Standard costs $1,405.44 a year before any minimum-stay charge, but its pricing names no minimum storage period, so what deleting a backup at a month old costs is not confirmed. If it has none, it would rank 12th here.
How many URLs your backup needs
Find the size of your compressed full backup file as Windows shows it, in GB of 1,024 MB, the unit of Microsoft's limits. Each URL is one file in the bucket; SQL Server writes the stripes side by side and needs all of them to restore.
| Backup file | S3, parts of 10 MB (default) | S3, parts of 20 MB | Azure, blocks of 4 MB |
|---|---|---|---|
| 50 GB | 1 URL | 1 URL | 1 URL |
| 100 GB | 2 URLs | 1 URL | 1 URL |
| 200 GB | 3 URLs | 2 URLs | 2 URLs |
| 500 GB | 6 URLs | 3 URLs | 3 URLs |
| 1 TB | 12 URLs | 6 URLs | 6 URLs |
| 2 TB | 23 URLs | 12 URLs | 12 URLs |
| 5 TB | 56 URLs | 28 URLs | 28 URLs |
| 10 TB | Too big for one backup | 56 URLs | 56 URLs |
| 12 TB | Too big for one backup | 64 URLs | 64 URLs |
Each URL holds 10,000 parts, or 50,000 blocks on Azure. Parts can come out smaller than the maximum, so the counts leave each URL about 5% short of its limit, up to the 64 a backup can have: Microsoft advises keeping each stripe at or below 100 GB at the default, and striping on Azure "even if they're smaller than 200 GB". Past 64 URLs a single backup cannot hold it: "you can stripe your backup set to support files size up to 12.8 TB", that is 64 URLs of 200,000 MB, about 12.2 TB as Windows counts it. Microsoft, S3-compatible object storage · Microsoft, backup to Azure Blob Storage
The statements to type
First store the key in SQL Server as a credential named after the folder the backups go to. SQL Server picks the credential itself: it "attempts to find the most specific matching credential based on the URL",
so the backup needs no CREDENTIAL option. The key's ID and secret "must not contain a colon".
CREATE CREDENTIAL [s3://<endpoint>/<bucket>/sql]
WITH IDENTITY = 'S3 Access Key', SECRET = '<AccessKeyID>:<SecretKeyID>'; Example: a 200 GB backup of a database called Sales. Type your database and its size over them, and the statement follows.
A 200 GB backup takes 3 URLs at 10 MB parts, about 67 GB in each.
BACKUP DATABASE [Sales]
TO URL = 's3://<endpoint>/<bucket>/sql/Sales_<date>_1.bak',
URL = 's3://<endpoint>/<bucket>/sql/Sales_<date>_2.bak',
URL = 's3://<endpoint>/<bucket>/sql/Sales_<date>_3.bak'
WITH COMPRESSION, CHECKSUM, STATS = 10; With 20 MB parts the same backup takes 2 URLs and about half the upload requests.
Give each night's files new names: "Appending isn't supported", and WITH FORMAT overwrites a backup of the same name. SQL Server assumes the bucket is in us-east-1;
for any other region, add this to the WITH clause, after a comma:
Microsoft, supported backup arguments
BACKUP_OPTIONS = '{"s3": {"region":"<region>"}}' What SQL Server asks of the bucket in a month
| Upload requests | S3, parts of 10 MB | S3, parts of 20 MB | Azure, blocks of 4 MB |
|---|---|---|---|
| URLs for each full backup | 3 | 2 | 3 |
| Each night's full backup | 20,487 | 10,244 | 51,204 |
| A day's 96 log backups | 480 | 384 | 672 |
| A month | 629,010 | 318,840 | 1,556,280 |
Each file is uploaded in parts: a request for each part, and two more to start and complete the file (on Azure, one more to commit its blocks). A log backup of about 21 MB is a few requests; a full backup is thousands. Nothing is downloaded in a normal month, so the request bill is the uploads alone, and only vendors that charge for uploads charge for it.
A setup that protects the backups
- Create the bucket at the vendor first: "Buckets can't be created or configured from SQL Server". The connection is always HTTPS, and the vendor's certificate must be one the server trusts; on Linux, a certificate SQL Server does not ship goes in
/var/opt/mssql/security/ca-certificatesbefore it starts. Microsoft, prerequisites · Microsoft, SQL Server on Linux - Give SQL Server a key that can list and write, and keep the key that can read for the day you restore. To back up, Microsoft asks for "ListBucket and WriteOnly permissions"; to restore, list and read. A key that cannot delete cannot empty the bucket.
It can still write over a backup of the same name (
WITH FORMAT"allows existing files in your bucket to be overwritten"), so where the vendor offers versioning, turn it on: AWS "recommends using Amazon S3 versioning to protect files from being accidentally deleted". An overwritten or deleted backup then stays, billed, as an older version: add a lifecycle rule that removes older versions after a few days. AWS, backup SQL Server databases to Amazon S3 - Keep the server's clock right: the storage "might reject connection … whenever the time difference between SQL Host and S3 server is bigger than 15 minutes".
- A backup that fails or is cancelled leaves its uploaded parts in the bucket, billed as stored data: "These uncommitted data blocks continue to persist". Where the vendor has one, add a lifecycle rule that removes incomplete multipart uploads.
- The bills here assume a lifecycle rule deletes each backup at 30 days. At a class with a longer minimum storage period, keeping them that long costs the same as deleting them sooner.
- SQL Server Express cannot do any of this: backing up to S3-compatible storage "isn't supported in SQL Server Express".
Locking the backups against ransomware
Not through the S3 connector. Microsoft: "The SQL Server backup to S3-compatible object storage feature doesn't support Object Lock", and "The bucket and folder location targeted by your backup operation must not have Object Lock enabled": a backup to a locked bucket fails. So at every S3 vendor above, SQL Server's own backups can be deleted by a key that is allowed to delete. Keep that key off the server (step 2 above), or copy the backups to a locked bucket with a tool that can lock them.
On Azure, SQL Server 2025 can: it "introduces support for Azure immutable storage", at the container level only ("Currently, only container level immutable storage is supported"). Earlier versions cannot: "Immutable storage for Azure Blob Storage isn't supported prior to SQL Server 2025." Microsoft, Object Lock · Microsoft, Azure immutable storage support · which vendors offer Object Lock · backup tools and the storage each needs
Test a restore
- Check a backup is complete with
RESTORE VERIFYONLY FROM URL = …, every stripe listed. It "checks to see that the backup set is complete and the entire backup is readable", so from a bucket it downloads the whole backup: at a vendor that charges for downloads, it is billed like the month-you-restore column. - Then restore it on a test server under another name,
RESTORE DATABASE [Sales_test] FROM URL = … WITH MOVE …, with the credential you kept for restores, and open it. That proves the backup, the key and the steps.
Microsoft, RESTORE VERIFYONLY · Microsoft, supported restore arguments. What bringing last night's backup back costs at each vendor is the month-you-restore column above.
How the bills are worked out
A SQL Server database backed up with BACKUP TO URL: a full backup every night whose compressed file is 200 GB, striped over 3 URLs, and a log backup every 15 minutes, 2 GB of log a day in 96 files; everything kept 30 days and then deleted, so about 6,060 GB is stored and as much written and deleted each month. A GB here is 1,024 MB, as Windows shows a file's size. Through the S3 connector each file is uploaded in parts of 10 MB, a request a part plus two to start and complete the file: about 629,000 upload requests a month. Through Azure's connector, in blocks of 4 MB, about 1.56 million. Nothing is downloaded in a normal month; the month you restore, last night's full backup and that day's logs, 202 GB, are downloaded over the internet.
Each bill comes from the vendor's own published rates through the same engine as the calculator, checked on the date beside it. The part size, the part and URL limits and the Azure block size come from Microsoft's documentation, the advice on versioning from AWS's; the backup sizes, the log schedule and the 30-day retention are an example. Each part counts as one upload request, as each is its own request to the bucket. A class with a minimum storage period bills the days left on each backup deleted younger than it.
Related: storage for any database's nightly backups · minimum storage periods explained · what requests cost at each vendor · other backup tools and their storage
The pages behind this one
- SQL Server back up to URL for S3-compatible object storage, Microsoft Learn, read
- SQL Server back up to URL for S3-compatible object storage: best practices and troubleshooting, Microsoft Learn, read
- Back up and restore SQL Server with S3-compatible object storage, Microsoft Learn, read
- SQL Server backup to URL for Microsoft Azure Blob Storage, Microsoft Learn, read
- RESTORE Statements - VERIFYONLY (Transact-SQL), Microsoft Learn, read
- Backup SQL Server databases to Amazon S3, AWS Microsoft Workloads Blog, read