Restoring a backed-up LocalDB database
Restoring a LocalDB database is similar to restoring a normal SQL database using the SQL Server Management Studio. However, you might encounter an error during the process:
“Property BackupDirectory is not available for Settings ‘Microsoft.SqlServer.Management.Smo.Settings’. This property may not exist for this object or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo).”
These steps provide a solution to this problem. We assume that you have created a backup of your database using the Hotfix and Upgrade Utility.
Open the Registry editor and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11E.LOCALDB\MSSQLServer.
Add these three String Values with the path to your backed-up folder as a value:
DefaultData
DefaultLog
BackupDirectory
Open Microsoft SQL Server Management Studio
Connect to the LocalDB instance, use the server name (localdb)\.\Kentico.
Delete the old database.
Right-click the Databases folder and select Restore Database….
In the Source section, select Device.
Click the (…) button.
Click Add.
Select the database backup file (.bak) and click OK.
Click OK to begin the restore process.
The system now restores your LocalDB database.