BUPSTASH-SYNC(1)

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

✨ bupstash-sync β€” the manual page, but make it a group chat ✨

okay so bestie, you're reading the bupstash-sync(1) page from the General Commands Manual and honestly? it's a good one. let's get into it πŸ’…


🌈 SYNOPSIS 🌈

Sync items and data from one bupstash repository to another. like, moving your little treasures from one vault to another vault, no cap.

bupstash sync [OPTIONS] --to $REMOTE [QUERY...]

πŸ’– DESCRIPTION πŸ’–

bupstash sync copies items and data from one repository to another, and it lowkey tries so hard to minimize unnecessary bandwidth usage while doing it. it's giving considerate queen behavior πŸ‘‘

the classic use case: you back up your files to a local repository (say, an external drive), and also efficiently upload them to an offsite location for safe storage. best of both worlds, fr fr 🫢

⚠️ okay important: when no query is specified, all items are synced β€” even those that do not match the current bupstash key. so like, it doesn't filter by your key, it just takes everything. don't say i didn't warn you 😭

πŸ¦‹ QUERY LANGUAGE πŸ¦‹

for the full documentation on the query language, go look at bupstash-query-language(7). it's a whole thing, go read it, iykyk.


πŸŽ€ QUERY CACHING πŸŽ€

the sync command uses the exact same query caching mechanisms as bupstash-list(1) β€” so check that page for more info on the query cache. same energy, same caching, slay ✨


πŸ’… OPTIONS πŸ’…

  • -r, --repository REPO β€” the repository to sync from. it can be in the form ssh://$SERVER/$PATH for remote repositories if ssh access is configured. if you don't specify it, it's set to BUPSTASH_REPOSITORY.
  • --to REPO β€” the destination repository to sync items to. may be of the form ssh://$SERVER/$PATH for remote repositories if ssh access is configured. if not specified, it's set to BUPSTASH_TO_REPOSITORY.
  • -k, --key KEY β€” the key used to decrypt metadata when executing a query. if it's not set, it defaults to BUPSTASH_KEY.
  • --query-cache PATH β€” path to the query-cache file. it 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. order matters bestie, respect the order 🫑
  • --query-encrypted β€” the query will not decrypt any metadata, which lets you list items you don't even have a decryption key for. iconic. this option inserts the pseudo query tag decryption-key-id.
  • --ids-from-stdin β€” sync items with IDs read from stdin, one per line, instead of executing a query.
  • --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, so like, it knows.)
  • -q, --quiet β€” be quiet. implies --no-progress. shhh 🀫

🌸 ENVIRONMENT 🌸

  • BUPSTASH_REPOSITORY β€” the repository to pull items from. may be of the form ssh://$SERVER/$PATH for 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.
  • BUPSTASH_TO_REPOSITORY β€” the repository to sync items to. may be of the form ssh://$SERVER/$PATH for remote repositories if ssh access is configured.
  • BUPSTASH_TO_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. (yes it's the _TO_ twin of the one above, they're siblings πŸ’œ)
  • 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 of BUPSTASH_KEY to fetch the key from arbitrary locations such as the network or other secret storage. spy behavior, love it πŸ•΅οΈβ€β™€οΈ
  • BUPSTASH_QUERY_CACHE β€” path to the query cache file to use.

⭐ EXAMPLES ⭐

πŸ“ Push all items from a local repository to a remote repository

$ bupstash sync --repository ./local-repository --to ssh://$REMOTE

🧚 Perform a backup locally then sync a copy to a remote repository

$ export BUPSTASH_REPOSITORY=./local-repository
$ id="$(bupstash put ./some-files)"
$ bupstash sync --to ssh://$REMOTE id="$id"

see how the $id gets reused? main character energy tbh πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole page!! this one's from May 2025, part of the General Commands Manual (bupstash-sync(1)) β€” go forth and sync your little heart out bestie πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from