.\" generated with Ronn-NG/v0.9.1 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 .SH "SYNOPSIS" Get data from a bupstash repository\. .P \fBbupstash get [OPTIONS] QUERY\|\.\|\.\|\.\fR .SH "DESCRIPTION" \fBbupstash get\fR fetches and decrypts data stored in a bupstash repository, sending it to stdout\. If the requested item was saved as a directory, the command converts it into a tar stream\. .P The item that is fetched is chosen based on a simple query against the tags specified when saving data with \fBbupstash put\fR\. .SH "QUERY LANGUAGE" For full documentation on the query language, see bupstash\-query\-language(7)\. .SH "QUERY CACHING" The get command uses the same query caching mechanisms as bupstash\-list(1), check that page for more information on the query cache\. .SH "SPARSE FILES" When getting a directory as a tarball sparse files are not treated specially, to restore sparse files while preserving the file holes use \fBbupstash restore\fR instead\. .SH "OPTIONS" .TP \-r, \-\-repository REPO The repository to connect 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_REPOSITORY\fR\. .TP \-k, \-\-key KEY Key that will be used to decrypt data and metadata\. If not set, defaults to \fBBUPSTASH_KEY\fR\. .TP \-\-pick PATH Fetch an individual file or sub\-directory from a snapshot\. .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 \-\-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 connect to\. 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_KEY Path to the 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 "Get an item with a specific id" \fB$ bupstash get id=14ebd2073b258b1f55c5bbc889c49db4 > \./data\.file\fR .SS "Get an item by name and timestamp" \fB$ bupstash get name=backup\.tar and timestamp=2020/19/* > \./restore\.tar\fR .SS "Get a file or sub\-tar from a directory snapshot" \fB$ bupstash get \-\-pick=path/to/file\.txt id=$id $ bupstash get \-\-pick=path/to/dir id=$id | tar \|\.\|\.\|\.\fR .SS "Get a tarball" The builtin directory put creates a tarball from a directory, so to extract it we use tar\. .P ``` # Snapshot a directory\. $ id=$(bupstash put \./data)$ mkdir restore $ bupstash get id=$id | tar \-C \./restore \-xvf \- ``` .SH "SEE ALSO" bupstash(1), bupstash\-put(1), bupstash\-list(1), bupstash\-restore(1), bupstash\-rm(1), bupstash\-keyfiles(7), bupstash\-query\-language(7)