BUPSTASH-LIST-CONTENTS(1)

πŸ“¦
version 0.12.0 Β· 3 versions
, in alpine 3.24

πŸ’… bupstash-list-contents(1) β€” the manual, but make it make sense ✨

okay bestie, so bupstash-list-contents is a whole mood. it lives in the General Commands section of the manual, and it's here to show you what's inside a snapshot. no cap, it's lowkey iconic.

✨ SYNOPSIS ✨

list the contents of a snapshot, bestie:

bupstash list-contents [OPTIONS] QUERY...

πŸŽ€ DESCRIPTION πŸŽ€

bupstash list-contents lists what's inside the item that matches your query. simple as that, fr fr.

here's the tea though: items created by using bupstash put on a directory get an associated index. other items? not listable. sorry bestie, it's giving "no index, no entry" πŸ’€.

🌈 OUTPUT FORMATS 🌈

🌸 Human

when --format is set to human, bupstash list-contents outputs aligned rows that look like this, periodt:

PERMS SIZE YYYY/MM/DD HH:MM:SS PATH...

the date included is the time of the last change to a given file, as reported by the operating system at the time of the snapshot. iykyk.

bestie, prefer using one of the versioned machine readable formats when writing scripts. the human format is cute for eyeballs, not for parsing πŸ’…

πŸ¦‹ JSONl1

when --format is set to jsonl1, bupstash list-contents outputs one json object per line. each line is giving main character energy and has this exact json schema:

{
  "path": string | [ bytes... ],
  "mode": number,
  "size": number,
  "uid": number,
  "gid": number,
  "mtime": number,
  "mtime_nsec": number,
  "ctime": number,
  "ctime_nsec": number,
  "norm_dev": number,
  "ino": number,
  "nlink": number,
  "link_target": string | null,
  "dev_major": number | null,
  "dev_minor": number | null,
  "xattrs": {string : string | [bytes...] ...} | null,
  "sparse": boolean,
  "data_hash": "$KIND[:$HEXBYTE]" | null
}

like, look at all those fields, we love a detailed queen πŸ‘‘.

πŸ”₯ QUERY LANGUAGE πŸ”₯

for the full documentation on the query language, see bupstash-query-language(7). no need to reinvent the wheel, bestie.

πŸ‘‘ QUERY CACHING πŸ‘‘

the list-contents command uses the same query caching mechanisms as bupstash-list(1). check that page for more info on the query cache β€” it's literally the same vibe.

πŸ’– OPTIONS πŸ’–

  • -r, --repository REPO β€” the repository to connect to, may be of the form ssh://$SERVER/$PATH for remote repositories if ssh access is configured. if not specified, is set to BUPSTASH_REPOSITORY. (yes, there's a little typo in the original with the double comma, but we're keeping it exactly as is, bestie β€” character for character, no cap.)
  • -k, --key KEY β€” key used to decrypt data and metadata. if not set, defaults to BUPSTASH_KEY. πŸ’…
  • --format FORMAT β€” set output format to one of the following: 'human', 'jsonl'. pick your fighter πŸ₯Š
  • --query-cache PATH β€” path to the query-cache file, defaults to one of the following, in order, provided the appropriate environment variables are set: $BUPSTASH_QUERY_CACHE, $XDG_CACHE_HOME/.cache/bupstash/bupstash.qcache or $HOME/.cache/bupstash/bupstash.qcache. it's giving "we have options" ✨
  • --pick PATH β€” list a sub-directory of the query. like zooming in on the main character πŸŽ€
  • --utc-timestamps β€” display and search against timestamps in utc time instead of local time. for when you're feeling global 🌍
  • -q, --quiet β€” be quiet, implies --no-progress. shhh 🀫

🌟 ENVIRONMENT 🌟

  • BUPSTASH_REPOSITORY β€” the repository to connect to. may be of the form ssh://$SERVER/$PATH for remote repositories if ssh access is configured. your go-to connection bestie.
  • BUPSTASH_REPOSITORY_COMMAND β€” a command to run to connect to an instance of bupstash-serve(1). this allows more complex connections to the repository for less common use cases. fancy, we love πŸ’…
  • BUPSTASH_KEY β€” path to a primary key that will be used for decrypting data and metadata. the key to the kingdom πŸ”‘
  • BUPSTASH_KEY_COMMAND β€” a command to run that must print the key data. can be used instead of BUPSTASH_KEY to fetch the key from arbitrary locations such as the network or other secret storage. spy kid vibes πŸ•΅οΈβ€β™€οΈ
  • BUPSTASH_QUERY_CACHE β€” path to the query cache file to use. cache me outside, how bout dat πŸ’Ύ

πŸ“ EXAMPLES πŸ“

🧚 get an item with a specific id from the repository

$ bupstash list-contents id="14eb*"
drwxr-xr-x 0     2020/10/30 13:32:04 .
-rw-r--r-- 1967  2020/10/30 13:32:04 data.txt

look at that beautiful output β€” data.txt is living its best life with 1967 bytes, and the directory is just vibing. slay πŸ’…βœ¨

🫢 SEE ALSO 🫢

bupstash(1), bupstash-put(1), bupstash-diff(1), bupstash-keyfiles(7), bupstash-query-language(7)


okay that's the whole page, bestie. go forth and list those contents like the icon you are πŸ’–. this was the BUPSTASH-LIST-CONTENTS(1) manual from May 2025, and honestly? she ate. periodt. πŸŒˆπŸ’…πŸŽ€

πŸ“¦ where this page comes from