gitlabhq/lib/tasks/gitlab/migrate_wiki.rake
Dan Knox f0aa54e0fb Create Wiki migration task.
This commit adds a new Rake task for migrating all of your existing
Wiki content from your database into new Gollum repositories.

The bulk of the logic happens within the `WikiToGollumMigrator`
class which is decently test covered and located in the lib directory.

The new Rake task can be executed by running:

   `bundle exec rake gitlab:wiki:migrate`

It will output a nice log of every project that it migrates along
with success or failure messages.

I have used it on my own installation to migrate my Wikis successfully.
2013-03-10 19:10:44 -07:00

21 lines
633 B
Ruby

namespace :gitlab do
namespace :wiki do
# This task will migrate all of the existing Wiki
# content stored in your database into the new
# Gollum Wiki system. A new repository named
# namespace/project.wiki.git will be created for
# each project that currently has Wiki pages in
# the database.
#
# Notes:
# * The existing Wiki content will remain in your
# database in-tact.
desc "GITLAB | Migrate Wiki content from database to Gollum repositories."
task :migrate => :environment do
wiki_migrator = WikiToGollumMigrator.new
wiki_migrator.migrate!
end
end
end