There might be cases where you face difficulties while implementing licensing changes, upgrading software, changing hardware, or attempting to make changes directly to the database on your FogBugz On Premise installation. These situations require you to restore your FogBugz database from a backup.
- Access the FogBugz database environment.
- Open Microsoft SQL Server Management Studio.
- Navigate to the Databases.
- Right-click on the Databases and select Restore Database.
- In the Source section, select Device, and click on the browse button.
- In the Select backup devices window, click Add.
- Browse to the location of your recently restored flat files.
- Choose the full backup file and click OK.
It should be the first backup file in the list.
- In the Select backup devices window, click OK.
- In the Destination section, select the database to which you wish to restore.
- In the Backup sets to restore section, select the backup file that you added.
- In the left pane, click Options.
- In the Restore options section, check the Overwrite the existing database (WITH REPLACE) option.
- In the Recovery state field, select RESTORE WITH NORECOVERY (recommended for large databases).
- Select Close existing connections to destination database (recommended).
- Click OK.
- Wait until the restore process is completed.
- Confirm that the restored database is in the Databases list.
Database Locked in Restoring State
If you choose the RESTORE WITH NORECOVERY option and an error occurs during the restoration process, the database can get locked in the Restoring... state.
If you attempt to put the database to the offline status or try to manipulate it in any way, the following error message is shown.
The database is not accessible. (ObjectExplorer)
To resolve this issue, please run the following query:
RESTORE DATABASE [databasename] WITH RECOVERY
- Replace [databasename] with the name of your Fogbugz database. The database name is usually
FogBugzin FYS, while it is
Trial1in On Site/On Premise.
Failing to Provide Database Location
For MDF and LOG files, using a database file location other than the default destinations can cause errors when restoring a backup. When the restoration is attempted, the system will always try to restore the files in the location that was used for the original backup, and if that is not found, then it will use the default location. The default location is as follows:
C:\Program Files\Microsoft SQL Server\MSSQLXX.MSSQLSERVER\MSSQL\DATA
If you are using a custom folder for the database files (i.e., the database files are stored on a dedicated drive or on a SAN), failing to provide the new location of the database files can cause the restore process to fail. To resolve the error, you may simply select the Relocate all files to folder option, to enable the edit option. To change the locations of the restoration folders, edit the
Restore As column with the new locations of the database MDF and LOG files.
Log in to the system or inspect the database. The old data from the backup is displayed.