oracle / oci-cli

Command Line Interface for Oracle Cloud Infrastructure
https://cloud.oracle.com/cloud-infrastructure
Other
436 stars 185 forks source link

Add support for non-interactive bulk-download #470

Open oby1 opened 2 years ago

oby1 commented 2 years ago

os object bulk-download provides an interactive prompt when the number of objects exceeds 1000:

You are downloading more than 1000 objects, do you want to overwrite all? [y/N]

This makes it difficult to use bulk-download within a script. Either a non-interactive flag (-y) or an option to provide a threshold greater than 1000 objects (--max-objects 100000) would be useful.

sangamdpatil commented 7 months ago

Use flags like --overwrite or --no-overwrite

oci os object bulk-download -ns mynamespace -bn mybucket --download-dir path/to/download/directory --overwrite
 oci os object bulk-download -ns mynamespace -bn mybucket --download-dir path/to/download/directory --no-overwrite

For reference: https://docs.oracle.com/en-us/iaas/tools/oci-cli/3.37.10/oci_cli_docs/cmdref/os/object/bulk-download.html#overwriting-or-skipping-files