0
votes

How to copy files from a remote server to google cloud storage bucket over SSH? This question outlines how to copy files from a google compute engine instance to google cloud storage which is not what I need.

The files are too large to download to my local machine before uploading them. Is it possible to do something like this:

ssh -p 2455 skiventist@myremoteserver | gsutil cp -r /path/to/remote_folder :gs//mybucket

Error:

CommandException: No URLs matched: /path/to/remote_folder
1

1 Answers

0
votes

it doesn't matter if it's GCE or another server, they are both remote servers. you need to:

1- ssh into your remote server

2- make sure that you have gsutil installed and that you are authorized to manage the bucket.

3- copy the files to that remote server: gsutil cp -r /path/to/remote_folder gs//mybucket

you can use also -m flag which will perform a parallel multi-threaded/multi-processing and make the transfer even faster.

check this doc for more info