https://github.com/orisano/gcs-upload
gcs-upload is a command-line tool written in Go for uploading files to GCS
https://github.com/orisano/gcs-upload
Last synced: over 1 year ago
JSON representation
gcs-upload is a command-line tool written in Go for uploading files to GCS
- Host: GitHub
- URL: https://github.com/orisano/gcs-upload
- Owner: orisano
- License: mit
- Created: 2023-05-19T03:32:57.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-28T05:54:24.000Z (over 1 year ago)
- Last Synced: 2025-03-25T05:34:29.753Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 109 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gcs-upload
gcs-upload is a command-line tool written in Go for uploading files to Google Cloud Storage (GCS). It provides a convenient alternative to the `gsutil -m cp -r` command.
## Installation
### Binary Installation
You can download the binary for gcs-upload from the [Releases](https://github.com/orisano/gcs-upload/releases) page. Choose the appropriate binary for your operating system and architecture, and download it.
Alternatively, you can use the `go install` command to install gcs-upload directly:
```shell
go install github.com/orisano/gcs-upload@latest
```
### Container Image
A container image for gcs-upload is also available on ghcr.io. This image is intended for use with Cloud Build.
To use the container image, you can pull it using Docker:
```shell
docker pull ghcr.io/orisano/gcs-upload:
```
Replace `` with the desired version or tag of the image.
## Usage
To upload files to Google Cloud Storage (GCS) using gcs-upload, use the following command:
```shell
gcs-upload [options]
```
The `` argument specifies the target directory on GCS where the files will be uploaded. It should be in the form of a GCS path starting with `gs://`.
Options
- `-buf value`: Set the copy buffer size (default: 512k).
- `-chunk value`: Set the upload chunk size (default: 16m).
- `-d string`: Set the local directory containing the files to be uploaded.
- `-gc int`: Set the garbage collection (GC) interval.
- `-l string`: Upload files specified in the target list-file.
- `-n int`: Set the number of goroutines for uploading (default: 24).
- `-shuffle`: Shuffle the upload order.
- `-v`: Show verbose output.
Note: Square brackets in the command indicate optional parameters.
### Examples
Upload files from a specific local directory to a target directory on GCS:
```shell
gcs-upload -d gs://
```
## License
This project is licensed under the MIT License. See the LICENSE file for details.