{"id":13305701,"url":"https://github.com/eboukamza/google-drive-migration-tool","last_synced_at":"2025-03-10T13:32:20.710Z","repository":{"id":75563459,"uuid":"599119670","full_name":"eboukamza/google-drive-migration-tool","owner":"eboukamza","description":"Google Drive Migration Tool","archived":false,"fork":false,"pushed_at":"2023-02-08T13:50:59.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-06T22:10:45.606Z","etag":null,"topics":["cli","google-drive","google-drive-api-nodejs","google-workspace","migration","tool"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eboukamza.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-08T13:50:19.000Z","updated_at":"2023-05-04T09:02:37.000Z","dependencies_parsed_at":"2023-06-06T22:15:46.431Z","dependency_job_id":null,"html_url":"https://github.com/eboukamza/google-drive-migration-tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eboukamza%2Fgoogle-drive-migration-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eboukamza%2Fgoogle-drive-migration-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eboukamza%2Fgoogle-drive-migration-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eboukamza%2Fgoogle-drive-migration-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eboukamza","download_url":"https://codeload.github.com/eboukamza/google-drive-migration-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242859789,"owners_count":20196993,"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":["cli","google-drive","google-drive-api-nodejs","google-workspace","migration","tool"],"created_at":"2024-07-29T17:54:00.001Z","updated_at":"2025-03-10T13:32:20.703Z","avatar_url":"https://github.com/eboukamza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Drive Migration Tool\n\nTransfer the ownership between two different domains by coping folder hierarchy and files.\n\nThis tool is EXPERIMENTAL and is NOT an official tool. This tool is released WITHOUT ANY warranty of any kind.\n\n| Source                 | Dest                   |\n| ---------------------- | ---------------------- |\n| Google Workspace       | Google Account (gmail) |\n| Google Account (gmail) | Google Workspace       |\n| Google Workspace A     | Google Workspace B     |\n\n## Prerequisites\n\nnode +16\n\nFollow Develop on Google Workspace guide to set up an OAuth consent screen and OAuth Credentials\n\nhttps://developers.google.com/workspace/guides/get-started?hl=en_US\n\n1. Create a Google Cloud project\n2. Enable Drive API\n3. Configure OAuth consent screen\n4. Create OAuth credentials\n\n5. Create an .env file from .env_template (`cp .env_template .env`) and set up env vars.\n6. Build the project `yarn \u0026\u0026 yarn build`\n\n## Instructions\n\nTrash should be empty\n\n1. Share (with role Editor) files and folders to be transferred with the destination account.\n2. Create 'migrationSource' folder in the destination Drive account.\n3. Put inside all files and folders to be migrated\n4. Run the script `./bin/google-drive-migration-tool migrate`\n\nFirst time the script opens the browser to request the permissions to read and write files in Drive.\nCredentials are stored in a file named token.json. If you want to change the user you need to delete this file.\n\nCopied files are located at 'migrationDest' folder in the root (MyDrive)\n\n## Resources\n\nGoogle Auth reference:\nhttps://github.com/googleapis/google-auth-library-nodejs#oauth2\nhttps://cloud.google.com/nodejs/docs/reference/google-auth-library/latest\n\nInspired on https://www.npmjs.com/package/@google-cloud/local-auth to retrieve the auth token.\nhttps://developers.google.com/drive/api/quickstart/nodejs?hl=en_US#authorize_credentials_for_a_desktop_application\n\nGoogle Drive\n\nBased on https://developers.google.com/drive/api/quickstart/nodejs?hl=en_US\nApi reference: https://developers.google.com/drive/api/v3/reference\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feboukamza%2Fgoogle-drive-migration-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feboukamza%2Fgoogle-drive-migration-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feboukamza%2Fgoogle-drive-migration-tool/lists"}