Abort gsutil transfer
Asked Answered
J

2

7

I am transferring a folder containing 100+ heavy files (several hundred MB) gsutil to my google cloud storage (Nearline). I've made a mistake in path of the destination folder. So I am looking for a way to abort the transfer.

Here is the command I used:

python c:\gsutil\gsutil -m cp -r -n berlin gs://bucket/berlin

So only solution I know (I am a newbie) is to simply close CMD. But I guess this isn't the right way to do it and I wonder what will happen to the temporary files (the files that were uploading but not completed when I closed CMD).

So here are my questions:

  1. Is there another way to abort the transfer than closing CMD?
  2. If this is the only solution, should I care about the temporary files : e.g. should I delete then to avoid unnecessary storage fee? If yes, how can I do that.
Julieannjulien answered 22/11, 2015 at 14:28 Comment(0)
C
4

You can ^C the operation under Windows/cmd.

Concur answered 22/11, 2015 at 15:37 Comment(5)
Thanks Mike. Do you mean Ctrl-C? If yes, I tried but it didn't stop the transfer.Julieannjulien
That's odd. What about Ctrl-BREAK?Leucomaine
CTRL+SHIFT+C worked for me : it's giving me Caugh signal 2 - exitingJulieannjulien
Actually CTRL+Shift+C, only works for none multi-threaded transfer. This shorcut doesn't work when the command is python c:\gsutil\gsutil -m cp -r -n berlin gs://bucket/berlin. I also tried on Clink but here again it doesn't work for multi-threaded transferJulieannjulien
What version of Windows are you using? I was able to Ctrl-C a multi-threaded gsutil running on Windows 7.Concur
W
2

mike-schwartz (the Boulder one, maybe the Austin one) is correct, but there is a little more that can be added. Uploads are resumable.

Cp has an automatic protocol which stores upload information in the .gsutil folder. It is documented in the resumable transfers section of the gsutil cp command.

There is also an Google api json article about sending a DELETE request (presumably 'gsutil delete gs://...whatever' but the example simply shows 'DELETE ...') but you probably want to edit (e.g. make a subfolder and move those items to it until you are certain they can be permanently removed) the contents of your .gsutil to clear the ones you want cancelled removed. It would be useful to have a flag that ignores or clears the resumables on a particular target rather than manually editing a folder contents.

Weather answered 29/12, 2018 at 18:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.