Moving Redmine Wiki pages and Connecting to the Bitnami MySQL instance
Apparently, you can’t move wiki pages between
Redmine projects like you can with Redmine issues.
I found this out because I was trying to rename a project’s URL in Redmine, but once the identifier is assigned, I guess you can’t do that either. Or perhaps you can using a similar method to what I discuss here, I just didn’t think to go back and try mucking with the ID directly in MySQL.
In any case, the next best thing is to go into the MySQL tables and reassign the wiki_id of the pages you want to move. So I made my new project, then tried to find a client with which to manipulate the tables.
I’m running Bitnami’s Redmine 0.8.4 on Windows, and after a little while I came across the MySQL GUI Tools Bundle. They have a nice Windows installer, which worked fine.
The only trouble I had initially was getting the credentials. I didn’t have any network issues, as I loaded the tools directly on the same server. When it asked me for the connection details, I found I had to look up the username and password. These are stored in Redmine’s database.yml file, under the production instance, which is located in Redmine’s config directory.
The GUI Query tool complained that I didn’t specify a default schema, mainly because I had no idea which one’s were available. Apparently Bitnami gets in on the act here, since once I was able to open the database I could see the schema name is actually “bitname_redmine”. This was ok by me.
The last piece was actually getting the identifiers and issuing the update.
From the “wikis” table I was able to get the id (not “project_id”) of the wikis in question. I had to do the select manually since there didn’t seem to be a simple way to make the tool show me the table contents automatically.
Then the query was something like:
Redmine projects like you can with Redmine issues.
I found this out because I was trying to rename a project’s URL in Redmine, but once the identifier is assigned, I guess you can’t do that either. Or perhaps you can using a similar method to what I discuss here, I just didn’t think to go back and try mucking with the ID directly in MySQL.
In any case, the next best thing is to go into the MySQL tables and reassign the wiki_id of the pages you want to move. So I made my new project, then tried to find a client with which to manipulate the tables.
I’m running Bitnami’s Redmine 0.8.4 on Windows, and after a little while I came across the MySQL GUI Tools Bundle. They have a nice Windows installer, which worked fine.
The only trouble I had initially was getting the credentials. I didn’t have any network issues, as I loaded the tools directly on the same server. When it asked me for the connection details, I found I had to look up the username and password. These are stored in Redmine’s database.yml file, under the production instance, which is located in Redmine’s config directory.
The GUI Query tool complained that I didn’t specify a default schema, mainly because I had no idea which one’s were available. Apparently Bitnami gets in on the act here, since once I was able to open the database I could see the schema name is actually “bitname_redmine”. This was ok by me.
The last piece was actually getting the identifiers and issuing the update.
From the “wikis” table I was able to get the id (not “project_id”) of the wikis in question. I had to do the select manually since there didn’t seem to be a simple way to make the tool show me the table contents automatically.
Then the query was something like:
UPDATE wiki_pagesExecuting the query worked, and then I was able to list all of the pages under the index of the new Wiki through Redmine. One last touch was to copy and paste the contents of the old start page to the new start page manually. Then I deleted the old start page and I was done.
SET wiki_id = <new>
WHERE wiki_id = <old>