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.
This commit is contained in:
parent
1479f17227
commit
f0aa54e0fb
3 changed files with 237 additions and 0 deletions
20
lib/tasks/gitlab/migrate_wiki.rake
Normal file
20
lib/tasks/gitlab/migrate_wiki.rake
Normal file
|
@ -0,0 +1,20 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue