BUPSTASH-SYNC(1)
β¨ 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,--repositoryREPO β the repository to sync from. it can be in the formssh://$SERVER/$PATHfor remote repositories if ssh access is configured. if you don't specify it, it's set toBUPSTASH_REPOSITORY.--toREPO β the destination repository to sync items to. may be of the formssh://$SERVER/$PATHfor remote repositories if ssh access is configured. if not specified, it's set toBUPSTASH_TO_REPOSITORY.-k,--keyKEY β the key used to decrypt metadata when executing a query. if it's not set, it defaults toBUPSTASH_KEY.--query-cachePATH β 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 tagdecryption-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 formssh://$SERVER/$PATHfor remote repositories if ssh access is configured.BUPSTASH_REPOSITORY_COMMANDβ a command to run to connect to an instance ofbupstash-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 formssh://$SERVER/$PATHfor remote repositories if ssh access is configured.BUPSTASH_TO_REPOSITORY_COMMANDβ a command to run to connect to an instance ofbupstash-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 ofBUPSTASH_KEYto 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
- 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