While restoring the primary database in a SQL Server AlwaysOn cluster the restore fails with:
VSS_E_WRITERERROR_NONRETRYABLE
Trace shows and Event logs show a generic failure to prepare the pre-restore environment.
Example:
- FAILED_AT_POST_RESTORE status for writer 'SqlServerWriter', Writer error code: VSS_E_WRITERERROR_NONRETRYABLE [0x800423f4]
**** VSS Return code: VSS_E_WRITERERROR_NONRETRYABLE****
Since we are restoring via Virtual Client back to an AAG Cluster, special considerations must be taken before restore.
These are summarized below to ensure the database to restore isn't locked due its role in the cluster.
In an AAG restore scenarios, before restore, the original database cannot be joined in an AlwaysOn Availability Group.
1- Check 'Remove Primary Database from the AlwaysOn Availability Group Before Restore' on Plugin options.
This can also be achieved via SQL Server Management Studio, by manually removing the database from the AlwaysOn Group primary and secondary replicas.
a. On the primary replica, select Suspend Data Movement for the database.
b. On all secondary replicas, remove the database from the group.
c. On the primary replica, remove the database from the group.
2- Restore the primary from backup with Recovery and following options
▪ Restore to the following AlwaysOn Availability Group: <AAG group name>
▪ Enter the NetVault Backup Client Name on the AlwaysOn Availability Groups Primary Node
▪ In the 'Instance Name, If Restoring to an AlwaysOn Named Instance' field, enter just the instance name if applicable
▪ After restore the database will have to be added back to the AlwaysOn Availability Group on the primary replica.
Therefore check the option 'Add Primary Database to the AlwaysOn Availability Group After Restore'
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center