Saturday 17 December 2011

How to restore Unfuddle dumps: migrating to Drupal CaseTracker

Unfuddle is a very convenient and fairly cheap SaaS hosted Redmine (with extensions) and SVN/Git, which I use regularly on customer projects. Their service includes reassuring "Backup" options, going as far as to include the ability to backup to your own Amazon S3 bins in addition to their local backups.
Recently, however, I had to go back to an archived project for which I had dutifully taken a dump before closing it on Unfuddle, and looked for a way to restore it to my Unfuddle account. To no avail. Unfuddle support then kindly confirmed that the service did include a backup feature, but no restore:
Backups of projects within Unfuddle are for personal use only and cannot be restored into accounts via the interface. This however may be possible with some custom scripting on your part and with the use of our API (http://unfuddle.com/docs/api).
What then ? I will not comment on the business sense of such a "backup / no restore" proposition, but in this specific case, it prompted me to find a way to take my business elsewhere, and what better way than to Drupal ? Project and friends being a bit too complicated for these needs, I figured this would be a good occasion to flex my Migrate chops and built a Migration enabling the import of Unfuddle dumps to CaseTracker, the project management component in Open Atrium. So here it is:
Unfuddle backup restored to CaseTracker, main screen
As you can see, this code, even in its first incarnation, can restore a bunch of information from your Unfuddle backups to Casetracker:
  • Unfuddle Users, as Drupal users
  • Unfuddle Projects, as CaseTracker projects
  • Unfuddle Tickets, as CaseTracker basic cases
  • Unfuddle ticket Follow-ups, as CaseTracker comments
The image below shows the mapping of Unfuddle Ticket fields to CaseTracker Cases.
Unfuddle Ticket mapping to CaseTracker case
Of course, this being a one-off effort, the features are limited, but for anyone interested, the code is available from the OSInet Git repository for the migrateunfuddle module. Should anyone be willing to work on it, it could obviously be moved to Drupal.org, like my previous Migrate Remote Migrate extension for over-the-wire migrations using XML-RPC.
To use it, just install the module normally, uncompress your Unfuddle backup in the sites/(your site)/files/unfuddle directory, and head over to the Migrate v2 administration screen.

No comments:

Post a Comment