{"id":19197000,"url":"https://github.com/jitesoft/gitlab-batch-migrate","last_synced_at":"2025-02-23T04:45:22.768Z","repository":{"id":43875395,"uuid":"251224772","full_name":"jitesoft/gitlab-batch-migrate","owner":"jitesoft","description":"Migrate all them projects between gitlab instances!","archived":false,"fork":false,"pushed_at":"2024-01-09T17:34:39.000Z","size":15,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-04T10:08:50.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jitesoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-30T06:50:33.000Z","updated_at":"2022-02-14T20:55:46.000Z","dependencies_parsed_at":"2022-09-24T23:52:13.484Z","dependency_job_id":null,"html_url":"https://github.com/jitesoft/gitlab-batch-migrate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jitesoft%2Fgitlab-batch-migrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jitesoft%2Fgitlab-batch-migrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jitesoft%2Fgitlab-batch-migrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jitesoft%2Fgitlab-batch-migrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jitesoft","download_url":"https://codeload.github.com/jitesoft/gitlab-batch-migrate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240271531,"owners_count":19774859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T12:15:14.955Z","updated_at":"2025-02-23T04:45:22.747Z","avatar_url":"https://github.com/jitesoft.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitLab bulk migrate\n\nThis tools is a collection of small scripts put together to migrate a rather large gitlab-ce instance to gitlab.com.\nIt's basically only tested \"live\", and seems to work okay.\n\nSome day I might put some more time in to clean it up, but it did what I wanted it to do for now, so here it is!\n\n\n## Install and Run!\n\nClone the project, pull the source (do whatever you feel like) and run npm install in the root! Then create the configuration.  \nAfter configuration is set, a simple `node .` \n\n## How it works:\n\nThe tool uses the gitlab v4 api and the export/import functionality, so your instance/s need to be able to use those features.  \nInitially it maps up all the groups that are on the instance (depending on sudo or not, it might not move all) and then\ngenerate groups on the second instance.  \nAfter group generation it will export each project from the `from` server and then import to the `to` server, each\njob is done one after another with a sleep of a few seconds to make sure that it does not hit the rate limit.  \nIf it for some reason does this anyway, it will sleep for 60 seconds and retry the current project.  \nSome projects might error out (to large file or similar), if that happens, the project name and id will be logged in\n`out/errors.log`.  \nFurther on, the `out` dir will be used to create a ns-cache.json file (containing the namespace/group cache) and as a \ntemp folder for downloading projects from the `from` instance.\n\n## Config\n\nCopy the `example-config.json` and rename it to `config.json`. The values are quite easy to understand...\n\n```json\n{\n    \"from\": {\n        \"url\": \"https://gitlab.example.com\",\n        \"key\": \"\",\n        \"sudo\": \"\"\n    },\n    \"to\": {\n        \"url\": \"https://gitlab.com\",\n        \"key\": \"\",\n        \"namespace\": \"\"\n    }\n}\n```\n\nFrom is the server which you are migrating from, to is the server it's going to.  \nThe `key` is a users private token (with api access).  \nThe From clause contains a `sudo` field. In case this is set, all projects from the server will be migrated, and it have to\nuse a user-name (key field must be for the same user) of a admin account.  \nThe `to` fields `namespace` key is a namespace on the receiving server which all the projects will use as root namespace.\n\n\n## Dependencies\n\nThe project uses [`axios`](https://github.com/axios/axios) (MIT) and [`form-data`](https://github.com/form-data/form-data) (MIT) as direct dependencies, \nas with all node projects, they in turn depends on a billion other projects, so be sure to do an audit or something before using the program.\n\n## Disclaimer\n\nUse this script at your own risk, me (nor Jitesoft) takes any responsibility for any issues with your gitlab installation, \naccounts or projects that might arise due to the usage of this application.  \nAs always, be sure to check the code for any type of oddities or bugs that might make you or your properties vulnerable!\n\n## License\n\n```text\nMIT License\n\nCopyright (c) 2020 Jitesoft\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjitesoft%2Fgitlab-batch-migrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjitesoft%2Fgitlab-batch-migrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjitesoft%2Fgitlab-batch-migrate/lists"}