---
title: Restoring a backed-up LocalDB database
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

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:

![Database restore error](https://docs.kentico.com/docsassets/13/restoring-a-backed-up-localdb-database/DB_restore_error.png "Database restore error")

_"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](https://docs.kentico.com/13/external-utilities/kentico-xperience-hotfix-and-upgrade-utility.md).

1. Open the **Registry editor** and navigate to HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11E.LOCALDB\MSSQLServer.
2. Add these three String Values with the **path to your backed-up folder** as a value:

   - DefaultData
   - DefaultLog
   - BackupDirectory

   ![Add these registry keys](https://docs.kentico.com/docsassets/13/restoring-a-backed-up-localdb-database/Add_registry_keys.png "Add these registry keys")
3. Open Microsoft SQL Server Management Studio
4. Connect to the LocalDB instance, use the server name: **(localdb)\Kentico**

   ![Connect to LocalDB](https://docs.kentico.com/docsassets/13/restoring-a-backed-up-localdb-database/Connect_to_localDB.png "Connect to LocalDB")
5. **Delete** the old database.
6. Right-click the **Databases** folder and select **Restore Database....**

   ![Select Restore Database](https://docs.kentico.com/docsassets/13/restoring-a-backed-up-localdb-database/Restore_database.png "Select Restore Database")
7. In the Source section, select **Device**.
8. Click the (**...**) button.
9. Click **Add**.
10. Select the database backup file (.bak) and click **OK**.

    ![Select the database backup file](https://docs.kentico.com/docsassets/13/restoring-a-backed-up-localdb-database/Select_database_backup_file.png "Select the database backup file")
11. Click **OK** to begin the restore process.

The system now restores your LocalDB database.
