Databases to Backup and Connection String for FogBugz On-Premise



Use this article to identify which of the FogBugz databases should be backed up and how often, and also to identify your connection string to your database.

IMPORTANT: When and how a backup is created about FogBugz On-Premise database is the customer's responsibility, including:
  • regular database backup strategy
  • transaction log strategy and recovery model used
  • backing up before executing any task where there is a potential for data loss, including maintenance, server migration, or any change in the production environment.


It is assumed that the user executing the backup has the proper knowledge and tools to create a Microsoft SQL Server Database backup.


FogBugz Databases - a quick overview

When installing FogBugz On-Premise, the following three SQL databases are created:

  • fbhosted
  • trial1 (..trialN)
  • FBODExportQueue


This database contains FogBugz configuration data and is used by the different FogBugz internal services (like ElasticSearch index backfill process). It is recommended to back it up at least one time per month. If your FogBugz configuration changes more often, you should back it up more often and include it in your regular backup plan.


trial1 (..trialN)

This database is the main FogBugz database. It contains all the Cases, Projects, Milestones, Attachments, the history of these items, and all other data recorded in your FogBugz database by your FogBugz users. It is recommended to have it included in your regular backup plan, have proper transaction log configuration in place, and have it included in your disaster recovery plan.

Depending on your FogBugz setup, you might have multiple trial databases, like trial1, trial2, ..trialN.

Depending on your Microsoft SQL Server hosting setup, your trial databases might be located on different SQL Server instances. Read the chapter Where are the FogBugz trialN Databases Hosted for details.



This database is used only by the On-Demand version to track and execute the backup request tasks initiated from the UI. This feature is not available (not needed) for FogBugz On-Premise, so the tables in this database should be empty and thus the database should take up minimal storage space. DO NOT delete this database.

Back to the top

Where are the FogBugz trialN Databases Hosted

  1. Find the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Fog Creek Software\FogBugz\<your manuscript install directory>/Website.


  2. Check the value of sFBHostedConnectionString registry value. It should be something like:
    Server=SqlServer_Instance_Where_fbhosted_Is;Initial Catalog=fbhosted;MultipleActiveResultSets=true;Integrated Security=SSPI;


  3. Connect to the SQL Server instance identified in the above registry value (in our example SqlServer_Instance_Where_fbhosted_Is). This is where the fbhosted database is hosted.


  4. Run the following SQL query to get the location of the trialN FogBugz database(s): 
    Use fbhosted
    SELECT t.ixFogBugzTrial, s.ixFogBugzTrialDBServer, t.sUniqueSiteName, s.sSQLServerInstance, CONCAT('trial',t.ixFogBugzTrial) AS sDatabase, s.sLocalPathToDBs, s.sUNCPathToDBs
      FROM tblFogBugzTrial t JOIN tblFogBugzTrialDBServerMap m ON t.ixFogBugzTrial = m.ixFogBugzTrial
      JOIN tblFogBugzTrialDBServer s ON m.ixFogBugzTrialDBServer = s.ixFogBugzTrialDBServer


  5. The MS SQL Manager should return something like this:


    • sSQLServerInstance - SQL Server instance that is hosting your database
    • sDatabase - the name of your database. It depends on the FogBugz version you are using.
      • For FogBugz On-Premise or On-Site: the database is trialN (i.e. trial1).
      • For FBFYS: the database is fogbugz
    • sUniqueSiteName - the name of your FogBugz site
    • sLocalPathToDBs - local path to the DB files 
    • sUNCPathToDBs - UNC path to the DB files 


Back to the top

MySQL - in case of FBYS

  • FBFYS (below version 8.8.55) runs MySQL.
  • Refer to the knowledge base article on how to back up your MySQL database.
  • Locate the physical server of the database by looking under the Admin > Site > Database tab in FogBugz For Your Server.

Back to top