BUPSTASH-DIFF(1)
π BUPSTASH-DIFF(1) β the diff page, but make it cute
okay bestie so this is a page from the General Commands Manual, and it's literally all about bupstash diff. buckle up, it's actually so good π¦
β¨ SYNOPSIS β¨
Diff two snapshots and print the summary to stdout. that's the whole vibe.
bupstash diff [OPTIONS] QUERY1... :: QUERY2...
πΈ DESCRIPTION πΈ
bupstash diff fetches two snapshot listings from the remote server and compares them, then prints the diff line output to stdout. so far so normal, right? π
Buuut here's the special case: if either query starts with './' or '/', a temporary listing gets created for that local directory so it can be compared too. local dir girlies stay winning π
and like, why use this instead of just running traditional diff against the output of bupstash list-contents? because bupstash diff is preferred, obviously β it takes the full precision of timestamps into account and the stored file hash when it performs the diff operation. traditional diff could never π
bupstash also supports ignoring items in the diff comparison to help with analysis. useful examples are the --ignore values times (to ignore file modification timestamps) and content (to ignore file size and hash changes). obsessed with the flexibility ngl π«Ά
β OUTPUT FORMAT β
Output is consistent with that of bupstash list-contents, except each line is prefixed with either + or -, representing removed or added items respectively. cute little markers, very demure πΈ
specifying --format alters the underlying output format as described by bupstash-list-contents(1). and the good news? lines are still prefixed with either + or - regardless of the output format. no cap, the prefix stays π₯
π¦ QUERY LANGUAGE π¦
for the full documentation on the query language, see bupstash-query-language(7). go read it, it's giving reference material π
π QUERY CACHING π
the diff command uses the same query caching mechanisms as bupstash-list(1). check that page for more info on the query cache β it's all there i promise π
β¨ OPTIONS β¨
-r,--repository REPOβ the repository to connect to, may be of the formssh://$SERVER/$PATHfor remote repositories if ssh access is configured. if not specified, it's set toBUPSTASH_REPOSITORYπ-k,--key KEYβ the key used to decrypt data and metadata. if not set, defaults toBUPSTASH_KEYπ--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.qcacheor$HOME/.cache/bupstash/bupstash.qcache. order matters bestie π-i,--ignoreβ comma separated list of file attributes to ignore in comparisons. valid items are'content,dev,devnos,inode,type,perms,nlink,uid,gid,times,xattrs'π--relaxedβ shortcut for--ignore 'dev,inode,nlink,uid,gid,times,xattrs'. this one's useful for comparing content without being so concerned with machine specific metadata. so chill of it π§--{left,right}-pick PATHβ perform the diff on a sub-directory of the left/right query π―--indexer-threads Nβ number of processor threads to use for pipelined parallel file hashing and metadata reads. defaults to the number of processors. go parallel or go home β‘--xattrsβ fetch xattrs when indexing a local directories π--format FORMATβ set output format to one of the following:'human','jsonl'π--utc-timestampsβ display and search against timestamps in utc time instead of local time π--no-progressβ suppress progress indicators. (progress indicators are also suppressed when stderr is not an interactive terminal, fyi) π-q,--quietβ be quiet, implies--no-progressπ€«
πΈ ENVIRONMENT πΈ
BUPSTASH_REPOSITORYβ the repository to connect to. may be of the formssh://$SERVER/$PATHfor remote repositories if ssh access is configured π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. niche but iconic πBUPSTASH_KEYβ path to a primary key that will be used for decrypting data and metadata πBUPSTASH_KEY_COMMANDβ a command to run that must print the key data. can be used instead ofBUPSTASH_KEYto fetch the key from arbitrary locations such as the network or other secret storage. spy shit, love it π΅οΈBUPSTASH_QUERY_CACHEβ path to the query cache file to use ποΈ
π¦ EXAMPLES π¦
compare two snapshots by query
$ bupstash diff id="14eb*" :: id="57de*"
- -rw-r--r-- 1.1kB hello.txt
+ -rw-r--r-- 1.3kB goodbye.txt
look at that, one file gone, one file arrived. character development π
compare a snapshot and a local directory
$ bupstash diff --left-pick files --relaxed id="57de*" :: ./files
see how ./files kicks off that local-directory special case? chefs kiss πβ¨
π SEE ALSO π
bupstash(1), bupstash-list(1), bupstash-keyfiles(7), bupstash-query-language(7)
that's the whole page bestie, go diff something π«Ά
sign-off: this adorableness comes to you from May 2025, sourced straight out of the General Commands Manual edition of BUPSTASH-DIFF(1). periodt. π
π
π¦ where this page comes from
- alpine 3.24: bupstash-doc 0.12.0-r7 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms