Press "Enter" to skip to content

Category: Backups

Bacpacs vs Dacpacs

Drew Skwiers-Koballa covers two file formats that often annoy me:

When you need to move an entire database or move the objects in a database, bacpac and dacpac files often come up because of all of the tooling options to interact with them. Bacpac and dacpac files share some core similarities as well as some major differences in how they’re used in SqlPackage and other SQL tools, but their flexibility can create a bit of confusion. In this post, we are going to discuss exactly what makes bacpac specifically important, as well as explore the options that a dacpac is capable of.

My big problem with bacpacs (and dacpacs that include data) is that, once you get to database sizes that are at all interesting, bacpacs fail to work, either because they time out in creation or in restoration. Dacpacs are quite nice for database deployments and maybe including a few reference tables, but creating a bacpac of a 100+ GB database? Best of luck.

Leave a Comment

T-SQL Snapshot Backups and Secondary Replicas

Sean Gallardy looks at the intersection of two SQL Server capabilities:

I was recently asked about T-SQL Snapshot backups on secondary replicas, which I hadn’t looked at for many years as it’s kind of a niche item. I was definitely surprised to find little caveats here and there, thus you get this wonderful post.

If you’re unfamiliar with T-SQL Snapshot backups, it’s a way to flush and hold changes made by IO to a database (your Freeze and Thaw entries in the errorlog) so that a stable disk image can be created and then backed up at the storage or filesystem layer. This can be an extremely fast way to create snapshots of databases that are quite large (assuming you’ve set everything up correctly) even across storage arrays (assuming it supports other options, such as ODX).

Read on to see what you have to do to get both to play nice together.

Leave a Comment

Estimating Disk Space from .BAK Files

Garry Bargsley runs the numbers:

Today’s post comes from one of those real-world DBA situations where someone hands you a folder full of SQL Server backup files and asks what should be a simple question:

“How much disk space do we need to restore these?”

Simple question.

Not always a simple answer.

Click through for a script that calculates how much disk space you’d need to restore a given set of backups.

Comments closed

Introducing pg_hardstorage

Hans-Jürgen Schönig announces a new open-source project:

PostgreSQL was once primarily deployed on dedicated servers and virtual machines, and now runs across managed database services, Kubernetes platforms, cloud environments, hybrid infrastructures, and everything in between. Many organizations operate several of these models simultaneously, often while supporting growing data volumes and increasingly demanding recovery requirements. As PostgreSQL deployments have evolved, so have the conversations surrounding backup and recovery.

At CYBERTEC, those conversations have been taking place across customer environments, community discussions, architectural reviews, and operational workshops for many years. The result is pg_hardstoragea new open-source community project focused on PostgreSQL backup and recovery.

Click through for a quick overview, as well as links to the project homepage and GitHub repo.

Comments closed

Fixing Blob Lease Issues on BACKUP TO URL

Greg Low fixes a problem:

Regardless of why you are using BACKUP TO URL, one of the problems that you are likely to run into at some point is the dreaded:

Msg 3271, Level 16, State 1, Line 60
A nonrecoverable I/O error occurred on file
“ https://somestorageaccount.blob.core.windows.net/backups/somedatabase.bak : “
Backup to URL received an exception from the remote endpoint. Exception Message: The remote server returned an error: (412) There is currently a lease on the blob and no lease ID was specified in the request…
Msg 3013, Level 16, State 1, Line 60
BACKUP DATABASE is terminating abnormally.

Click through to see when you might get this problem and how you can fix it.

Comments closed

T-SQL Snapshot Backups on Hyper-V

Anthony Nocentino takes a backup:

If you’ve been following my T-SQL Snapshot Backup series, you’ve seen this technique work on bare-metal and standard VM deployments where database files live on volumes directly presented to the SQL Server OS. In this post, I’m bringing T-SQL Snapshot Backup into a Hyper-V cluster environment, with database files on VHDXs backed by a Pure Storage FlashArray Cluster Shared Volume (CSV). Hyper-V adds a few extra layers to manage at the hypervisor level, but the SQL Server side of the story is identical. Let’s walk through it.

Click through to see how it all works. It has taken me a long time to accept the idea that storage volume snapshots could fit the bill, and it’s been people like Anthony, Andy Yun, and Mark Wilkinson who have allayed my concerns over the years.

Comments closed

Testing Your SQL Server Backups

Vlad Drumea stresses the need to test:

Folks think that if they just take backups regularly, and their backup intervals match their recovery point objectives, then they can rest assured knowing (more like falsely thinking) they have backups from which to restore in case something bad happens to a database or to the entire instance.

Yeah, there are several things that can go wrong, even beyond the solid answers Vlad provides. Think about developers taking one-off backups that break the log chain, overly-aggressive purge processes that delete backups before they’re fully moved to long-term storage, etc.

Definitely check out Vlad’s post. If you’re interested, I also have a video series on YouTube that covers SQL Server backup and restore.

Comments closed

Explaining Non-Yielding Schedulers during Backups

Sean Gallardy provides an explanation:

Sparked by my friends at Straight Path SQL, we’re going to look at a rare cause of non-yielding scheduler dumps. This is another one of those items that I meant to write about a long time ago when I worked in Support and then, well, I suck and clearly forgot about it. This should give you an idea of how rare this specific issue hits.

Read on to see what might cause this scenario and why you’re likely never to see it in the wild.

Though now that I’ve typed it, I’m sure someone will take that as a challenge.

Comments closed

Restoring Backed-Up Items in Microsoft Fabric

Gilbert Quevauvilliers grabs an item from backup:

In my previous blog post I had shown you how to backup your Microsoft Fabric Items: Backing Up Your Microsoft Fabric Workspace: A Notebook-Driven Approach to Disaster Recovery – FourMoo | Microsoft Fabric | Power BI

The next natural question is what happens when you want to restore one if the items that were previously backed up.

In the steps below I will show you how to do this.

Read on to see how it works and a bit of pain that you might experience.

Comments closed

Backup Updates in SQL Server 2025

AK Gonzalez summaries some changes:

For years, database professionals faced a frustrating limitation. With Availability Groups, you could offload some workloads to secondary replicas—but not your real backup strategy.Yes, you could run copy-only backups on a secondary. But true full backups? Differential backups that maintain the LSN chain? Those had to run on the primary replica, until now. SQL Server 2025 introduces the ability to run true full backups and true differential backups on secondary replicas.

Read on to see what this means. AK also looks at the change to ZSTD for backup compression and immutable backups in Azure Storage.

One thing I would want to warn anybody (or any company) looking into using immutable storage for backups is, Microsoft’s not joking about that immutability. That includes deleting them when you see what the bill is going to be. You can set retention polices to delete these automatically, but that’s the only way you’re getting rid of those old backups. And just because they’re old doesn’t mean you get charged less for the privilege of storing them off-site.

Comments closed