.\" generated with Ronn-NG/v0.9.1 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 .SH "SYNOPSIS" Sync items and data from one bupstash repository to another\. .P \fBbupstash sync [OPTIONS] \-\-to $REMOTE [QUERY\|\.\|\.\|\.]\fR .SH "DESCRIPTION" \fBbupstash sync\fR copies items and data from one repository to another while attempting to minimize unnecessary bandwidth usage\. .P A typical use of this command is to backup files to a local repository (e\.g\. and external drive) while also efficiently uploading them to an offsite location for safe storage\. .P Note that when no query is specified all items are synced, even those that do not match the current bupstash key\. .SH "QUERY LANGUAGE" For full documentation on the query language, see bupstash\-query\-language(7)\. .SH "QUERY CACHING" The sync command uses the same query caching mechanisms as bupstash\-list(1), check that page for more information on the query cache\. .SH "OPTIONS" .TP \-r, \-\-repository REPO The repository to sync from\. May be of the form \fBssh://$SERVER/$PATH\fR for remote repositories if ssh access is configured\. If not specified, is set to \fBBUPSTASH_REPOSITORY\fR\. .TP \-\-to REPO The destination repository to sync items to\. May be of the form \fBssh://$SERVER/$PATH\fR for remote repositories if ssh access is configured\. If not specified, is set to \fBBUPSTASH_TO_REPOSITORY\fR\. .TP \-k, \-\-key KEY Key used to decrypt metadata when executing a query\. If not set, defaults to \fBBUPSTASH_KEY\fR\. .TP \-\-query\-cache PATH Path to the query\-cache file, defaults to one of the following, in order, provided the appropriate environment variables are set, \fB$BUPSTASH_QUERY_CACHE\fR, \fB$XDG_CACHE_HOME/\.cache/bupstash/bupstash\.qcache\fR or \fB$HOME/\.cache/bupstash/bupstash\.qcache\fR\. .TP \-\-query\-encrypted The query will not decrypt any metadata, allowing you to list items you do not have a decryption key for\. This option inserts the pseudo query tag \'decryption\-key\-id\'\. .TP \-\-ids\-from\-stdin Sync items with IDs read from stdin, one per line, instead of executing a query\. .TP \-\-utc\-timestamps Display and search against timestamps in utc time instead of local time\. .TP \-\-no\-progress Suppress progress indicators (Progress indicators are also suppressed when stderr is not an interactive terminal)\. .TP \-q, \-\-quiet Be quiet, implies \-\-no\-progress\. .SH "ENVIRONMENT" .TP BUPSTASH_REPOSITORY The repository to pull items from\. May be of the form \fBssh://$SERVER/$PATH\fR for remote repositories if ssh access is configured\. .TP 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\. .TP BUPSTASH_TO_REPOSITORY The repository to sync items to\. May be of the form \fBssh://$SERVER/$PATH\fR for remote repositories if ssh access is configured\. .TP 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\. .TP BUPSTASH_KEY Path to a primary key that will be used for decrypting data and metadata\. .TP 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\. .TP BUPSTASH_QUERY_CACHE Path to the query cache file to use\. .SH "EXAMPLES" .SS "Push all items from a local repository to a remote repository" \fB$ bupstash sync \-\-repository \./local\-repository \-\-to ssh://$REMOTE\fR .SS "Perform a backup locally then sync a copy to a remote repository" \fB$ export BUPSTASH_REPOSITORY=\./local\-repository $ id="$(bupstash put \./some\-files)" $ bupstash sync \-\-to ssh://$REMOTE id="$id"\fR .SH "SEE ALSO" bupstash(1), bupstash\-query\-language(7)