2

I am getting the below error while executing the script for taking filegroup backups from a secondary replica.

Msg 3059, Level 16, State 1, Line 18
This BACKUP or RESTORE command is not supported on a database mirror or secondary replica.

Msg 3013, Level 16, State 1, Line 18
BACKUP DATABASE is terminating abnormally.

Script being used:

BACKUP DATABASE [DBName] FILEGROUP = N'PRIMARY'
TO DISK = 'E:\Backups\PRIMARY.bak' 
WITH NAME = 'PRIMARY', COPY_ONLY, NOFORMAT, NOINIT, SKIP, REWIND, NOUNLOAD, STATS = 50
0

1 Answer 1

2

The Docs state this is possible (emphasis mine):

BACKUP DATABASE supports only copy-only full backups of databases, files, or filegroups when it's executed on secondary replicas. Copy-only backups don't impact the log chain or clear the differential bitmap.

Doing some testing it does indeed seem this is not the expected behavior (failing), it should work. This will require a fix in a CU, though I'm not sure when that may occur.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.