2

I have a 2 node automatic failover SQL server AG setup and backups run on the secondary replica. I wanted to know what happens if a failover is triggered for some reason and at the same time full backup of very large DB ~8TB is in progress on my secondary replica.

Will the secondary replica take up the role of new replica and then continue with the full backup?

Or any operations running on the secondary DB including the full backup has to rollback before the secondary replica could assume the primary role?

In this scenario, the failover time will it take longer than usual if it has to rollback a long running full backup session.

1 Answer 1

3

I wanted to know what happens if a failover is triggered for some reason and at the same time full backup of very large DB ~8TB is in progress on my secondary replica.

The backup will be cancelled and fail.

Will the secondary replica take up the role of new replica and then continue with the full backup?

If the jobs are on all secondaries, then next time a secondary is online and the job kicks off, it should kick it off, otherwise there is no retry or redo of anything currently running.

Or any operations running on the secondary DB including the full backup has to rollback before the secondary replica could assume the primary role?

You are correct, everything is killed and recovery is run (among other things).

In this scenario, the failover time will it take longer than usual if it has to rollback a long running full backup session.

There isn't much to rollback, per se, so killing the backup and cleaning up the files might take a little extra time but shouldn't take that long.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.