Skip to content

Instantly share code, notes, and snippets.

@sergeykish
Last active June 15, 2020 16:05
Show Gist options
  • Save sergeykish/2e1ef39badb5bc0411d13c40349c0673 to your computer and use it in GitHub Desktop.
Save sergeykish/2e1ef39badb5bc0411d13c40349c0673 to your computer and use it in GitHub Desktop.
gsutil rsync # same name for file and folder
$ gsutil rsync -r gs://sergeykish.com .
> /opt/google-cloud-sdk/bin/bootstrapping/gsutil.py(6)<module>()
-> """A convenience wrapper for starting gsutil."""
(Pdb) b /opt/google-cloud-sdk/lib/googlecloudsdk/calliope/exceptions.py:527
Breakpoint 1 at /opt/google-cloud-sdk/lib/googlecloudsdk/calliope/exceptions.py:527
(Pdb) c
WARNING: gsutil rsync uses hashes when modification time is not available at
both the source and destination. Your crcmod installation isn't using the
module's C extension, so checksumming will run very slowly. If this is your
first rsync since updating gsutil, this rsync can take significantly longer than
usual. For help installing the extension, please see "gsutil help crcmod".
Building synchronization state...
Starting synchronization...
Copying gs://sergeykish.com/linux-poulsbo-emgd/emgd-3.8-fix.patch...
OSError: Not a directory..6 KiB]
The program exited via sys.exit(). Exit status: 1
> /opt/google-cloud-sdk/bin/bootstrapping/gsutil.py(6)<module>()
-> """A convenience wrapper for starting gsutil."""
$ gsutil rsync -r gs://sergeykish.com .
> /opt/google-cloud-sdk/bin/bootstrapping/gsutil.py(6)<module>()
-> """A convenience wrapper for starting gsutil."""
(Pdb) import sys
(Pdb) old_sys_exit = sys.exit
(Pdb) def new_sys_exit (value) : breakpoint()
(Pdb) sys.exit = new_sys_exit
(Pdb) b new_sys_exit
End of file
(Pdb) c
WARNING: gsutil rsync uses hashes when modification time is not available at
both the source and destination. Your crcmod installation isn't using the
module's C extension, so checksumming will run very slowly. If this is your
first rsync since updating gsutil, this rsync can take significantly longer than
usual. For help installing the extension, please see "gsutil help crcmod".
Building synchronization state...
Starting synchronization...
Copying gs://sergeykish.com/linux-poulsbo-emgd/emgd-3.8-fix.patch...
OSError: Not a directory..6 KiB]
--Return--
> <stdin>(1)new_sys_exit()->None
(Pdb) where
/usr/lib/python3.8/runpy.py(194)_run_module_as_main()
-> return _run_code(code, main_globals, None,
/usr/lib/python3.8/runpy.py(87)_run_code()
-> exec(code, run_globals)
/usr/lib/python3.8/pdb.py(1730)<module>()
-> pdb.main()
/usr/lib/python3.8/pdb.py(1703)main()
-> pdb._runscript(mainpyfile)
/usr/lib/python3.8/pdb.py(1572)_runscript()
-> self.run(statement)
/usr/lib/python3.8/bdb.py(580)run()
-> exec(cmd, globals, locals)
<string>(1)<module>()
/opt/google-cloud-sdk/bin/bootstrapping/gsutil.py(6)<module>()
-> """A convenience wrapper for starting gsutil."""
/opt/google-cloud-sdk/bin/bootstrapping/gsutil.py(102)main()
-> bootstrapping.ExecutePythonTool('platform/gsutil', 'gsutil', *args)
/opt/google-cloud-sdk/bin/bootstrapping/bootstrapping.py(107)ExecutePythonTool()
-> _ExecuteTool(
/opt/google-cloud-sdk/bin/bootstrapping/bootstrapping.py(199)_ExecuteTool()
-> execution_utils.Exec(args + sys.argv[1:], env=_GetToolEnv())
/opt/google-cloud-sdk/lib/googlecloudsdk/core/execution_utils.py(357)Exec()
-> sys.exit(ret_val)
> <stdin>(1)new_sys_exit()->None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment