TessariDBDocs
  • 0.34.2-betalatest
  • 0.34.1-beta
  • 0.34.0-beta
  • 0.33.4-beta
  • 0.33.3-beta
  • 0.33.2-beta
  • 0.33.1-beta
  • 0.33.0-beta
  • 0.32.0-beta

The command line

tessaridb-s3-cli: ls, cp, mv, rm, mb, rb, stat, presign and sync over the Rust client — with every deletion behind --yes and every change checked afterwards.

tessaridb-s3-cli does the work of the Rust client from a shell. It is Apache-2.0, like the client.

Credentials

The endpoint and credentials come from the environment (TESSARIDB_S3_ENDPOINT, TESSARIDB_S3_ACCESS_KEY, TESSARIDB_S3_SECRET_KEY, optionally TESSARIDB_S3_REGION) or, when those are not set, from a profile file at ~/.config/tessaridb-s3/credentials, which must be readable by its owner alone (chmod 600):

[default]
endpoint = https://s3.example.com
access_key = ...
secret_key = ...

--profile <name> picks another section. There is no flag for a secret: a command-line argument is visible to every process on the machine and stays in shell history.

Commands

tessaridb-s3-cli mb s3://photos
tessaridb-s3-cli cp holiday.jpg s3://photos/2026/
tessaridb-s3-cli ls s3://photos/ --recursive
tessaridb-s3-cli stat s3://photos/2026/holiday.jpg --json
tessaridb-s3-cli presign s3://photos/2026/holiday.jpg --expires 600
tessaridb-s3-cli sync ./albums s3://photos/albums
tessaridb-s3-cli rm s3://photos/2026 --recursive --yes
commandwhat it doeschanges data
ls [s3://bucket[/prefix]]the buckets, or one level of objects (--recursive: all of them)no
stat s3://bucket/keysize, ETag, CRC64NVME, last modifiedno
presign s3://bucket/keya download link (--put: an upload link), --expires seconds (default 3600, at most 604800)no
mb s3://bucketcreates the bucketyes
cp SOURCE DESTfile → object, object → file, or object → object; an existing destination is replaced only with --yesyes
sync SOURCE DESTa directory → a prefix, or back: copies what is missing or differs, never deletesyes
rb s3://bucket --yesdeletes an empty bucketdeletes
rm s3://bucket/key --yesdeletes an object; --recursive everything under a prefixdeletes
mv SOURCE DEST --yescopies, checks the copy, then deletes the sourcedeletes

Every command that changes data accepts --dry-run. A command that deletes refuses to run without --yes. After each change the server (or the file system) is asked again, and the command fails if the result is not what was asked.

sync decides a file is unchanged only when that is proven (equal size, then the MD5 a single-part ETag carries, otherwise the CRC64NVME the server keeps) and sends it otherwise. Going down, a key that would land outside the target directory is skipped, reported, and makes the run fail.

Exit codes

codemeaning
0done
2the command, a location or the settings are invalid; nothing was sent
3a safety check refused: the destination exists, the bucket is not empty, the object is missing
4the server or the file system failed
5it ran, but the check afterwards found a different result
130interrupted; an interrupted multipart upload stays open until it is aborted
The command line — TessariDB