Can you take a differential backup of master?

2

December 19, 2023 by Kenneth Fisher

In one of the sessions I attended during the Pass Data Community Summit the speaker asked “If master is in the simple recovery model can I take a differential backup of it?” And I of course thought “Yes, of course you can.” Turns out I was wrong.

BACKUP DATABASE master TO DISK = 'NUL' WITH DIFFERENTIAL;

Ignore the fact that I took the backup to NUL. That was just me being lazy for the demo. You can try it to a different location if you want, it won’t matter. It turns out, it also doesn’t matter what recovery model master is in. You’ll get the same error. As I understand it master was explicitly excluded in the code for differential backups. Go figure.

In case you are interested model and msdb act normally when it comes to backups and tempdb doesn’t allow any backups.

2 thoughts on “Can you take a differential backup of master?

  1. […] Kenneth Fisher abides by Betteridge’s Law of Headlines: […]

  2. samot-dwarf's avatar samot-dwarf says:

    Besides of curiosity – why should I take a DIFF, if a FULL backup is done in 2 seconds, since the master DB is very small.

    PS: you can’t restore the master database on another server with a different name (e.g. as [master_prod_server]) and execute an CHECKDB() on it. The restore is possible, but the CHECKDB will always fail because of some special stuff inside the master db. So even if you do your CHECKDB for your prod databases on another server, you have to run it local (on Prod) for the master database (again no problem, since the master should always be very small)

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,978 other subscribers

Follow me on Twitter

Archives

ToadWorld Pro of the Month November 2013