This article is intended to help customers who need to move their FogBugz data from their FogBugz On Demand account to a local FogBugz installation using MS SQL Server as the database server. The backup provided by our FogBugz On Demand service is in MS SQL 2008 R2 format. Please contact us if you need help converting the backup to a different format.

Step 1

Run FogBugz Setup. Choose SQL Server as the database option.
When Setup has finished, it launches a web page and asks you to install licenses. Don’t install the licenses yet – it’s okay if you already did, but you will have to do it again after importing the data. Just minimize this browser, we’ll come back to it later.

Step 2

In another browser window, log into your FogBugz On Demand account as a Site Administrator. Click Admin at the top right, then “Your On Demand Account”, and click the link to “download a backup” of your FogBugz database. On this new page you will see any existing or previous backups within the last 15 days, and the option to request a new backup. Go ahead and click “Request Backup”. This process will take a little while, depending on the size of your FogBugz account. Note that your account will not be locked during this time, but any new edits made after this point may not appear in your backup file. For this reason, we advise that users stop interacting with their FogBugz account at this point.

Once the backup is ready, the user who requested it will receive an email with credentials to download the backup file from an FTP server. You may download this file with any FTP client, we like FileZilla. After downloading the zip file, unzip the file inside to a memorable location for the next steps.

The download may take many hours if you have a large database. If it takes too long or fails, please contact us for other options. 

Step 3

Run SQL Server Management Studio and connect to your database server. Drill down to the brand new database named FogBugz that was created by Setup. Select it and press the Delete key to delete it.

Step 4

Right click the Databases item and choose Restore Database…



In the dialog which appears, type in “fogbugz” for the name of the database, select “From device” as the source and locate the file you unzipped in step two, and then check the “Restore” box on the new backup set that appears.



Click OK to run the restore. It will take a little while depending on the size of the backup file.

Step 5

You will need to grant permissions on this database to the correct user. In your SQL Server Management Studio, drill down into the new database into Security -> Users. Here, right click on Users and choose “New User…” and enter the same user information as you told the FogBugz setup program to run FogBugz as.

Step 6

Bring up FogBugz in your web browser and refresh the page. If you see a message like the following:

FogBugz cannot continue. This database is version 809 and the software needs to run against a database of version 808.

you will need to update the [ixVersion] number in the [Version] table of your FogBugz database so that the [ixVersion] is one less than the expected version. In the above case, we would change [ixVersion] from 809 to 807:

UPDATE Version SET ixVersion = ‘<one less than the expected version>’
WHERE ixVersion = ‘<current database version>’;

When you refresh the page again, you will  be prompted to ‘upgrade your database’. Click the upgrade link — the database upgrade process should take anywhere from 2-20 minutes.


If at this point you get an error message, please re-read the above steps and verify that you didn’t do something ever so slightly differently.

  1. Install your licenses
  2. Set your options in Admin -> Site Configuration
    • The FogBugz Maintenance URL
    • Notification URL
    • Your outgoing SMTP server information

Users will log in with the same credentials from your hosted account. Presto magicko, you should see all the data you created on our server like so many eggs in a basket!

Step 7

Remove the On Demand only cases@ mailbox:

DELETE FROM Mailbox WHERE sEmail like '';

Step 8

If your plugins are broken after import, all you need to do to fix them is to re-install the plugins and remove some On Demand-only plugins. Once you do this , they will pick up their previous data and just work.

To remove the On Demand-only plugins, run these SQL statements on the newly imported / restored FogBugz database:

DELETE FROM Plugin WHERE sPluginId in ('','','','','');

To install all the plugins at once, you will need the zip file for each plugin. For users with FogBugz 8.8.49, you can download this package of all the plugins that are included by default with the installer. If you are using another version of FogBugz, you can contact us and we will provide the appropriate package of zip files, or you can gather them yourself from the Plugin Gallery.

Once you have all of the plugin zip files, just place them in the C:\Program Files (x86)\FogBugz\Plugins\upload (Linux: /opt/fogbugz/Plugins/upload) folder. FogBugz monitors this folder and will install the plugins for you when it discovers them. You can watch this happen as the zip file is deleted from the folder once it has been installed.

You may find that some plugins perform differently or still throw errors. FogBugz On Demand handles plugin behavior differently than FogBugz For Your Server, and you may need to make some additional adjustments:

  • Project Groups throws “Invalid operation attempted on unsaved project group”
    • Determine your Plugin index value (ixPlugin) with the following query:
      USE [fogbugz];
      SELECT ixPlugin, sPluginId FROM Plugin WHERE sPluginId ='';
    • Update the groups to use 0 where On Demand used -1:
      USE [fogbugz];
      UPDATE Plugin_<ixPlugin>_ProjectGroups_Filter SET ProjectGroups = 0 WHERE ProjectGroups = -1;