exo Verified current stable Not installed? Cloud Infrastructure

Exo / Upload File To Bucket

Upload File To Bucket

Upload a file to a specified storage bucket using the Exo CLI.

$
Terminal
exo storage put <path/to/file> <bucket_name>/<prefix/>

When To Use

When migrating data to cloud storage or when updating files in existing buckets.

Pro Tip

Pay attention to the retry logic; transient network issues can cause uploads to fail, leading to incomplete data states.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
exo storage put <path/to/file> <bucket_name>/<prefix/>

Anatomy of Output

Understanding the result

Uploading file: document.txt to bucket: bucket-name-123 Upload Status

Confirms the file being uploaded and the target bucket.

Upload complete: document.txt | Size: 2 MB | Status: Success Completion Info

Details regarding the uploaded file and its size.

File location: gs://bucket-name-123/document.txt Final Path

Indicates the final path of the uploaded file.

Troubleshooting

Common pitfalls

Error: File not found.

Solution: Verify that the file path is correct and the file is accessible.

Error: Bucket not found.

Solution: Ensure the specified bucket name exists and is accessible.

Error: Upload interrupted, connection lost.

Solution: Retry the upload in case of transient network issues or check your internet connection.

Command Breakdown

What each part is doing

exo
Base Command
The executable that performs this operation. Here it runs Exo before the shell applies any redirect operators.
<path/to/file>
Input Files
The file path or paths supplied to this command.
<bucket_name>
bucket name
The value supplied for bucket name.
<prefix/>
prefix
The value supplied for prefix.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.