Warning
The product is in closed beta and not open to the public.
s3¶
vb s3 SUBCOMMAND
Description¶
The s3 command manages buckets and objects on the S3 service.
Configuration is loaded from repository settings named s3-KEY, falling back to .vb-settings/vb-config [s3/default] when a check-out is open. Command-line options override both. If no repository or check-out configuration is available, all required configuration must come from options.
- Global options:
- --end-point-url URL
Endpoint URL such as http://127.0.0.1:9000
- --provider PROVIDER
S3 provider preset: aws or minio
- --access-key KEY
S3 access key
- --secret-key KEY
S3 secret key
- --addressing-style STYLE
path or virtual. Overrides provider default.
- --region REGION
The region to use. Overrides config/env settings.
- --timeout-ms N
Request timeout in milliseconds. Default: 3000
Subcommands¶
vb s3 ls¶
vb s3 ls [s3://BUCKET[/PREFIX]] [-r|--recursive] [--summarize]
Description¶
List all buckets when no argument is supplied.
If s3://BUCKET or s3://BUCKET/PREFIX is supplied, list objects
from that location. Without -r|–recursive only the top-level
prefixes and objects are shown, similar to aws s3 ls.
With -r|–recursive all matching objects under PREFIX are shown.
Options¶
- -r, --recursive¶
Recurse into child prefixes
- --summarize¶
Print total object count and total size
vb s3 mb¶
vb s3 mb s3://BUCKET
Description¶
Create a new bucket named BUCKET.
vb s3 rb¶
vb s3 rb s3://BUCKET [-f|--force]
Description¶
Remove the bucket named BUCKET.
Options¶
- -f, --force¶
Delete all objects in the bucket first, then remove the bucket
vb s3 rm¶
vb s3 rm s3://BUCKET/PATH
Description¶
Delete objects from BUCKET.
If PATH names an exact object, delete that object.
If PATH names a prefix, delete all objects having that prefix.
If PATH is ., delete all objects in the bucket.
Prefix deletion uses the actual S3 object list and does not traverse the local checkout.
vb s3 cp¶
vb s3 cp SOURCE DEST [--recursive] [--create-bucket] [--no-overwrite]
Description¶
?–jobs N? ?–exclude PATTERN? ?–include PATTERN?
Copy files between the local filesystem and S3.
At least one side must use the literal s3:// prefix, for
example s3://bucket/path. Local-to-local are not supported.
S3-to-S3 copies use the S3 CopyObject API.
Recursive filtering follows aws s3 cp semantics. Later
matching –include or –exclude rules override earlier ones.
Options¶
- -r, --recursive¶
Recurse into directories
- --create-bucket¶
Create the destination bucket if not exist
- --no-overwrite¶
Skip objects that already exist on destination
- -j, --jobs N¶
Active S3 connections for transfer (default: 8)
- --exclude PATTERN¶
Exclude paths matching PATTERN
- --include PATTERN¶
Include paths matching PATTERN
vb s3 sync¶
vb s3 sync SOURCE DEST [--delete]
Description¶
Synchronize SOURCE into DEST using relative path keys.
- SOURCE and DEST may be:
local-path s3://BUCKET[/PREFIX]
The sync is one-way. Files missing from DEST are copied. Files present on both sides are copied again if the source size differs or if the source modification time is newer than DEST. Extra files on DEST are left unchanged unless –delete is used.
Options¶
- --delete¶
Remove files present only on DEST