# Import Planio Backup into Redmine ## Set up Redmine - Download the latest stable version of Redmine: http://www.redmine.org/projects/redmine/wiki/Download - Set up Redmine according to http://www.redmine.org/projects/redmine/wiki/RedmineInstall and point it to a fresh, empty MySQL database - Make sure this plain and empty Redmine installation works. ## Use the working Redmine installation with your Planio data - The Backup you can download from your Planio account contains a MySQL database dump, import that into another MySQL DB. - Change the database connection settings of your Redmine to point to this database. - The Planio backup also contains all the attachment data, move that to the *files* directory inside your Redmine installation. Uploads are segmented by year and month, the resulting folder structure should look like that: `redmine_directory/files/yyyy/mm/`. - Upgrade the database scheme to account for the new Redmine version http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade#Step-4-Update-the-database ## Set up open source plugins (optional) - Planio comes with [Agile](https://www.redmine.org/plugins/redmine_agile) and [Checklist](https://www.redmine.org/plugins/redmine_checklists) plugins pre-installed. We provide the Pro versions, but the Free versions will work as well (minus the pro-only features). Simply install these into the `plugins` directory of your Redmine setup if you want to continue using them. - Install required ruby libraries for the plugins (repeat the `bundle install` command from the initial setup) - Upgrade the database scheme to account for updates in the plugins compared to the versions Planio runs (again, see http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade#Step-4-Update-the-database) At this point you should have a working Redmine with your Planio data and optional Agile and Checklists plugins. ## Things you will lose when moving away from Planio The following modules are developed in-house by us and are only available to Planio customers: - Help Desk - Storage - Chat All corresponding data is included in the DB dump and files directory but lacking the plugins it will simply be ignored by your Redmine installation. ## Troubleshooting ### Delete custom field definitions for Planio data types ~~~sql DELETE custom_fields, custom_field_enumerations, custom_fields_projects, custom_fields_roles, custom_fields_trackers, custom_values FROM custom_fields LEFT JOIN custom_field_enumerations ON custom_field_enumerations.custom_field_id = custom_fields.id LEFT JOIN custom_fields_projects ON custom_fields_projects.custom_field_id = custom_fields.id LEFT JOIN custom_fields_roles ON custom_fields_roles.custom_field_id = custom_fields.id LEFT JOIN custom_fields_trackers ON custom_fields_trackers.custom_field_id = custom_fields.id LEFT JOIN custom_values ON custom_values.custom_field_id = custom_fields.id WHERE custom_fields.type IN ('CompanyCustomField', 'ContactCustomField', 'StorageFolderCustomField', 'StorageFileCustomField'); ~~~