diff options
-rw-r--r-- | doc/README.md | 1 | ||||
-rw-r--r-- | doc/workflow/import_export/README.md (renamed from doc/administration/import_export.md) | 8 | ||||
-rw-r--r-- | lib/tasks/gitlab/import_export.rake | 13 |
3 files changed, 18 insertions, 4 deletions
diff --git a/doc/README.md b/doc/README.md index 5d89d0c9821..f51069b2c30 100644 --- a/doc/README.md +++ b/doc/README.md @@ -7,6 +7,7 @@ - [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab. - [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab. - [Importing to GitLab](workflow/importing/README.md). +- [Importing and exporting projects between instances](workflow/import_export/README.md). - [Markdown](markdown/markdown.md) GitLab's advanced formatting system. - [Migrating from SVN](workflow/importing/migrating_from_svn.md) Convert a SVN repository to Git and GitLab - [Permissions](permissions/permissions.md) Learn what each role in a project (external/guest/reporter/developer/master/owner) can do. diff --git a/doc/administration/import_export.md b/doc/workflow/import_export/README.md index 950899dc04b..5349cca7172 100644 --- a/doc/administration/import_export.md +++ b/doc/workflow/import_export/README.md @@ -1,7 +1,7 @@ # Project import/export Existing projects running on any GitLab instance or GitLab.com can be exported -with all its related data and be moved to a new GitLab instance. +with all its related data and be moved into a new GitLab instance. >**Note:** - This feature was [introduced][ce-3050] in GitLab 8.9 @@ -51,14 +51,14 @@ can be generated again ## Advanced -> The GitLab Import/Export version can be checked by using: +The GitLab Import/Export version can be checked by using: ```bash cd /home/git/gitlab -sudo -u git -H bundle exec rake gitlab:import_export:version +sudo -u git -H bundle exec rake gitlab:import_export:version RAILS_ENV=production ``` -> The current list of DB tables that will get exported can be listed by using: +The current list of DB tables that will get exported can be listed by using: ```bash cd /home/git/gitlab diff --git a/lib/tasks/gitlab/import_export.rake b/lib/tasks/gitlab/import_export.rake new file mode 100644 index 00000000000..c2c6031db67 --- /dev/null +++ b/lib/tasks/gitlab/import_export.rake @@ -0,0 +1,13 @@ +namespace :gitlab do + namespace :import_export do + desc "GitLab | Show Import/Export version" + task version: :environment do + puts "Import/Export v#{Gitlab::ImportExport.version}" + end + + desc "GitLab | Display exported DB structure" + task data: :environment do + puts YAML.load_file(Gitlab::ImportExport.config_file)['project_tree'].to_yaml(:SortKeys => true) + end + end +end |