gcs_copy

command module
v0.0.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

README

gcs_copy

small command line util to transfer files between local or nfs mount <==> gcp bucket.
much faster then gsutil

get latest compiled exec at: https://github.com/piplcom/gcs_copy/releases

usage examples
Run As A Service
./gcs_copy -api -port 8082 -bindip '0.0.0.0'

to start copy send POST request to /run endpoing

{
    "Conc": 2,
    "In":   "gs://bucketx/test",
    "Out":  "/bigdir/test6"
    "Check": true // for dry run (to get sizes to copy) default false
}

for regex in directory use ** /tmp/testdir/** will work same as /tmp/testdir/ (without blob)

{
    "Conc": 64,
    "In":   "/tmp/testdir/files**",
    "Out":  "gs://bucket66/test1"
    "Check": true // for dry run (to get sizes to copy) default false
}

to get status GET /state

to get dirs sizes GET /size (no regex!):

[
    "/Users/yosef.yudilevich/git/gcs_copy/test/aa",
    "/Users/yosef.yudilevich/git/gcs_copy/test/bb"
]
Download:
./gcs_copy -out /dir1/dir2/ -in gs://BUCKET/obj1/obj2/ -conc 64
Upload:
./gcs_copy  -in /dir1/dir2/ -out gs://BUCKET/obj1/obj2/ -conc 64
flags:
  -conc:  concurrent streams (usually 64 is good to utilize max of the system)
          set more for lots of small files
  -check: dry run (to check upload total size and files number)
using nfs as local mount

set this option in nfs mount options

nconnect=16

(from: https://www.suse.com/support/kb/doc/?id=000019933)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL