Commit 1ae32ccf authored by Félix Sipma's avatar Félix Sipma

Update upstream source from tag 'upstream/0.9.0+ds'

Update to upstream version '0.9.0+ds'
with Debian dir 2cd57ca823dc9ac89fbf44cd58b58f17a69c0944
parents 0e3c7923 f3635cfc
......@@ -25,7 +25,7 @@ Link issues and relevant forum posts here.
- [ ] I have read the [Contribution Guidelines](https://github.com/restic/restic/blob/master/CONTRIBUTING.md#providing-patches)
- [ ] I have added tests for all changes in this PR
- [ ] I have added documentation for the changes (in the manual)
- [ ] There's a new file in a subdir of `changelog/x.y.z` that describe the changes for our users (template [here](https://github.com/restic/restic/blob/master/changelog/changelog-entry.tmpl))
- [ ] There's a new file in `changelog/unreleased/` that describes the changes for our users (template [here](https://github.com/restic/restic/blob/master/changelog/TEMPLATE))
- [ ] I have run `gofmt` on the code in all commits
- [ ] All commit messages are formatted in the same style as [the other commits in the repo](https://github.com/restic/restic/blob/master/CONTRIBUTING.md#git-commits)
- [ ] I'm done, this Pull Request is ready for review
language: go
sudo: false
go:
- "1.8.x"
- "1.9.x"
- "1.10"
os:
- linux
- osx
env:
matrix:
RESTIC_TEST_FUSE=0
matrix:
exclude:
- os: osx
go: "1.8.x"
- os: osx
go: "1.9.x"
- os: linux
go: "1.10"
include:
- os: linux
go: "1.10"
go: "1.9.x"
env: RESTIC_TEST_FUSE=0 RESTIC_TEST_CLOUD_BACKENDS=0
# only run fuse and cloud backends tests on Travis for the latest Go on Linux
- os: linux
go: "1.10.x"
sudo: true
env:
RESTIC_TEST_FUSE=1
- os: osx
go: "1.10.x"
env: RESTIC_TEST_FUSE=0 RESTIC_TEST_CLOUD_BACKENDS=0
branches:
only:
......
This diff is collapsed.
......@@ -10,38 +10,38 @@
[[projects]]
name = "cloud.google.com/go"
packages = ["compute/metadata"]
revision = "767c40d6a2e058483c25fa193e963a22da17236d"
version = "v0.18.0"
revision = "4b98a6370e36d7a85192e7bad08a4ebd82eac2a8"
version = "v0.20.0"
[[projects]]
name = "github.com/Azure/azure-sdk-for-go"
packages = ["storage"]
revision = "eae258195456be76b2ec9ad2ee2ab63cdda365d9"
version = "v12.2.0-beta"
packages = ["storage","version"]
revision = "56332fec5b308fbb6615fa1af6117394cdba186d"
version = "v15.0.0"
[[projects]]
name = "github.com/Azure/go-autorest"
packages = ["autorest","autorest/adal","autorest/azure","autorest/date"]
revision = "c2a68353555b68de3ee8455a4fd3e890a0ac6d99"
version = "v9.8.1"
revision = "ed4b7f5bf1ec0c9ede1fda2681d96771282f2862"
version = "v10.4.0"
[[projects]]
name = "github.com/cenkalti/backoff"
packages = ["."]
revision = "61153c768f31ee5f130071d08fc82b85208528de"
version = "v1.1.0"
revision = "2ea60e5f094469f9e65adb9cd103795b73ae743e"
version = "v2.0.0"
[[projects]]
name = "github.com/cpuguy83/go-md2man"
packages = ["md2man"]
revision = "1d903dcb749992f3741d744c0f8376b4bd7eb3e1"
version = "v1.0.7"
revision = "20f5889cbdc3c73dbd2862796665e7c465ade7d1"
version = "v1.0.8"
[[projects]]
name = "github.com/dgrijalva/jwt-go"
packages = ["."]
revision = "dbeaa9332f19a944acb5736b4456cfcc02140e29"
version = "v3.1.0"
revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e"
version = "v3.2.0"
[[projects]]
branch = "master"
......@@ -52,20 +52,26 @@
[[projects]]
name = "github.com/elithrar/simple-scrypt"
packages = ["."]
revision = "2325946f714c95de4a6088202c402fbdfa64163b"
version = "v1.2.0"
revision = "d150773194090feb6c897805a7bcea8d49544e2c"
version = "v1.3.0"
[[projects]]
name = "github.com/go-ini/ini"
packages = ["."]
revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a"
version = "v1.32.0"
revision = "6333e38ac20b8949a8dd68baa3650f4dee8f39f0"
version = "v1.33.0"
[[projects]]
branch = "master"
name = "github.com/golang/protobuf"
packages = ["proto"]
revision = "c65a0412e71e8b9b3bfd22925720d23c0f054237"
revision = "925541529c1fa6821df4e44ce2723319eb2be768"
version = "v1.0.0"
[[projects]]
name = "github.com/google/go-cmp"
packages = ["cmp","cmp/internal/diff","cmp/internal/function","cmp/internal/value"]
revision = "8099a9787ce5dc5984ed879a3bda47dc730a8e97"
version = "v0.1.0"
[[projects]]
name = "github.com/inconshreveable/mousetrap"
......@@ -87,20 +93,27 @@
[[projects]]
name = "github.com/kurin/blazer"
packages = ["b2","base","internal/b2types","internal/blog"]
revision = "cd0304efa98725679cf68422cefa328d3d96f2f4"
version = "v0.3.0"
packages = ["b2","base","internal/b2assets","internal/b2types","internal/blog","x/window"]
revision = "b7c9cf27cae3aec98c2caaeb5181608bfe05b17c"
version = "v0.3.1"
[[projects]]
name = "github.com/marstr/guid"
packages = ["."]
revision = "8bdf7d1a087ccc975cf37dd6507da50698fd19ca"
revision = "8bd9a64bf37eb297b492a4101fb28e80ac0b290f"
version = "v1.1.0"
[[projects]]
name = "github.com/mattn/go-isatty"
packages = ["."]
revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39"
version = "v0.0.3"
[[projects]]
name = "github.com/minio/minio-go"
packages = [".","pkg/credentials","pkg/encrypt","pkg/policy","pkg/s3signer","pkg/s3utils","pkg/set"]
revision = "14f1d472d115bac5ca4804094aa87484a72ced61"
version = "4.0.6"
revision = "66252c2a3c15f7b90cc8493d497a04ac3b6e3606"
version = "5.0.0"
[[projects]]
branch = "master"
......@@ -112,7 +125,7 @@
branch = "master"
name = "github.com/ncw/swift"
packages = ["."]
revision = "ae9f0ea1605b9aa6434ed5c731ca35d83ba67c55"
revision = "b2a7479cf26fa841ff90dd932d0221cb5c50782d"
[[projects]]
name = "github.com/pkg/errors"
......@@ -129,14 +142,14 @@
[[projects]]
name = "github.com/pkg/sftp"
packages = ["."]
revision = "f6a9258a0f570c3a76681b897b6ded57cb0dfa88"
version = "1.2.0"
revision = "49488377fa2f14143ba3067cf7555f60f6c7b550"
version = "1.5.0"
[[projects]]
name = "github.com/pkg/xattr"
packages = ["."]
revision = "23c75e3f6c1d8b13b3dd905b011a7f38a06044b7"
version = "v0.2.1"
revision = "1d7b7ffe7c46974a836eb583b7452f22de1c18cf"
version = "v0.2.3"
[[projects]]
name = "github.com/restic/chunker"
......@@ -147,8 +160,8 @@
[[projects]]
name = "github.com/russross/blackfriday"
packages = ["."]
revision = "4048872b16cc0fc2c5fd9eacf0ed2c2fedaa0c8c"
version = "v1.5"
revision = "55d61fa8aa702f59229e6cff85793c22e580eaf5"
version = "v1.5.1"
[[projects]]
name = "github.com/satori/go.uuid"
......@@ -159,14 +172,14 @@
[[projects]]
name = "github.com/sirupsen/logrus"
packages = ["."]
revision = "d682213848ed68c0a260ca37d6dd5ace8423f5ba"
version = "v1.0.4"
revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc"
version = "v1.0.5"
[[projects]]
name = "github.com/spf13/cobra"
packages = [".","doc"]
revision = "7b2c5ac9fc04fc5efafb60700713d4fa609b777b"
version = "v0.0.1"
revision = "a1f051bc3eba734da4772d60e2d677f47cf93ef4"
version = "v0.0.2"
[[projects]]
name = "github.com/spf13/pflag"
......@@ -177,44 +190,44 @@
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = ["curve25519","ed25519","ed25519/internal/edwards25519","internal/chacha20","pbkdf2","poly1305","scrypt","ssh","ssh/terminal"]
revision = "3d37316aaa6bd9929127ac9a527abf408178ea7b"
packages = ["argon2","blake2b","curve25519","ed25519","ed25519/internal/edwards25519","internal/chacha20","pbkdf2","poly1305","scrypt","ssh","ssh/terminal"]
revision = "4ec37c66abab2c7e02ae775328b2ff001c3f025a"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = ["context","context/ctxhttp","idna","lex/httplex"]
revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec"
packages = ["context","context/ctxhttp","http2","http2/hpack","idna","lex/httplex"]
revision = "6078986fec03a1dcc236c34816c71b0e05018fda"
[[projects]]
branch = "master"
name = "golang.org/x/oauth2"
packages = [".","google","internal","jws","jwt"]
revision = "b28fcf2b08a19742b43084fb40ab78ac6c3d8067"
revision = "fdc9e635145ae97e6c2cb777c48305600cf515cb"
[[projects]]
branch = "master"
name = "golang.org/x/sync"
packages = ["errgroup"]
revision = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5"
revision = "1d60e4601c6fd243af51cc01ddf169918a5407ca"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix","windows"]
revision = "af50095a40f9041b3b38960738837185c26e9419"
packages = ["cpu","unix","windows"]
revision = "7db1c3b1a98089d0071c84f646ff5c96aad43682"
[[projects]]
branch = "master"
name = "golang.org/x/text"
packages = ["collate","collate/build","internal/colltab","internal/gen","internal/tag","internal/triegen","internal/ucd","language","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable"]
revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3"
packages = ["collate","collate/build","encoding","encoding/internal","encoding/internal/identifier","encoding/unicode","internal/colltab","internal/gen","internal/tag","internal/triegen","internal/ucd","internal/utf8internal","language","runes","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable"]
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
version = "v0.3.0"
[[projects]]
branch = "master"
name = "google.golang.org/api"
packages = ["gensupport","googleapi","googleapi/internal/uritemplates","storage/v1"]
revision = "65b0d8655182691ad23b4fac11e6f7b897d9b634"
revision = "dbbc13f71100fa6ece308335445fca6bb0dd5c2f"
[[projects]]
name = "google.golang.org/appengine"
......@@ -224,13 +237,19 @@
[[projects]]
branch = "v2"
name = "gopkg.in/tomb.v2"
packages = ["."]
revision = "d5d1b5820637886def9eef33e03a27a9f166942c"
[[projects]]
name = "gopkg.in/yaml.v2"
packages = ["."]
revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4"
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
version = "v2.2.1"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "336ac5c261c174cac89f9a7102b493f08edfbd51fd61d1673d1d2ec4132d80ab"
inputs-digest = "a5de339cba7570216b212439b90e1e6c384c94be8342fe7755b7cb66aa0a3440"
solver-name = "gps-cdcl"
solver-version = 1
......@@ -29,7 +29,7 @@ and add some data:
.. code-block:: console
$ restic -r /tmp/backup backup ~/work
$ restic --repo /tmp/backup backup ~/work
enter password for repository:
scan [/home/user/work]
scanned 764 directories, 1816 files in 0:00
......@@ -57,6 +57,7 @@ Therefore, restic supports the following backends for storing backups natively:
- `BackBlaze B2 <https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#backblaze-b2>`__
- `Microsoft Azure Blob Storage <https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#microsoft-azure-blob-storage>`__
- `Google Cloud Storage <https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#google-cloud-storage>`__
- And many other services via the `rclone <https://rclone.org>`__ `Backend <https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#other-services-via-rclone>`__
Design Principles
-----------------
......@@ -112,8 +113,8 @@ complete text in ``LICENSE``.
.. |Documentation| image:: https://readthedocs.org/projects/restic/badge/?version=latest
:target: https://restic.readthedocs.io/en/latest/?badge=latest
.. |Build Status| image:: https://travis-ci.org/restic/restic.svg?branch=master
:target: https://travis-ci.org/restic/restic
.. |Build Status| image:: https://travis-ci.com/restic/restic.svg?branch=master
:target: https://travis-ci.com/restic/restic
.. |Build status| image:: https://ci.appveyor.com/api/projects/status/nuy4lfbgfbytw92q/branch/master?svg=true
:target: https://ci.appveyor.com/project/fd0/restic/branch/master
.. |Report Card| image:: https://goreportcard.com/badge/github.com/restic/restic
......
......@@ -53,7 +53,7 @@ var config = Config{
"github.com/restic/restic/internal/...",
"github.com/restic/restic/cmd/...",
},
MinVersion: GoVersion{Major: 1, Minor: 8, Patch: 0}, // minimum Go version supported
MinVersion: GoVersion{Major: 1, Minor: 9, Patch: 0}, // minimum Go version supported
}
// Config configures the build.
......@@ -70,6 +70,7 @@ var (
keepGopath bool
runTests bool
enableCGO bool
enablePIE bool
)
// specialDir returns true if the file begins with a special character ('.' or '_').
......@@ -225,9 +226,10 @@ func showUsage(output io.Writer) {
fmt.Fprintf(output, " -T --test run tests\n")
fmt.Fprintf(output, " -o --output set output file name\n")
fmt.Fprintf(output, " --enable-cgo use CGO to link against libc\n")
fmt.Fprintf(output, " --enable-pie use PIE buildmode\n")
fmt.Fprintf(output, " --goos value set GOOS for cross-compilation\n")
fmt.Fprintf(output, " --goarch value set GOARCH for cross-compilation\n")
fmt.Fprintf(output, " --goarm value set GOARM for cross-compilation\n")
fmt.Fprintf(output, " --goarm value set GOARM for cross-compilation\n")
}
func verbosePrintf(message string, args ...interface{}) {
......@@ -253,10 +255,22 @@ func cleanEnv() (env []string) {
}
// build runs "go build args..." with GOPATH set to gopath.
func build(cwd, goos, goarch, goarm, gopath string, args ...string) error {
func build(cwd string, ver GoVersion, goos, goarch, goarm, gopath string, args ...string) error {
a := []string{"build"}
a = append(a, "-asmflags", fmt.Sprintf("-trimpath=%s", gopath))
a = append(a, "-gcflags", fmt.Sprintf("-trimpath=%s", gopath))
if ver.AtLeast(GoVersion{1, 10, 0}) {
verbosePrintf("Go version is at least 1.10, using new syntax for -gcflags\n")
// use new prefix
a = append(a, "-asmflags", fmt.Sprintf("all=-trimpath=%s", gopath))
a = append(a, "-gcflags", fmt.Sprintf("all=-trimpath=%s", gopath))
} else {
a = append(a, "-asmflags", fmt.Sprintf("-trimpath=%s", gopath))
a = append(a, "-gcflags", fmt.Sprintf("-trimpath=%s", gopath))
}
if enablePIE {
a = append(a, "-buildmode=pie")
}
a = append(a, args...)
cmd := exec.Command("go", a...)
cmd.Env = append(cleanEnv(), "GOPATH="+gopath, "GOARCH="+goarch, "GOOS="+goos)
......@@ -270,7 +284,7 @@ func build(cwd, goos, goarch, goarm, gopath string, args ...string) error {
cmd.Dir = cwd
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
verbosePrintf("go %s\n", args)
verbosePrintf("go %s\n", a)
return cmd.Run()
}
......@@ -366,30 +380,39 @@ func ParseGoVersion(s string) (v GoVersion) {
s = s[2:]
data := strings.Split(s, ".")
if len(data) != 3 {
return
if len(data) < 2 || len(data) > 3 {
// invalid version
return GoVersion{}
}
major, err := strconv.Atoi(data[0])
var err error
v.Major, err = strconv.Atoi(data[0])
if err != nil {
return
return GoVersion{}
}
minor, err := strconv.Atoi(data[1])
if err != nil {
return
// try to parse the minor version while removing an eventual suffix (like
// "rc2" or so)
for s := data[1]; s != ""; s = s[:len(s)-1] {
v.Minor, err = strconv.Atoi(s)
if err == nil {
break
}
}
patch, err := strconv.Atoi(data[2])
if err != nil {
return
if v.Minor == 0 {
// no minor version found
return GoVersion{}
}
v = GoVersion{
Major: major,
Minor: minor,
Patch: patch,
if len(data) >= 3 {
v.Patch, err = strconv.Atoi(data[2])
if err != nil {
return GoVersion{}
}
}
return
}
......@@ -437,6 +460,8 @@ func main() {
targetGOARCH := runtime.GOARCH
targetGOARM := ""
gopath := ""
var outputFilename string
for i, arg := range params {
......@@ -459,10 +484,15 @@ func main() {
case "-o", "--output":
skipNext = true
outputFilename = params[i+1]
case "--tempdir":
skipNext = true
gopath = params[i+1]
case "-T", "--test":
runTests = true
case "--enable-cgo":
enableCGO = true
case "--enable-pie":
enablePIE = true
case "--goos":
skipNext = true
targetGOOS = params[i+1]
......@@ -482,6 +512,8 @@ func main() {
}
}
verbosePrintf("detected Go version %v\n", ver)
if len(buildTags) == 0 {
verbosePrintf("adding build-tag release\n")
buildTags = []string{"release"}
......@@ -498,9 +530,11 @@ func main() {
die("Getwd(): %v\n", err)
}
gopath, err := ioutil.TempDir("", fmt.Sprintf("%v-build-", config.Name))
if err != nil {
die("TempDir(): %v\n", err)
if gopath == "" {
gopath, err = ioutil.TempDir("", fmt.Sprintf("%v-build-", config.Name))
if err != nil {
die("TempDir(): %v\n", err)
}
}
verbosePrintf("create GOPATH at %v\n", gopath)
......@@ -556,7 +590,7 @@ func main() {
"-o", output, config.Main,
}
err = build(filepath.Join(gopath, "src"), targetGOOS, targetGOARCH, targetGOARM, gopath, args...)
err = build(filepath.Join(gopath, "src"), ver, targetGOOS, targetGOARCH, targetGOARM, gopath, args...)
if err != nil {
die("build failed: %v\n", err)
}
......
......@@ -2,9 +2,9 @@ Enhancement: Create subdirs below `data/` for local/sftp backends
The local and sftp backends now create the subdirs below `data/` on
open/init. This way, restic makes sure that they always exist. This is
connected to an issue for the sftp server:
connected to an issue for the sftp server.
https://github.com/restic/rest-server/pull/11#issuecomment-309879710
https://github.com/restic/restic/issues/1055
https://github.com/restic/rest-server/pull/11#issuecomment-309879710
https://github.com/restic/restic/pull/1077
https://github.com/restic/restic/pull/1105
Enhancement: Add `migrate` cmd to migrate from `s3legacy` to `default` layout
The `migrate` command for chaning the `s3legacy` layout to the `default` layout
The `migrate` command for changing the `s3legacy` layout to the `default` layout
for s3 backends has been improved: It can now be restarted with `restic migrate
--force s3_layout` and automatically retries operations on error.
......
Enhancement: Support UTF-16 encoding and process Byte Order Mark
On Windows, text editors commonly leave a Byte Order Mark at the beginning of
the file to define which encoding is used (oftentimes UTF-16). We've added code
to support processing the BOMs in text files, like the exclude files, the
password file and the file passed via `--files-from`. This does not apply to
any file being saved in a backup, those are not touched and archived as they
are.
https://github.com/restic/restic/issues/1433
https://github.com/restic/restic/issues/1738
https://github.com/restic/restic/pull/1748
Enhancement: Allow using rclone to access other services
We've added the ability to use rclone to store backup data on all backends that
it supports. This was done in collaboration with Nick, the author of rclone.
You can now use it to first configure a service, then restic manages the rest
(starting and stopping rclone). For details, please see the manual.
https://github.com/restic/restic/issues/1561
https://github.com/restic/restic/pull/1657
https://rclone.org
Bugfix: Respect time stamp for new backup when reading from stdin
When reading backups from stdin (via `restic backup --stdin`), restic now uses
the time stamp for the new backup passed in `--time`.
https://github.com/restic/restic/issues/1608
https://github.com/restic/restic/pull/1703
Bugfix: Ignore/remove invalid lock files
This corrects a bug introduced recently: When an invalid lock file in the repo
is encountered (e.g. if the file is empty), the code used to ignore that, but
now returns the error. Now, invalid files are ignored for the normal lock
check, and removed when `restic unlock --remove-all` is run.
https://github.com/restic/restic/issues/1652
https://github.com/restic/restic/pull/1653
Enhancement: Improve cache handling for `restic check`
For safety reasons, restic does not use a local metadata cache for the `restic
check` command, so that data is loaded from the repository and restic can check
it's in good condition. When the cache is disabled, restic will fetch each tiny
blob needed for checking the integrity using a separate backend request. For
non-local backends, that will take a long time, and depending on the backend
(e.g. B2) may also be much more expensive.
This PR adds a few commits which will change the behavior as follows:
* When `restic check` is called without any additional parameters, it will
build a new cache in a temporary directory, which is removed at the end of
the check. This way, we'll get readahead for metadata files (so restic will
fetch the whole file when the first blob from the file is requested), but
all data is freshly fetched from the storage backend. This is the default
behavior and will work for almost all users.
* When `restic check` is called with `--with-cache`, the default on-disc cache
is used. This behavior hasn't changed since the cache was introduced.
* When `--no-cache` is specified, restic falls back to the old behavior, and
read all tiny blobs in separate requests.
https://github.com/restic/restic/issues/1665
https://github.com/restic/restic/issues/1694
https://github.com/restic/restic/pull/1696
Enhancement: Add `cache` command to list cache dirs
The command `cache` was added, it allows listing restic's cache directoriers
together with the last usage. It also allows removing old cache dirs without
having to access a repo, via `restic cache --cleanup`
https://github.com/restic/restic/issues/1721
https://github.com/restic/restic/pull/1749
Bugfix: Ignore sockets for restore
We've received a report and correct the behavior in which the restore code
aborted restoring a directory when a socket was encountered. Unix domain socket
files cannot be restored (they are created on the fly once a process starts
listening). The error handling was corrected, and in addition we're now
ignoring sockets during restore.
https://github.com/restic/restic/issues/1730
https://github.com/restic/restic/pull/1731
Enhancement: Allow saving OneDrive folders in Windows
Restic now contains a bugfix to two libraries, which allows saving OneDrive
folders in Windows. In order to use the newer versions of the libraries, the
minimal version required to compile restic is now Go 1.9.
https://github.com/restic/restic/issues/1758
https://github.com/restic/restic/pull/1765
Enhancement: Rework archiver code
The core archiver code and the complementary code for the `backup` command was
rewritten completely. This resolves very annoying issues such as 549. The first
backup with this release of restic will likely result in all files being
re-read locally, so it will take a lot longer. The next backup after that will
be fast again.
Basically, with the old code, restic took the last path component of each
to-be-saved file or directory as the top-level file/directory within the
snapshot. This meant that when called as `restic backup /home/user/foo`, the
snapshot would contain the files in the directory `/home/user/foo` as `/foo`.
This is not the case any more with the new archiver code. Now, restic works
very similar to what `tar` does: When restic is called with an absolute path to
save, then it'll preserve the directory structure within the snapshot. For the
example above, the snapshot would contain the files in the directory within
`/home/user/foo` in the snapshot. For relative directories, it only preserves
the relative path components. So `restic backup user/foo` will save the files