{"id":27151317,"url":"https://github.com/hitthecodelabs/gcsbucketbridge","last_synced_at":"2026-04-24T16:03:00.765Z","repository":{"id":283348433,"uuid":"704316830","full_name":"hitthecodelabs/GCSBucketBridge","owner":"hitthecodelabs","description":"Migrate data between Google Cloud Storage (GCS) buckets","archived":false,"fork":false,"pushed_at":"2025-03-19T18:45:27.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T14:43:25.245Z","etag":null,"topics":["gcloud-sdk","gcs-bucket","gsutil","python","script"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/hitthecodelabs.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-10-13T02:19:33.000Z","updated_at":"2025-03-19T18:45:30.000Z","dependencies_parsed_at":"2025-03-19T19:38:37.293Z","dependency_job_id":null,"html_url":"https://github.com/hitthecodelabs/GCSBucketBridge","commit_stats":null,"previous_names":["hitthecodelabs/gcsbucketbridge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hitthecodelabs/GCSBucketBridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FGCSBucketBridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FGCSBucketBridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FGCSBucketBridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FGCSBucketBridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hitthecodelabs","download_url":"https://codeload.github.com/hitthecodelabs/GCSBucketBridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FGCSBucketBridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32230421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["gcloud-sdk","gcs-bucket","gsutil","python","script"],"created_at":"2025-04-08T14:39:30.548Z","updated_at":"2026-04-24T16:03:00.750Z","avatar_url":"https://github.com/hitthecodelabs.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Cloud Storage Bucket Migration\n\nThis project provides a script that helps to migrate data between Google Cloud Storage (GCS) buckets.\n\n## Prerequisites\n\n- Google Cloud SDK\n- Python 3.x\n- Google Cloud Storage Client for Python\n\n## Setup and Installation\n\n1. **Google Cloud SDK Installation:**\n   \n   Follow the instructions on the [official page](https://cloud.google.com/sdk/docs/install) to install and initialize the Google Cloud SDK.\n\n2. **Python Installation:**\n   \n   Ensure that Python 3.x is installed on your system. If not, download it from the [official website](https://www.python.org/downloads/).\n\n3. **Google Cloud Storage Client Installation:**\n   \n   Install Google Cloud Storage Client for Python using pip:\n\n   ```shell\n   pip install --upgrade google-cloud-storage\n   ```\n\n4. **Authentication:**\n\n   Ensure that you have the JSON key file for the Google Cloud Service Account and set it in your environment variables:\n\n   ```shell\n   export GOOGLE_APPLICATION_CREDENTIALS=\"path_to_your_service_account_file.json\"\n   ```\n\n## Usage\n\n### Step 1: Authentication and Project Configuration\n\n- Execute the following shell command to authenticate your gcloud CLI with Google Cloud:\n\n  ```shell\n  gcloud auth login\n  ```\n\n- Set your desired Google Cloud Project ID as the current project:\n\n  ```shell\n  gcloud config set project your_project_id\n  ```\n\n### Step 2: Service Account and Permissions\n\n- Ensure that a Service Account with the necessary permissions to access and modify GCS buckets is available.\n\n- Set permissions and create keys for the Service Account:\n\n  ```shell\n  gcloud iam service-accounts create your_service_account_name --description=\"your_description\" --display-name=\"your_display_name\"\n  gcloud projects add-iam-policy-binding your_project_id --member=serviceAccount:your_service_account_name@your_project_id.iam.gserviceaccount.com --role=roles/storage.objectViewer\n  gcloud iam service-accounts keys create ./your_key_name.json --iam-account your_service_account_name@your_project_id.iam.gserviceaccount.com\n  ```\n\n### Step 3: Run the Python Script\n\n- Execute the Python script to perform the bucket data migration:\n\n  ```shell\n  python bucket_migration.py\n  ```\n\n### Step 4: Data Migration\n\n- The script will perform the following operations:\n    - List all the files in the source bucket.\n    - Download the files from the source bucket to a temporary location.\n    - Upload the files from the temporary location to the destination bucket.\n   \n## Note\n\nEnsure to review and modify the `bucket_migration.py` script to set appropriate source and destination bucket names and other configurations as per your use-case.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhitthecodelabs%2Fgcsbucketbridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhitthecodelabs%2Fgcsbucketbridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhitthecodelabs%2Fgcsbucketbridge/lists"}