.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "bup-get" "1" "2021-02-06" "Bup 0.32" "" .hy .SH NAME .PP bup-get - copy repository items (CAUTION: EXPERIMENTAL) .SH SYNOPSIS .PP bup get [-s \f[I]source-path\f[R]] [-r \f[I]host\f[R]:\f[I]path\f[R]] OPTIONS <(METHOD \f[I]ref\f[R] [\f[I]dest\f[R]])>\&... .SH DESCRIPTION .PP \f[C]bup get\f[R] copies the indicated \f[I]ref\f[R]s from the source repository to the destination repository (respecting \f[C]--bup-dir\f[R] and \f[C]BUP_DIR\f[R]), according to the specified METHOD, which may be one of \f[C]--ff\f[R], \f[C]--ff:\f[R], \f[C]--append\f[R], \f[C]--append:\f[R], \f[C]--pick\f[R], \f[C]--pick:\f[R], \f[C]--force-pick\f[R], \f[C]--force-pick:\f[R], \f[C]--new-tag\f[R], \f[C]--new-tag:\f[R], \f[C]--replace\f[R], \f[C]--replace:\f[R], or \f[C]--unnamed\f[R]. See the EXAMPLES below for a quick introduction. .PP The \f[I]ref\f[R] is the source repository reference of the object to be fetched, and the \f[I]dest\f[R] is the optional destination reference. A \f[I]dest\f[R] may only be specified for a METHOD whose name ends in a colon. For example: .IP .nf \f[C] bup get -s /source/repo --ff foo bup get -s /source/repo --ff: foo/latest bar bup get -s /source/repo --pick: foo/2010-10-10-101010 .tag/bar \f[R] .fi .PP As a special case, if \f[I]ref\f[R] names the \[lq]latest\[rq] save symlink, then bup will act exactly as if the save that \[lq]latest\[rq] points to had been specified, rather than the \[lq]latest\[rq] symlink itself, so \f[C]bup get foo/latest\f[R] will actually be interpreted as something like \f[C]bup get foo/2013-01-01-030405\f[R]. .PP In some situations \f[C]bup get\f[R] will evaluate a branch operation according to whether or not it will be a \[lq]fast-forward\[rq] (which requires that any existing destination branch be an ancestor of the source). .PP An existing destination tag can only be overwritten by a \f[C]--replace\f[R] or \f[C]--force-pick\f[R]. .PP When a new commit is created (i.e.\ via \f[C]--append\f[R], \f[C]--pick\f[R], etc.), it will have the same author, author date, and message as the original, but a committer and committer date corresponding to the current user and time. .PP If requested by the appropriate options, bup will print the commit, tree, or tag hash for each destination reference updated. When relevant, the tree hash will be printed before the commit hash. .PP Local \f[I]ref\f[R]s can be pushed to a remote repository with the \f[C]--remote\f[R] option, and remote \f[I]ref\f[R]s can be pulled into a local repository via \[lq]bup on HOST get \&...\[rq]. See \f[C]bup-on\f[R](1) and the EXAMPLES below for further information. .PP WARNING: This is one of the few bup commands that can modify your archives in intentionally destructive ways. Though if an attempt to join or restore the data you still care about succeeds after you\[cq]ve run this command, then that\[cq]s a fairly encouraging sign that it worked correctly. (The dev/compare-trees command in the source tree can be used to help test before/after results.) .SH METHODS .TP --ff \f[I]ref\f[R], --ff: \f[I]ref\f[R] \f[I]dest\f[R] fast-forward \f[I]dest\f[R] to match \f[I]ref\f[R]. If \f[I]dest\f[R] is not specified and \f[I]ref\f[R] names a save, set \f[I]dest\f[R] to the save\[cq]s branch. If \f[I]dest\f[R] is not specified and \f[I]ref\f[R] names a branch or a tag, use the same name for \f[I]dest\f[R]. .TP --append \f[I]ref\f[R], --append: \f[I]ref\f[R] \f[I]dest\f[R] append all of the commits represented by \f[I]ref\f[R] to \f[I]dest\f[R] as new commits. If \f[I]ref\f[R] names a directory/tree, append a new commit for that tree. If \f[I]dest\f[R] is not specified and \f[I]ref\f[R] names a save or branch, set \f[I]dest\f[R] to the \f[I]ref\f[R] branch name. If \f[I]dest\f[R] is not specified and \f[I]ref\f[R] names a tag, use the same name for \f[I]dest\f[R]. .TP --pick \f[I]ref\f[R], --pick: \f[I]ref\f[R] \f[I]dest\f[R] append the single commit named by \f[I]ref\f[R] to \f[I]dest\f[R] as a new commit. If \f[I]dest\f[R] is not specified and \f[I]ref\f[R] names a save, set \f[I]dest\f[R] to the \f[I]ref\f[R] branch name. If \f[I]dest\f[R] is not specified and \f[I]ref\f[R] names a tag, use the same name for \f[I]dest\f[R]. .TP --force-pick \f[I]ref\f[R], --force-pick: \f[I]ref\f[R] \f[I]dest\f[R] do the same thing as \f[C]--pick\f[R], but don\[cq]t refuse to overwrite an existing tag. .TP --new-tag \f[I]ref\f[R], --new-tag: \f[I]ref\f[R] \f[I]dest\f[R] create a \f[I]dest\f[R] tag for \f[I]ref\f[R], but refuse to overwrite an existing tag. If \f[I]dest\f[R] is not specified and \f[I]ref\f[R] names a tag, use the same name for \f[I]dest\f[R]. .TP --replace \f[I]ref\f[R], --replace: \f[I]ref\f[R] \f[I]dest\f[R] clobber \f[I]dest\f[R] with \f[I]ref\f[R], overwriting any existing tag, or replacing any existing branch. If \f[I]dest\f[R] is not specified and \f[I]ref\f[R] names a branch or tag, use the same name for \f[I]dest\f[R]. .TP --unnamed \f[I]ref\f[R] copy \f[I]ref\f[R] into the destination repository, without any name, leaving a potentially dangling reference until/unless the object named by \f[I]ref\f[R] is referred to some other way (cf.\ \f[C]bup tag\f[R]). .SH OPTIONS .TP -s, --source=\f[I]path\f[R] use \f[I]path\f[R] as the source repository, instead of the default. .TP -r, --remote=\f[I]host\f[R]:\f[I]path\f[R] store the indicated items on the given remote server. If \f[I]path\f[R] is omitted, uses the default path on the remote server (you still need to include the `:'). The connection to the remote server is made with SSH. If you\[cq]d like to specify which port, user or private key to use for the SSH connection, we recommend you use the \f[C]\[ti]/.ssh/config\f[R] file. .TP -c, --print-commits for each updated branch, print the new git commit id. .TP -t, --print-trees for each updated branch, print the new git tree id of the filesystem root. .TP --print-tags for each updated tag, print the new git id. .TP -v, --verbose increase verbosity (can be used more than once). With \f[C]-v\f[R], print the name of every item fetched, with \f[C]-vv\f[R] add directory names, and with \f[C]-vvv\f[R] add every filename. .TP --bwlimit=\f[I]bytes/sec\f[R] don\[cq]t transmit more than \f[I]bytes/sec\f[R] bytes per second to the server. This can help avoid sucking up all your network bandwidth. Use a suffix like k, M, or G to specify multiples of 1024, 1024*1024, 1024*1024*1024 respectively. .TP -\f[I]#\f[R], --compress=\f[I]#\f[R] set the compression level to # (a value from 0-9, where 9 is the highest and 0 is no compression). The default is 1 (fast, loose compression) .SH EXAMPLES .IP .nf \f[C] # Update or copy the archives branch in src-repo to the local repository. $ bup get -s src-repo --ff archives # Append a particular archives save to the pruned-archives branch. $ bup get -s src-repo --pick: archives/2013-01-01-030405 pruned-archives # Update or copy the archives branch on remotehost to the local # repository. $ bup on remotehost get --ff archives # Update or copy the local branch archives to remotehost. $ bup get -r remotehost: --ff archives # Update or copy the archives branch in src-repo to remotehost. $ bup get -s src-repo -r remotehost: --ff archives # Update the archives-2 branch on remotehost to match archives. # If archives-2 exists and is not an ancestor of archives, bup # will refuse. $ bup get -r remotehost: --ff: archives archives-2 # Replace the contents of branch y with those of x. $ bup get --replace: x y # Copy the latest local save from the archives branch to the # remote tag foo. $ bup get -r remotehost: --pick: archives/latest .tag/foo # Or if foo already exists: $ bup get -r remotehost: --force-pick: archives/latest .tag/foo # Append foo (from above) to the local other-archives branch. $ bup on remotehost get --append: .tag/foo other-archives # Append only the /home directory from archives/latest to only-home. $ bup get -s \[dq]$BUP_DIR\[dq] --append: archives/latest/home only-home \f[R] .fi .SH SEE ALSO .PP \f[C]bup-on\f[R](1), \f[C]bup-tag\f[R](1), \f[C]ssh_config\f[R](5) .SH BUP .PP Part of the \f[C]bup\f[R](1) suite. .SH AUTHORS Rob Browning .