Importing Data to FogBugz On-Premises



We offer to attend migrations of your existing FBFYS data to FogBugz On-Premises, typically during our normal business hours (9 AM to 5 PM Eastern, Monday to Friday). You can also migrate your data by yourself if you prefer to do it by yourself.

This article outlines the migration process, thus enabling you to take minimal help from us.




  • This article applies to customers already using SQL Server.
  • To import a MySQL database, you will need to first convert to SQL Server.

Back to top

Getting Started

With proper preparation, migrating data to FogBugz On-Premises can be accomplished with minimal downtime.

  1. Make sure a SQL Server backup of the FBFYS database is available locally on the FogBugz On-Premises database server.

  2. Install FogBugz On-Premises.

    • For reduced downtime, do this ahead of your migration date.

Ensure to use a clean installation of FogBugz On-Premises before proceeding with data migration from FogBugz FYS PROD environment as per Upgrading FogBugz FYS to FogBugz On-Premises. Skipping this would cause the process to get stuck at step 6 (below) when you start IIS on the FogBugz On-Premises web server to allow the database to be automatically upgraded.

Back to top


Migrating the Data

  1. Stop IIS on both the FogBugz On-Premises and For Your Server web servers.

  2. Restore the FBFYS SQL Server backup over the top of the appropriate FogBugz On-Premises database (see below) — or rename the databases if they are on the same server already.

    • If this is the first site you are migrating data for, restore your For Your Server data over the trial1 database (the trial number will be different if you have multiple FogBugz sites running on the same server).

    • If this is an additional site that is being migrated in addition to an existing site in FogBugz On-Premises, the database name will be trial2 or higher — the highest trial number is the most recently configured site.

      IMPORTANT! If your old database is named fogbugz, you can rename it as Trial1.
  3. During the Restore Database process, on SSMS, select Options and checkmark the Overwrite the existing database (WITH REPLACE) option.


  4. Ensure the FogBugz On-Premises database user is mapped as db_owner on the new Trial database.

  5. Disable the active mailboxes.

    • This allows you to confirm the migrated data before pulling in new cases from any active mailboxes:

      UPDATE Mailbox
      SET fEnabled = 0
      WHERE fDeleted = 0;
      NOTE: If this is a test instance, we recommend sanitizing the database to avoid interactions with your production instance.
  6. Start IIS on the FogBugz On-Premises web server, and allow the database to be automatically upgraded.

    Note: If you didn't use a clean installation FogBugz On-Premises before proceeding with data migration from FogBugz FYS PROD environment, then the process may get stuck here. Please ensure to follow the steps listed in the Getting Started section to mitigate this and restart the data migration process.

  7. Perform the following from the FogBugz web server:

    1. Make sure you are logged into FogBugz as an administrator.

    2. Navigate to <your FogBugz URL>/default.asp?pg=pgForceDatabaseCheck (if logged in from external machines, you will receive 403 errors).

    3. Navigate to <your FogBugz URL>/f/debug/database/schemacheck
    4. If there are errors on the page, click on the button labeled Fix these errors (if you are not logged in as an admin, you cannot see this button).

    5. On the resulting page, click the Back to Schema Check button. If there are still errors on the page, contact us.

  8. Start ES Backfill by navigating to <your FogBugz URL>/f/debug/es from the FogBugz web server.

  9. You may see an alert that says Alias not found.  If that is the case, click the button below it that says Create ES Alias.

  10. Click the Start Indexer Backfill button for each document type (bug, wiki page, and discuss topics).

  11. Update the sURLEmailPrefix (if you are changing URLs):
    FROM Setting
    WHERE sKey LIKE '%sURLPrefixEmail%';
    UPDATE Setting
    SET sValue = '<new URL including protocol>'
    WHERE sKey LIKE '%sURLPrefixEmail%';
  12. Disable the Kiln plugin:
    UPDATE Plugin
    SET fEnabled = 0
    WHERE sPluginId LIKE '%kiln%';
  13. Ensure there are no admin notifications under the gear menu.

  14. Once you are satisfied with the migrated data, re-enable the mailboxes as necessary (avatar menu (bottom left) > Mailboxes).

Back to top

Next Steps

Once your data is migrated to FogBugz On-Premises, you can:

If you have any questions or would like assistance with this process, please do not hesitate to contact us. We are happy to help!

Back to top