mirror of
https://github.com/restic/restic.git
synced 2026-02-22 16:56:24 +00:00
Compare commits
4 Commits
v0.8.3
...
add-webdav
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0912a8db07 | ||
|
|
eefeb387d9 | ||
|
|
c7d789ab04 | ||
|
|
92918ef1b6 |
34
.github/ISSUE_TEMPLATE.md
vendored
34
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,28 +1,14 @@
|
||||
<!--
|
||||
NOTE: Not filling out the issue template needs a good reason, otherwise it may
|
||||
take a lot longer to find the problem! Please take the time to help us
|
||||
debugging the problem by collecting information, even if it seems irrelevant to
|
||||
you. Thanks!
|
||||
|
||||
Welcome! - We kindly ask that you:
|
||||
|
||||
1. Fill out the issue template below - not doing so needs a good reason.
|
||||
2. Use the forum if you have a question rather than a bug or feature request.
|
||||
|
||||
The forum is at: https://forum.restic.net
|
||||
|
||||
NOTE: Not filling out the issue template needs a good reason, as otherwise it
|
||||
may take a lot longer to find the problem, not to mention it can take up a lot
|
||||
more time which can otherwise be spent on development. Please also take the
|
||||
time to help us debug the issue by collecting relevant information, even if
|
||||
it doesn't seem to be relevant to you. Thanks!
|
||||
|
||||
The forum is a better place for questions about restic or general suggestions
|
||||
and topics, e.g. usage or documentation questions! This issue tracker is mainly
|
||||
for tracking bugs and feature requests directly relating to the development of
|
||||
the software itself, rather than the project.
|
||||
|
||||
Thanks for understanding, and for contributing to the project!
|
||||
|
||||
If you have a question, the forum at https://discourse.restic.net is a better place.
|
||||
Please do not create issues for usage or documentation questions! We're using
|
||||
the GitHub issue tracker mainly for tracking bugs and feature requests.
|
||||
-->
|
||||
|
||||
|
||||
## Output of `restic version`
|
||||
|
||||
|
||||
@@ -38,8 +24,8 @@ This section should include at least:
|
||||
information to diagnose the problem!
|
||||
-->
|
||||
|
||||
## What backend/server/service did you use to store the repository?
|
||||
|
||||
## What backend/server/service did you use to store the repository?
|
||||
|
||||
|
||||
## Expected behavior
|
||||
@@ -62,14 +48,12 @@ The more time you spend describing an easy way to reproduce the behavior (if
|
||||
this is possible), the easier it is for the project developers to fix it!
|
||||
-->
|
||||
|
||||
|
||||
## Do you have any idea what may have caused this?
|
||||
|
||||
|
||||
|
||||
## Do you have an idea how to solve the issue?
|
||||
|
||||
|
||||
|
||||
## Did restic help you or made you happy in any way?
|
||||
|
||||
<!--
|
||||
|
||||
13
.travis.yml
13
.travis.yml
@@ -2,9 +2,8 @@ language: go
|
||||
sudo: false
|
||||
|
||||
go:
|
||||
- "1.8.x"
|
||||
- "1.9.x"
|
||||
- "1.10"
|
||||
- 1.8.x
|
||||
- 1.9.x
|
||||
|
||||
os:
|
||||
- linux
|
||||
@@ -17,14 +16,12 @@ env:
|
||||
matrix:
|
||||
exclude:
|
||||
- os: osx
|
||||
go: "1.8.x"
|
||||
- os: osx
|
||||
go: "1.9.x"
|
||||
go: 1.8.x
|
||||
- os: linux
|
||||
go: "1.10"
|
||||
go: 1.9.x
|
||||
include:
|
||||
- os: linux
|
||||
go: "1.10"
|
||||
go: 1.9.x
|
||||
sudo: true
|
||||
env:
|
||||
RESTIC_TEST_FUSE=1
|
||||
|
||||
262
CHANGELOG.md
262
CHANGELOG.md
@@ -1,261 +1,3 @@
|
||||
Changelog for restic 0.8.3 (2018-02-26)
|
||||
=======================================
|
||||
|
||||
The following sections list the changes in restic 0.8.3 relevant to
|
||||
restic users. The changes are ordered by importance.
|
||||
|
||||
Summary
|
||||
-------
|
||||
|
||||
* Fix #1633: Fixed unexpected 'pack file cannot be listed' error
|
||||
* Fix #1641: Ignore files with invalid names in the repo
|
||||
* Fix #1638: Handle errors listing files in the backend
|
||||
* Enh #1497: Add --read-data-subset flag to check command
|
||||
* Enh #1560: Retry all repository file download errors
|
||||
* Enh #1623: Don't check for presence of files in the backend before writing
|
||||
* Enh #1634: Upgrade B2 client library, reduce HTTP requests
|
||||
|
||||
Details
|
||||
-------
|
||||
|
||||
* Bugfix #1633: Fixed unexpected 'pack file cannot be listed' error
|
||||
|
||||
Due to a regression introduced in 0.8.2, the `rebuild-index` and `prune` commands failed to
|
||||
read pack files with size of 587, 588, 589 or 590 bytes.
|
||||
|
||||
https://github.com/restic/restic/issues/1633
|
||||
https://github.com/restic/restic/pull/1635
|
||||
|
||||
* Bugfix #1641: Ignore files with invalid names in the repo
|
||||
|
||||
The release 0.8.2 introduced a bug: when restic encounters files in the repo which do not have a
|
||||
valid name, it tries to load a file with a name of lots of zeroes instead of ignoring it. This is now
|
||||
resolved, invalid file names are just ignored.
|
||||
|
||||
https://github.com/restic/restic/issues/1641
|
||||
https://github.com/restic/restic/pull/1643
|
||||
|
||||
* Bugfix #1638: Handle errors listing files in the backend
|
||||
|
||||
A user reported in the forum that restic completes a backup although a concurrent `prune`
|
||||
operation was running. A few error messages were printed, but the backup was attempted and
|
||||
completed successfully. No error code was returned.
|
||||
|
||||
This should not happen: The repository is exclusively locked during `prune`, so when `restic
|
||||
backup` is run in parallel, it should abort and return an error code instead.
|
||||
|
||||
It was found that the bug was in the code introduced only recently, which retries a List()
|
||||
operation on the backend should that fail. It is now corrected.
|
||||
|
||||
https://github.com/restic/restic/pull/1638
|
||||
|
||||
* Enhancement #1497: Add --read-data-subset flag to check command
|
||||
|
||||
This change introduces ability to check integrity of a subset of repository data packs. This
|
||||
can be used to spread integrity check of larger repositories over a period of time.
|
||||
|
||||
https://github.com/restic/restic/issues/1497
|
||||
https://github.com/restic/restic/pull/1556
|
||||
|
||||
* Enhancement #1560: Retry all repository file download errors
|
||||
|
||||
Restic will now retry failed downloads, similar to other operations.
|
||||
|
||||
https://github.com/restic/restic/pull/1560
|
||||
|
||||
* Enhancement #1623: Don't check for presence of files in the backend before writing
|
||||
|
||||
Before, all backend implementations were required to return an error if the file that is to be
|
||||
written already exists in the backend. For most backends, that means making a request (e.g. via
|
||||
HTTP) and returning an error when the file already exists.
|
||||
|
||||
This is not accurate, the file could have been created between the HTTP request testing for it,
|
||||
and when writing starts, so we've relaxed this requeriment, which saves one additional HTTP
|
||||
request per newly added file.
|
||||
|
||||
https://github.com/restic/restic/pull/1623
|
||||
|
||||
* Enhancement #1634: Upgrade B2 client library, reduce HTTP requests
|
||||
|
||||
We've upgraded the B2 client library restic uses to access BackBlaze B2. This reduces the
|
||||
number of HTTP requests needed to upload a new file from two to one, which should improve
|
||||
throughput to B2.
|
||||
|
||||
https://github.com/restic/restic/pull/1634
|
||||
|
||||
|
||||
Changelog for restic 0.8.2 (2018-02-17)
|
||||
=======================================
|
||||
|
||||
The following sections list the changes in restic 0.8.2 relevant to
|
||||
restic users. The changes are ordered by importance.
|
||||
|
||||
Summary
|
||||
-------
|
||||
|
||||
* Fix #1506: Limit bandwith at the http.RoundTripper for HTTP based backends
|
||||
* Fix #1512: Restore directory permissions as the last step
|
||||
* Fix #1528: Correctly create missing subdirs in data/
|
||||
* Fix #1590: Strip spaces for lines read via --files-from
|
||||
* Fix #1589: Complete intermediate index upload
|
||||
* Fix #1594: Google Cloud Storage: Use generic HTTP transport
|
||||
* Fix #1595: Backup: Remove bandwidth display
|
||||
* Enh #1522: Add support for TLS client certificate authentication
|
||||
* Enh #1541: Reduce number of remote requests during repository check
|
||||
* Enh #1567: Reduce number of backend requests for rebuild-index and prune
|
||||
* Enh #1507: Only reload snapshots once per minute for fuse mount
|
||||
* Enh #1538: Reduce memory allocations for querying the index
|
||||
* Enh #1549: Speed up querying across indices and scanning existing files
|
||||
* Enh #1554: Fuse/mount: Correctly handle EOF, add template option
|
||||
* Enh #1564: Don't terminate ssh on SIGINT
|
||||
* Enh #1579: Retry Backend.List() in case of errors
|
||||
* Enh #1584: Limit index file size
|
||||
|
||||
Details
|
||||
-------
|
||||
|
||||
* Bugfix #1506: Limit bandwith at the http.RoundTripper for HTTP based backends
|
||||
|
||||
https://github.com/restic/restic/issues/1506
|
||||
https://github.com/restic/restic/pull/1511
|
||||
|
||||
* Bugfix #1512: Restore directory permissions as the last step
|
||||
|
||||
This change allows restoring into directories that were not writable during backup. Before,
|
||||
restic created the directory, set the read-only mode and then failed to create files in the
|
||||
directory. This change now restores the directory (with its permissions) as the very last
|
||||
step.
|
||||
|
||||
https://github.com/restic/restic/issues/1512
|
||||
https://github.com/restic/restic/pull/1536
|
||||
|
||||
* Bugfix #1528: Correctly create missing subdirs in data/
|
||||
|
||||
https://github.com/restic/restic/issues/1528
|
||||
https://github.com/restic/restic/pull/1529
|
||||
|
||||
* Bugfix #1590: Strip spaces for lines read via --files-from
|
||||
|
||||
Leading and trailing spaces in lines read via `--files-from` are now stripped, so it behaves
|
||||
the same as with lines read via `--exclude-file`.
|
||||
|
||||
https://github.com/restic/restic/issues/1590
|
||||
https://github.com/restic/restic/pull/1613
|
||||
|
||||
* Bugfix #1589: Complete intermediate index upload
|
||||
|
||||
After a user posted a comprehensive report of what he observed, we were able to find a bug and
|
||||
correct it: During backup, restic uploads so-called "intermediate" index files. When the
|
||||
backup finishes during a transfer of such an intermediate index, the upload is cancelled, but
|
||||
the backup is finished without an error. This leads to an inconsistent state, where the
|
||||
snapshot references data that is contained in the repo, but is not referenced in any index.
|
||||
|
||||
The situation can be resolved by building a new index with `rebuild-index`, but looks very
|
||||
confusing at first. Since all the data got uploaded to the repo successfully, there was no risk
|
||||
of data loss, just minor inconvenience for our users.
|
||||
|
||||
https://github.com/restic/restic/pull/1589
|
||||
|
||||
* Bugfix #1594: Google Cloud Storage: Use generic HTTP transport
|
||||
|
||||
It was discovered that the Google Cloud Storage backend did not use the generic HTTP transport,
|
||||
so things such as bandwidth limiting with `--limit-upload` did not work. This is resolved now.
|
||||
|
||||
https://github.com/restic/restic/pull/1594
|
||||
|
||||
* Bugfix #1595: Backup: Remove bandwidth display
|
||||
|
||||
This commit removes the bandwidth displayed during backup process. It is misleading and
|
||||
seldomly correct, because it's neither the "read bandwidth" (only for the very first backup)
|
||||
nor the "upload bandwidth". Many users are confused about (and rightly so), c.f. #1581, #1033,
|
||||
#1591
|
||||
|
||||
We'll eventually replace this display with something more relevant when the new archiver code
|
||||
is ready.
|
||||
|
||||
https://github.com/restic/restic/pull/1595
|
||||
|
||||
* Enhancement #1522: Add support for TLS client certificate authentication
|
||||
|
||||
Support has been added for using a TLS client certificate for authentication to HTTP based
|
||||
backend. A file containing the PEM encoded private key and certificate can be set using the
|
||||
`--tls-client-cert` option.
|
||||
|
||||
https://github.com/restic/restic/issues/1522
|
||||
https://github.com/restic/restic/pull/1524
|
||||
|
||||
* Enhancement #1541: Reduce number of remote requests during repository check
|
||||
|
||||
This change eliminates redundant remote repository calls and significantly improves
|
||||
repository check time.
|
||||
|
||||
https://github.com/restic/restic/issues/1541
|
||||
https://github.com/restic/restic/pull/1548
|
||||
|
||||
* Enhancement #1567: Reduce number of backend requests for rebuild-index and prune
|
||||
|
||||
We've found a way to reduce then number of backend requests for the `rebuild-index` and `prune`
|
||||
operations. This significantly speeds up the operations for high-latency backends.
|
||||
|
||||
https://github.com/restic/restic/issues/1567
|
||||
https://github.com/restic/restic/pull/1574
|
||||
https://github.com/restic/restic/pull/1575
|
||||
|
||||
* Enhancement #1507: Only reload snapshots once per minute for fuse mount
|
||||
|
||||
https://github.com/restic/restic/pull/1507
|
||||
|
||||
* Enhancement #1538: Reduce memory allocations for querying the index
|
||||
|
||||
This change reduces the internal memory allocations when the index data structures in memory
|
||||
are queried if a blob (part of a file) already exists in the repo. It should speed up backup a bit,
|
||||
and maybe even reduce RAM usage.
|
||||
|
||||
https://github.com/restic/restic/pull/1538
|
||||
|
||||
* Enhancement #1549: Speed up querying across indices and scanning existing files
|
||||
|
||||
This change increases the whenever a blob (part of a file) is searched for in a restic
|
||||
repository. This will reduce cpu usage some when backing up files already backed up by restic.
|
||||
Cpu usage is further decreased when scanning files.
|
||||
|
||||
https://github.com/restic/restic/pull/1549
|
||||
|
||||
* Enhancement #1554: Fuse/mount: Correctly handle EOF, add template option
|
||||
|
||||
We've added the `--snapshot-template` string, which can be used to specify a template for a
|
||||
snapshot directory. In addition, accessing data after the end of a file via the fuse mount is now
|
||||
handled correctly.
|
||||
|
||||
https://github.com/restic/restic/pull/1554
|
||||
|
||||
* Enhancement #1564: Don't terminate ssh on SIGINT
|
||||
|
||||
We've reworked the code which runs the `ssh` login for the sftp backend so that it can prompt for a
|
||||
password (if needed) but does not exit when the user presses CTRL+C (SIGINT) e.g. during
|
||||
backup. This allows restic to properly shut down when it receives SIGINT and remove the lock
|
||||
file from the repo, afterwards exiting the `ssh` process.
|
||||
|
||||
https://github.com/restic/restic/pull/1564
|
||||
https://github.com/restic/restic/pull/1588
|
||||
|
||||
* Enhancement #1579: Retry Backend.List() in case of errors
|
||||
|
||||
https://github.com/restic/restic/pull/1579
|
||||
|
||||
* Enhancement #1584: Limit index file size
|
||||
|
||||
Before, restic would create a single new index file on `prune` or `rebuild-index`, this may
|
||||
lead to memory problems when this huge index is created and loaded again. We're now limiting the
|
||||
size of the index file, and split newly created index files into several smaller ones. This
|
||||
allows restic to be more memory-efficient.
|
||||
|
||||
https://github.com/restic/restic/issues/1412
|
||||
https://github.com/restic/restic/issues/979
|
||||
https://github.com/restic/restic/issues/526
|
||||
https://github.com/restic/restic/pull/1584
|
||||
|
||||
|
||||
Changelog for restic 0.8.1 (2017-12-27)
|
||||
=======================================
|
||||
|
||||
@@ -585,7 +327,7 @@ Summary
|
||||
* Enh #1061: Add Dockerfile and official Docker image
|
||||
* Enh #1126: Use the standard Go git repository layout, use `dep` for vendoring
|
||||
* Enh #1134: Add support for storing backups on Google Cloud Storage
|
||||
* Enh #1144: Properly report errors when reading files with exclude patterns
|
||||
* Enh #1144: Properly report errors when reading files with exclude patterns.
|
||||
* Enh #1149: Add support for storing backups on Microsoft Azure Blob Storage
|
||||
* Enh #1196: Add `--group-by` to `forget` command for flexible grouping
|
||||
* Enh #1203: Print stats on all BSD systems when SIGINFO (ctrl+t) is received
|
||||
@@ -673,7 +415,7 @@ Details
|
||||
https://github.com/restic/restic/pull/1134
|
||||
https://github.com/restic/restic/pull/1052
|
||||
|
||||
* Enhancement #1144: Properly report errors when reading files with exclude patterns
|
||||
* Enhancement #1144: Properly report errors when reading files with exclude patterns.
|
||||
|
||||
https://github.com/restic/restic/pull/1144
|
||||
|
||||
|
||||
@@ -120,8 +120,7 @@ down to the following steps:
|
||||
|
||||
6. You will receive comments on your code and the feature or bug that they
|
||||
address. Maybe you need to rework some minor things, in this case push new
|
||||
commits to the branch you created for the pull request (or amend the
|
||||
existing commit, use common sense to decide which is better), they will be
|
||||
commits to the branch you created for the pull request, they will be
|
||||
automatically added to the pull request.
|
||||
|
||||
7. If your pull request changes anything that users should be aware of (a
|
||||
|
||||
81
Gopkg.lock
generated
81
Gopkg.lock
generated
@@ -10,20 +10,20 @@
|
||||
[[projects]]
|
||||
name = "cloud.google.com/go"
|
||||
packages = ["compute/metadata"]
|
||||
revision = "767c40d6a2e058483c25fa193e963a22da17236d"
|
||||
version = "v0.18.0"
|
||||
revision = "2d3a6656c17a60b0815b7e06ab0be04eacb6e613"
|
||||
version = "v0.16.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/Azure/azure-sdk-for-go"
|
||||
packages = ["storage"]
|
||||
revision = "eae258195456be76b2ec9ad2ee2ab63cdda365d9"
|
||||
version = "v12.2.0-beta"
|
||||
revision = "7692b0cef22674113fcf71cc17ac3ccc1a7fef48"
|
||||
version = "v11.2.2-beta"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/Azure/go-autorest"
|
||||
packages = ["autorest","autorest/adal","autorest/azure","autorest/date"]
|
||||
revision = "c2a68353555b68de3ee8455a4fd3e890a0ac6d99"
|
||||
version = "v9.8.1"
|
||||
revision = "c67b24a8e30d876542a85022ebbdecf0e5a935e8"
|
||||
version = "v9.4.1"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/cenkalti/backoff"
|
||||
@@ -65,7 +65,7 @@
|
||||
branch = "master"
|
||||
name = "github.com/golang/protobuf"
|
||||
packages = ["proto"]
|
||||
revision = "c65a0412e71e8b9b3bfd22925720d23c0f054237"
|
||||
revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/inconshreveable/mousetrap"
|
||||
@@ -74,10 +74,10 @@
|
||||
version = "v1.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/juju/ratelimit"
|
||||
packages = ["."]
|
||||
revision = "59fac5042749a5afb9af70e813da1dd5474f0167"
|
||||
version = "1.0.1"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
@@ -88,31 +88,26 @@
|
||||
[[projects]]
|
||||
name = "github.com/kurin/blazer"
|
||||
packages = ["b2","base","internal/b2types","internal/blog"]
|
||||
revision = "cd0304efa98725679cf68422cefa328d3d96f2f4"
|
||||
version = "v0.3.0"
|
||||
revision = "e269a1a17bb6aec278c06a57cb7e8f8d0d333e04"
|
||||
version = "v0.2.1"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/marstr/guid"
|
||||
branch = "master"
|
||||
name = "github.com/minio/go-homedir"
|
||||
packages = ["."]
|
||||
revision = "8bdf7d1a087ccc975cf37dd6507da50698fd19ca"
|
||||
revision = "21304a94172ae3a09dee2cd86a12fb6f842138c7"
|
||||
|
||||
[[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"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/mitchellh/go-homedir"
|
||||
packages = ["."]
|
||||
revision = "b8bc1bf767474819792c23f32d8286a45736f1c6"
|
||||
revision = "57a8ae886b49af6eb0d2c27c2d007ed2f71e1da5"
|
||||
version = "4.0.3"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/ncw/swift"
|
||||
packages = ["."]
|
||||
revision = "ae9f0ea1605b9aa6434ed5c731ca35d83ba67c55"
|
||||
revision = "c95c6e5c2d1a3d37fc44c8c6dc9e231c7500667d"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/pkg/errors"
|
||||
@@ -129,8 +124,8 @@
|
||||
[[projects]]
|
||||
name = "github.com/pkg/sftp"
|
||||
packages = ["."]
|
||||
revision = "f6a9258a0f570c3a76681b897b6ded57cb0dfa88"
|
||||
version = "1.2.0"
|
||||
revision = "98203f5a8333288eb3163b7c667d4260fe1333e9"
|
||||
version = "1.0.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/pkg/xattr"
|
||||
@@ -151,16 +146,16 @@
|
||||
version = "v1.5"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/satori/go.uuid"
|
||||
name = "github.com/satori/uuid"
|
||||
packages = ["."]
|
||||
revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3"
|
||||
version = "v1.2.0"
|
||||
revision = "879c5887cd475cd7864858769793b2ceb0d44feb"
|
||||
version = "v1.1.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/sirupsen/logrus"
|
||||
packages = ["."]
|
||||
revision = "d682213848ed68c0a260ca37d6dd5ace8423f5ba"
|
||||
version = "v1.0.4"
|
||||
revision = "f006c2ac4710855cf0f916dd6b77acf6b048dc6e"
|
||||
version = "v1.0.3"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/spf13/cobra"
|
||||
@@ -177,44 +172,32 @@
|
||||
[[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 = ["curve25519","ed25519","ed25519/internal/edwards25519","pbkdf2","poly1305","scrypt","ssh","ssh/terminal"]
|
||||
revision = "94eea52f7b742c7cbe0b03b22f0c4c8631ece122"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/net"
|
||||
packages = ["context","context/ctxhttp","idna","lex/httplex"]
|
||||
revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec"
|
||||
packages = ["context","context/ctxhttp","webdav","webdav/internal/xml"]
|
||||
revision = "a8b9294777976932365dabb6640cf1468d95c70f"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/oauth2"
|
||||
packages = [".","google","internal","jws","jwt"]
|
||||
revision = "b28fcf2b08a19742b43084fb40ab78ac6c3d8067"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/sync"
|
||||
packages = ["errgroup"]
|
||||
revision = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5"
|
||||
revision = "f95fa95eaa936d9d87489b15d1d18b97c1ba9c28"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/sys"
|
||||
packages = ["unix","windows"]
|
||||
revision = "af50095a40f9041b3b38960738837185c26e9419"
|
||||
|
||||
[[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"
|
||||
revision = "8b4580aae2a0dd0c231a45d3ccb8434ff533b840"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "google.golang.org/api"
|
||||
packages = ["gensupport","googleapi","googleapi/internal/uritemplates","storage/v1"]
|
||||
revision = "65b0d8655182691ad23b4fac11e6f7b897d9b634"
|
||||
revision = "3a1d936b7575b82197a1fea0632218dd07b1e65c"
|
||||
|
||||
[[projects]]
|
||||
name = "google.golang.org/appengine"
|
||||
@@ -226,11 +209,11 @@
|
||||
branch = "v2"
|
||||
name = "gopkg.in/yaml.v2"
|
||||
packages = ["."]
|
||||
revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4"
|
||||
revision = "287cf08546ab5e7e37d55a84f7ed3fd1db036de5"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "336ac5c261c174cac89f9a7102b493f08edfbd51fd61d1673d1d2ec4132d80ab"
|
||||
inputs-digest = "b01eeeb2be041c7cd11f9ee50324ef456ac1e1cd0720408c6d72f88f92f09320"
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
||||
|
||||
@@ -17,8 +17,8 @@ init:
|
||||
|
||||
install:
|
||||
- rmdir c:\go /s /q
|
||||
- appveyor DownloadFile https://dl.google.com/go/go1.10.windows-amd64.msi
|
||||
- msiexec /i go1.10.windows-amd64.msi /q
|
||||
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.9.windows-amd64.msi
|
||||
- msiexec /i go1.9.windows-amd64.msi /q
|
||||
- go version
|
||||
- go env
|
||||
- appveyor DownloadFile http://sourceforge.netcologne.de/project/gnuwin32/tar/1.13-1/tar-1.13-1-bin.zip -FileName tar.zip
|
||||
|
||||
80
build.go
80
build.go
@@ -1,33 +1,4 @@
|
||||
// BSD 2-Clause License
|
||||
//
|
||||
// Copyright (c) 2016-2018, Alexander Neumann <alexander@bumpern.de>
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file has been copied from the repository at:
|
||||
// https://github.com/fd0/build-go
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// +build ignore_build_go
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
@@ -44,27 +15,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// config contains the configuration for the program to build.
|
||||
var config = Config{
|
||||
Name: "restic", // name of the program executable and directory
|
||||
Namespace: "github.com/restic/restic", // subdir of GOPATH, e.g. "github.com/foo/bar"
|
||||
Main: "github.com/restic/restic/cmd/restic", // package name for the main package
|
||||
Tests: []string{ // tests to run
|
||||
"github.com/restic/restic/internal/...",
|
||||
"github.com/restic/restic/cmd/...",
|
||||
},
|
||||
MinVersion: GoVersion{Major: 1, Minor: 8, Patch: 0}, // minimum Go version supported
|
||||
}
|
||||
|
||||
// Config configures the build.
|
||||
type Config struct {
|
||||
Name string
|
||||
Namespace string
|
||||
Main string
|
||||
Tests []string
|
||||
MinVersion GoVersion
|
||||
}
|
||||
|
||||
var (
|
||||
verbose bool
|
||||
keepGopath bool
|
||||
@@ -72,6 +22,22 @@ var (
|
||||
enableCGO bool
|
||||
)
|
||||
|
||||
var config = struct {
|
||||
Name string
|
||||
Namespace string
|
||||
Main string
|
||||
Tests []string
|
||||
MinVersion GoVersion
|
||||
}{
|
||||
Name: "restic", // name of the program executable and directory
|
||||
Namespace: "github.com/restic/restic", // subdir of GOPATH, e.g. "github.com/foo/bar"
|
||||
Main: "github.com/restic/restic/cmd/restic", // package name for the main package
|
||||
Tests: []string{ // tests to run
|
||||
"github.com/restic/restic/internal/...",
|
||||
"github.com/restic/restic/cmd/..."},
|
||||
MinVersion: GoVersion{Major: 1, Minor: 8, Patch: 0}, // minimum Go version supported
|
||||
}
|
||||
|
||||
// specialDir returns true if the file begins with a special character ('.' or '_').
|
||||
func specialDir(name string) bool {
|
||||
if name == "." {
|
||||
@@ -227,7 +193,6 @@ func showUsage(output io.Writer) {
|
||||
fmt.Fprintf(output, " --enable-cgo use CGO to link against libc\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")
|
||||
}
|
||||
|
||||
func verbosePrintf(message string, args ...interface{}) {
|
||||
@@ -253,16 +218,13 @@ 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, goos, goarch, 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))
|
||||
a = append(a, args...)
|
||||
cmd := exec.Command("go", a...)
|
||||
cmd.Env = append(cleanEnv(), "GOPATH="+gopath, "GOARCH="+goarch, "GOOS="+goos)
|
||||
if goarm != "" {
|
||||
cmd.Env = append(cmd.Env, "GOARM="+goarm)
|
||||
}
|
||||
if !enableCGO {
|
||||
cmd.Env = append(cmd.Env, "CGO_ENABLED=0")
|
||||
}
|
||||
@@ -435,7 +397,6 @@ func main() {
|
||||
|
||||
targetGOOS := runtime.GOOS
|
||||
targetGOARCH := runtime.GOARCH
|
||||
targetGOARM := ""
|
||||
|
||||
var outputFilename string
|
||||
|
||||
@@ -469,9 +430,6 @@ func main() {
|
||||
case "--goarch":
|
||||
skipNext = true
|
||||
targetGOARCH = params[i+1]
|
||||
case "--goarm":
|
||||
skipNext = true
|
||||
targetGOARM = params[i+1]
|
||||
case "-h":
|
||||
showUsage(os.Stdout)
|
||||
return
|
||||
@@ -556,7 +514,7 @@ func main() {
|
||||
"-o", output, config.Main,
|
||||
}
|
||||
|
||||
err = build(filepath.Join(gopath, "src"), targetGOOS, targetGOARCH, targetGOARM, gopath, args...)
|
||||
err = build(filepath.Join(gopath, "src"), targetGOOS, targetGOARCH, gopath, args...)
|
||||
if err != nil {
|
||||
die("build failed: %v\n", err)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Enhancement: Properly report errors when reading files with exclude patterns
|
||||
Enhancement: Properly report errors when reading files with exclude patterns.
|
||||
|
||||
https://github.com/restic/restic/pull/1144
|
||||
@@ -1,8 +0,0 @@
|
||||
Enhancement: Add support for TLS client certificate authentication
|
||||
|
||||
Support has been added for using a TLS client certificate for authentication to
|
||||
HTTP based backend. A file containing the PEM encoded private key and
|
||||
certificate can be set using the `--tls-client-cert` option.
|
||||
|
||||
https://github.com/restic/restic/issues/1522
|
||||
https://github.com/restic/restic/pull/1524
|
||||
@@ -1,7 +0,0 @@
|
||||
Enhancement: Reduce number of remote requests during repository check
|
||||
|
||||
This change eliminates redundant remote repository calls and significantly
|
||||
improves repository check time.
|
||||
|
||||
https://github.com/restic/restic/issues/1541
|
||||
https://github.com/restic/restic/pull/1548
|
||||
@@ -1,9 +0,0 @@
|
||||
Enhancement: Reduce number of backend requests for rebuild-index and prune
|
||||
|
||||
We've found a way to reduce then number of backend requests for the
|
||||
`rebuild-index` and `prune` operations. This significantly speeds up the
|
||||
operations for high-latency backends.
|
||||
|
||||
https://github.com/restic/restic/issues/1567
|
||||
https://github.com/restic/restic/pull/1574
|
||||
https://github.com/restic/restic/pull/1575
|
||||
@@ -1,7 +0,0 @@
|
||||
Bugfix: Strip spaces for lines read via --files-from
|
||||
|
||||
Leading and trailing spaces in lines read via `--files-from` are now stripped,
|
||||
so it behaves the same as with lines read via `--exclude-file`.
|
||||
|
||||
https://github.com/restic/restic/issues/1590
|
||||
https://github.com/restic/restic/pull/1613
|
||||
@@ -1,7 +0,0 @@
|
||||
Enhancement: Speed up querying across indices and scanning existing files
|
||||
|
||||
This change increases the whenever a blob (part of a file) is searched for in a
|
||||
restic repository. This will reduce cpu usage some when backing up files already
|
||||
backed up by restic. Cpu usage is further decreased when scanning files.
|
||||
|
||||
https://github.com/restic/restic/pull/1549
|
||||
@@ -1,10 +0,0 @@
|
||||
Enhancement: Don't terminate ssh on SIGINT
|
||||
|
||||
We've reworked the code which runs the `ssh` login for the sftp backend so that
|
||||
it can prompt for a password (if needed) but does not exit when the user
|
||||
presses CTRL+C (SIGINT) e.g. during backup. This allows restic to properly shut
|
||||
down when it receives SIGINT and remove the lock file from the repo, afterwards
|
||||
exiting the `ssh` process.
|
||||
|
||||
https://github.com/restic/restic/pull/1564
|
||||
https://github.com/restic/restic/pull/1588
|
||||
@@ -1,3 +0,0 @@
|
||||
Enhancement: Retry Backend.List() in case of errors
|
||||
|
||||
https://github.com/restic/restic/pull/1579
|
||||
@@ -1,12 +0,0 @@
|
||||
Enhancement: Limit index file size
|
||||
|
||||
Before, restic would create a single new index file on `prune` or
|
||||
`rebuild-index`, this may lead to memory problems when this huge index is
|
||||
created and loaded again. We're now limiting the size of the index file, and
|
||||
split newly created index files into several smaller ones. This allows restic
|
||||
to be more memory-efficient.
|
||||
|
||||
https://github.com/restic/restic/pull/1584
|
||||
https://github.com/restic/restic/issues/1412
|
||||
https://github.com/restic/restic/issues/979
|
||||
https://github.com/restic/restic/issues/526
|
||||
@@ -1,17 +0,0 @@
|
||||
Bugfix: Complete intermediate index upload
|
||||
|
||||
After a user posted a comprehensive report of what he observed, we were able to
|
||||
find a bug and correct it: During backup, restic uploads so-called
|
||||
"intermediate" index files. When the backup finishes during a transfer of such
|
||||
an intermediate index, the upload is cancelled, but the backup is finished
|
||||
without an error. This leads to an inconsistent state, where the snapshot
|
||||
references data that is contained in the repo, but is not referenced in any
|
||||
index.
|
||||
|
||||
The situation can be resolved by building a new index with `rebuild-index`, but
|
||||
looks very confusing at first. Since all the data got uploaded to the repo
|
||||
successfully, there was no risk of data loss, just minor inconvenience for our
|
||||
users.
|
||||
|
||||
https://github.com/restic/restic/pull/1589
|
||||
https://forum.restic.net/t/error-loading-tree-check-prune-and-forget-gives-error-b2-backend/406
|
||||
@@ -1,7 +0,0 @@
|
||||
Bugfix: Google Cloud Storage: Use generic HTTP transport
|
||||
|
||||
It was discovered that the Google Cloud Storage backend did not use the generic
|
||||
HTTP transport, so things such as bandwidth limiting with `--limit-upload` did
|
||||
not work. This is resolved now.
|
||||
|
||||
https://github.com/restic/restic/pull/1594
|
||||
@@ -1,11 +0,0 @@
|
||||
Bugfix: backup: Remove bandwidth display
|
||||
|
||||
This commit removes the bandwidth displayed during backup process. It is
|
||||
misleading and seldomly correct, because it's neither the "read
|
||||
bandwidth" (only for the very first backup) nor the "upload bandwidth".
|
||||
Many users are confused about (and rightly so), c.f. #1581, #1033, #1591
|
||||
|
||||
We'll eventually replace this display with something more relevant when
|
||||
the new archiver code is ready.
|
||||
|
||||
https://github.com/restic/restic/pull/1595
|
||||
@@ -1,8 +0,0 @@
|
||||
Enhancement: Add --read-data-subset flag to check command
|
||||
|
||||
This change introduces ability to check integrity of a subset of repository
|
||||
data packs. This can be used to spread integrity check of larger repositories
|
||||
over a period of time.
|
||||
|
||||
https://github.com/restic/restic/issues/1497
|
||||
https://github.com/restic/restic/pull/1556
|
||||
@@ -1,7 +0,0 @@
|
||||
Bugfix: Fixed unexpected 'pack file cannot be listed' error
|
||||
|
||||
Due to a regression introduced in 0.8.2, the `rebuild-index` and `prune`
|
||||
commands failed to read pack files with size of 587, 588, 589 or 590 bytes.
|
||||
|
||||
https://github.com/restic/restic/issues/1633
|
||||
https://github.com/restic/restic/pull/1635
|
||||
@@ -1,10 +0,0 @@
|
||||
Bugfix: Ignore files with invalid names in the repo
|
||||
|
||||
The release 0.8.2 introduced a bug: when restic encounters files in the repo
|
||||
which do not have a valid name, it tries to load a file with a name of lots of
|
||||
zeroes instead of ignoring it. This is now resolved, invalid file names are
|
||||
just ignored.
|
||||
|
||||
https://github.com/restic/restic/issues/1641
|
||||
https://github.com/restic/restic/pull/1643
|
||||
https://forum.restic.net/t/help-fixing-repo-no-such-file/485/3
|
||||
@@ -1,5 +0,0 @@
|
||||
Enhancement: Retry all repository file download errors
|
||||
|
||||
Restic will now retry failed downloads, similar to other operations.
|
||||
|
||||
https://github.com/restic/restic/pull/1560
|
||||
@@ -1,12 +0,0 @@
|
||||
Enhancement: Don't check for presence of files in the backend before writing
|
||||
|
||||
Before, all backend implementations were required to return an error if the
|
||||
file that is to be written already exists in the backend. For most backends,
|
||||
that means making a request (e.g. via HTTP) and returning an error when the
|
||||
file already exists.
|
||||
|
||||
This is not accurate, the file could have been created between the HTTP request
|
||||
testing for it, and when writing starts, so we've relaxed this requeriment,
|
||||
which saves one additional HTTP request per newly added file.
|
||||
|
||||
https://github.com/restic/restic/pull/1623
|
||||
@@ -1,7 +0,0 @@
|
||||
Enhancement: Upgrade B2 client library, reduce HTTP requests
|
||||
|
||||
We've upgraded the B2 client library restic uses to access BackBlaze B2. This
|
||||
reduces the number of HTTP requests needed to upload a new file from two to
|
||||
one, which should improve throughput to B2.
|
||||
|
||||
https://github.com/restic/restic/pull/1634
|
||||
@@ -1,16 +0,0 @@
|
||||
Bugfix: Handle errors listing files in the backend
|
||||
|
||||
A user reported in the forum that restic completes a backup although a
|
||||
concurrent `prune` operation was running. A few error messages were printed,
|
||||
but the backup was attempted and completed successfully. No error code was
|
||||
returned.
|
||||
|
||||
This should not happen: The repository is exclusively locked during `prune`, so
|
||||
when `restic backup` is run in parallel, it should abort and return an error
|
||||
code instead.
|
||||
|
||||
It was found that the bug was in the code introduced only recently, which
|
||||
retries a List() operation on the backend should that fail. It is now corrected.
|
||||
|
||||
https://github.com/restic/restic/pull/1638
|
||||
https://forum.restic.net/t/restic-backup-returns-0-exit-code-when-already-locked/484
|
||||
14
changelog/releases
Normal file
14
changelog/releases
Normal file
@@ -0,0 +1,14 @@
|
||||
# This file lists all versions for the changelog. Each line consists of the
|
||||
# version string, followed by an optional release date.
|
||||
#
|
||||
# The resulting changelog generated by `calens` will list all versions in
|
||||
# exactly this order.
|
||||
0.8.2
|
||||
0.8.1 2017-12-27
|
||||
0.8.0 2017-11-26
|
||||
0.7.3 2017-09-20
|
||||
0.7.2 2017-09-13
|
||||
0.7.1 2017-07-22
|
||||
0.7.0 2017-07-01
|
||||
0.6.1 2017-06-01
|
||||
0.6.0 2017-05-29
|
||||
@@ -22,9 +22,19 @@ var stderr = os.Stderr
|
||||
func init() {
|
||||
cleanupHandlers.ch = make(chan os.Signal)
|
||||
go CleanupHandler(cleanupHandlers.ch)
|
||||
InstallSignalHandler()
|
||||
}
|
||||
|
||||
// InstallSignalHandler listens for SIGINT, and triggers the cleanup handlers.
|
||||
func InstallSignalHandler() {
|
||||
signal.Notify(cleanupHandlers.ch, syscall.SIGINT)
|
||||
}
|
||||
|
||||
// SuspendSignalHandler removes the signal handler for SIGINT.
|
||||
func SuspendSignalHandler() {
|
||||
signal.Reset(syscall.SIGINT)
|
||||
}
|
||||
|
||||
// AddCleanupHandler adds the function f to the list of cleanup handlers so
|
||||
// that it is executed when all the cleanup handlers are run, e.g. when SIGINT
|
||||
// is received.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user