mirror of
https://github.com/restic/restic.git
synced 2026-02-22 16:56:24 +00:00
Compare commits
196 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
272ccec7e1 | ||
|
|
68bf1509bd | ||
|
|
cfccd67600 | ||
|
|
bc461d32e0 | ||
|
|
ee4bfdf954 | ||
|
|
3037894f62 | ||
|
|
89075bdf6d | ||
|
|
c323f73bf9 | ||
|
|
aef5e03731 | ||
|
|
fc1f74d32d | ||
|
|
7d59df1ab8 | ||
|
|
2866f3f31c | ||
|
|
dc1154c8ad | ||
|
|
35a816e8ab | ||
|
|
93210614f4 | ||
|
|
dfd37afee2 | ||
|
|
08a5281bd4 | ||
|
|
cdb48a8970 | ||
|
|
4fd5f0b8a9 | ||
|
|
92ad6bf74f | ||
|
|
2c7dd3edf4 | ||
|
|
19e7803ac6 | ||
|
|
9f0605766c | ||
|
|
1a5d7a9965 | ||
|
|
296769355d | ||
|
|
07d080830e | ||
|
|
c99eabfb37 | ||
|
|
842fe43590 | ||
|
|
be02008025 | ||
|
|
29da86b473 | ||
|
|
bad7215696 | ||
|
|
881ff5e554 | ||
|
|
86b7fd0335 | ||
|
|
70209d7d1d | ||
|
|
f07552161c | ||
|
|
856f3a9135 | ||
|
|
49e9bcadb7 | ||
|
|
1b8823ef2e | ||
|
|
b5062959c8 | ||
|
|
2fb4d44a4d | ||
|
|
3c08f956a3 | ||
|
|
1463a7aaaa | ||
|
|
76b8e080c3 | ||
|
|
a9f9243afc | ||
|
|
34bf9de339 | ||
|
|
597f6be4e4 | ||
|
|
aeeec0ff94 | ||
|
|
ab040d8811 | ||
|
|
d58ae43317 | ||
|
|
b723094739 | ||
|
|
84dcc3c396 | ||
|
|
21747bc219 | ||
|
|
28b00891d2 | ||
|
|
b4e00c324f | ||
|
|
4eb9df63cf | ||
|
|
fde674d214 | ||
|
|
fbb08c14de | ||
|
|
8b95b48bae | ||
|
|
71a4ccea71 | ||
|
|
5a9c7c51e6 | ||
|
|
5abd133e26 | ||
|
|
2debb5c0e0 | ||
|
|
54c0794cf3 | ||
|
|
cff3f3dc0d | ||
|
|
c5575c7ed9 | ||
|
|
99d88ad297 | ||
|
|
7f0d964a05 | ||
|
|
514f1b8917 | ||
|
|
a7a99be460 | ||
|
|
e17f65b23a | ||
|
|
e86fb5eedd | ||
|
|
c8cb9a9509 | ||
|
|
aa333f4d49 | ||
|
|
c40002246d | ||
|
|
77a6054d64 | ||
|
|
94ec55ff2c | ||
|
|
2369da158f | ||
|
|
5379950c64 | ||
|
|
cbfa516575 | ||
|
|
fb62da1748 | ||
|
|
b1b1f6e04f | ||
|
|
05f826a4fc | ||
|
|
649afb1198 | ||
|
|
5dc8d3588d | ||
|
|
9d2aa0a71c | ||
|
|
c34db983d8 | ||
|
|
e805b968b1 | ||
|
|
e706f1a8d1 | ||
|
|
4219bfbcc9 | ||
|
|
f99c95c766 | ||
|
|
cccb2fc7e7 | ||
|
|
ff3de66ddf | ||
|
|
fb0d01ef1f | ||
|
|
e11a183578 | ||
|
|
ee6732d2c6 | ||
|
|
4b2f2b542d | ||
|
|
6eb2d76435 | ||
|
|
f63c7048c7 | ||
|
|
ca3c566a99 | ||
|
|
7719cf88d9 | ||
|
|
00e905ebe6 | ||
|
|
164acceb55 | ||
|
|
909d9273cc | ||
|
|
d62a664bb7 | ||
|
|
663c57ab4d | ||
|
|
ed99f53786 | ||
|
|
abc4027083 | ||
|
|
d6212ee2d9 | ||
|
|
9c55e8d69c | ||
|
|
1c9fca6d14 | ||
|
|
be205563be | ||
|
|
fc6c341b26 | ||
|
|
f86c141b83 | ||
|
|
a6d4888d48 | ||
|
|
44550a88a0 | ||
|
|
b5c23695c9 | ||
|
|
0084e42cb6 | ||
|
|
fe33c05a20 | ||
|
|
3789e55e20 | ||
|
|
4cec7e236a | ||
|
|
3a16148447 | ||
|
|
df2c03a6a4 | ||
|
|
ebce4b2581 | ||
|
|
953f3d55ee | ||
|
|
7e6bfdae79 | ||
|
|
0f4cbea27d | ||
|
|
59782e347c | ||
|
|
e835abeceb | ||
|
|
8e812b7ac0 | ||
|
|
685ce719ad | ||
|
|
2b39f9f4b2 | ||
|
|
b63de7c798 | ||
|
|
b0c6e53241 | ||
|
|
e9ea268847 | ||
|
|
dd91b13ff3 | ||
|
|
c4e9d5d11e | ||
|
|
52230b8f07 | ||
|
|
a3d43a92b3 | ||
|
|
2130897ce0 | ||
|
|
67da240068 | ||
|
|
1046eabf95 | ||
|
|
663e8284b2 | ||
|
|
5a43ca1ccb | ||
|
|
200415e0a1 | ||
|
|
ea50687e8b | ||
|
|
7335a2492f | ||
|
|
bcb6881ffb | ||
|
|
37df829b3d | ||
|
|
39f1ba1897 | ||
|
|
231076fa4a | ||
|
|
0bdb131521 | ||
|
|
c31a5e7e5c | ||
|
|
05958caf6e | ||
|
|
87e31799f2 | ||
|
|
35528506a6 | ||
|
|
2544978aaf | ||
|
|
97565d68a2 | ||
|
|
f49f5c5903 | ||
|
|
d89f2e5226 | ||
|
|
02f4f5dc66 | ||
|
|
5723636b35 | ||
|
|
5632ca4f44 | ||
|
|
539599d1f1 | ||
|
|
d77a326bb0 | ||
|
|
60a7a9d019 | ||
|
|
99f0fce673 | ||
|
|
b708cfee3f | ||
|
|
b8620429e2 | ||
|
|
aab414b368 | ||
|
|
e120b17abd | ||
|
|
5f43e17918 | ||
|
|
489eef5a6f | ||
|
|
8c550ca011 | ||
|
|
032621289b | ||
|
|
92316a9853 | ||
|
|
180741609e | ||
|
|
70250762f3 | ||
|
|
39ba17a2d6 | ||
|
|
cfe8c8c9cd | ||
|
|
b45fc89512 | ||
|
|
aabc0ccaa7 | ||
|
|
2bc4d200d4 | ||
|
|
0247fe01c0 | ||
|
|
c912b38bf0 | ||
|
|
559946c58a | ||
|
|
a99637c613 | ||
|
|
36501dda73 | ||
|
|
18ecd9df30 | ||
|
|
c686dd0448 | ||
|
|
6d91d468e7 | ||
|
|
5f9b5b0219 | ||
|
|
3f7d85360a | ||
|
|
8d8456590c | ||
|
|
85f9f3e290 | ||
|
|
9e1180a29b | ||
|
|
e17c1096a0 |
34
.github/ISSUE_TEMPLATE.md
vendored
34
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,14 +1,28 @@
|
||||
<!--
|
||||
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!
|
||||
|
||||
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.
|
||||
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!
|
||||
|
||||
-->
|
||||
|
||||
|
||||
## Output of `restic version`
|
||||
|
||||
|
||||
@@ -24,10 +38,10 @@ This section should include at least:
|
||||
information to diagnose the problem!
|
||||
-->
|
||||
|
||||
|
||||
## What backend/server/service did you use to store the repository?
|
||||
|
||||
|
||||
|
||||
## Expected behavior
|
||||
|
||||
<!--
|
||||
@@ -48,12 +62,14 @@ 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?
|
||||
|
||||
<!--
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -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 an entry in the `CHANGELOG.md` file that describe the changes for our users
|
||||
- [ ] 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))
|
||||
- [ ] 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
|
||||
|
||||
13
.travis.yml
13
.travis.yml
@@ -2,8 +2,9 @@ language: go
|
||||
sudo: false
|
||||
|
||||
go:
|
||||
- 1.8.x
|
||||
- 1.9.x
|
||||
- "1.8.x"
|
||||
- "1.9.x"
|
||||
- "1.10"
|
||||
|
||||
os:
|
||||
- linux
|
||||
@@ -16,12 +17,14 @@ env:
|
||||
matrix:
|
||||
exclude:
|
||||
- os: osx
|
||||
go: 1.8.x
|
||||
go: "1.8.x"
|
||||
- os: osx
|
||||
go: "1.9.x"
|
||||
- os: linux
|
||||
go: 1.9.x
|
||||
go: "1.10"
|
||||
include:
|
||||
- os: linux
|
||||
go: 1.9.x
|
||||
go: "1.10"
|
||||
sudo: true
|
||||
env:
|
||||
RESTIC_TEST_FUSE=1
|
||||
|
||||
296
CHANGELOG.md
296
CHANGELOG.md
@@ -1,4 +1,262 @@
|
||||
Changelog for restic 0.8.1 (UNRELEASED)
|
||||
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)
|
||||
=======================================
|
||||
|
||||
The following sections list the changes in restic 0.8.1 relevant to
|
||||
@@ -9,7 +267,7 @@ Summary
|
||||
|
||||
* Fix #1457: Improve s3 backend with DigitalOcean Spaces
|
||||
* Fix #1454: Correct cache dir location for Windows and Darwin
|
||||
* Fix #1457: Disable handling SIGPIPE
|
||||
* Fix #1459: Disable handling SIGPIPE
|
||||
* Chg #1452: Do not save atime by default
|
||||
* Enh #1436: Add code to detect old cache directories
|
||||
* Enh #1439: Improve cancellation logic
|
||||
@@ -30,7 +288,7 @@ Details
|
||||
|
||||
https://github.com/restic/restic/pull/1454
|
||||
|
||||
* Bugfix #1457: Disable handling SIGPIPE
|
||||
* Bugfix #1459: Disable handling SIGPIPE
|
||||
|
||||
We've disabled handling SIGPIPE again. Turns out, writing to broken TCP connections also
|
||||
raised SIGPIPE, so restic exits on the first write to a broken connection. Instead, restic
|
||||
@@ -87,7 +345,7 @@ Summary
|
||||
* Fix #1256: Re-enable workaround for S3 backend
|
||||
* Fix #1291: Reuse backend TCP connections to BackBlaze B2
|
||||
* Fix #1317: Run prune when `forget --prune` is called with just snapshot IDs
|
||||
* Fix #1292: Remove implicit path `/restic` for the s3 backend
|
||||
* Fix #1437: Remove implicit path `/restic` for the s3 backend
|
||||
* Enh #1102: Add subdirectory `ids` to fuse mount
|
||||
* Enh #1114: Add `--cacert` to specify TLS certificates to check against
|
||||
* Enh #1216: Add upload/download limiting
|
||||
@@ -96,11 +354,11 @@ Summary
|
||||
* Enh #1367: Allow comments in files read from via `--file-from`
|
||||
* Enh #448: Sftp backend prompts for password
|
||||
* Enh #510: Add `dump` command
|
||||
* Enh #29: Add local metadata cache
|
||||
* Enh #1040: Add local metadata cache
|
||||
* Enh #1249: Add `latest` symlink in fuse mount
|
||||
* Enh #1269: Add `--compact` to `forget` command
|
||||
* Enh #1281: Google Cloud Storage backend needs less permissions
|
||||
* Enh #1303: Make `check` print `no errors found` explicitly
|
||||
* Enh #1319: Make `check` print `no errors found` explicitly
|
||||
* Enh #1353: Retry failed backend requests
|
||||
|
||||
Details
|
||||
@@ -148,7 +406,7 @@ Details
|
||||
|
||||
https://github.com/restic/restic/pull/1317
|
||||
|
||||
* Bugfix #1292: Remove implicit path `/restic` for the s3 backend
|
||||
* Bugfix #1437: Remove implicit path `/restic` for the s3 backend
|
||||
|
||||
The s3 backend used the subdir `restic` within a bucket if no explicit path after the bucket name
|
||||
was specified. Since this version, restic does not use this default path any more. If you
|
||||
@@ -226,7 +484,7 @@ Details
|
||||
https://github.com/restic/restic/issues/510
|
||||
https://github.com/restic/restic/pull/1346
|
||||
|
||||
* Enhancement #29: Add local metadata cache
|
||||
* Enhancement #1040: Add local metadata cache
|
||||
|
||||
We've added a local cache for metadata so that restic doesn't need to load all metadata
|
||||
(snapshots, indexes, ...) from the repo each time it starts. By default the cache is active, but
|
||||
@@ -270,7 +528,7 @@ Details
|
||||
|
||||
https://github.com/restic/restic/pull/1281
|
||||
|
||||
* Enhancement #1303: Make `check` print `no errors found` explicitly
|
||||
* Enhancement #1319: Make `check` print `no errors found` explicitly
|
||||
|
||||
The `check` command now explicetly prints `No errors were found` when no errors could be found.
|
||||
|
||||
@@ -326,9 +584,9 @@ Summary
|
||||
* Enh #1044: Improve `restore`, do not traverse/load excluded directories
|
||||
* Enh #1061: Add Dockerfile and official Docker image
|
||||
* Enh #1126: Use the standard Go git repository layout, use `dep` for vendoring
|
||||
* Enh #211: Add support for storing backups on Google Cloud Storage
|
||||
* Enh #1144: Properly report errors when reading files with exclude patterns.
|
||||
* Enh #609: Add support for storing backups on Microsoft Azure Blob Storage
|
||||
* Enh #1134: Add support for storing backups on Google Cloud Storage
|
||||
* 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
|
||||
* Enh #1205: Allow specifying time/date for a backup with `--time`
|
||||
@@ -409,17 +667,17 @@ Details
|
||||
|
||||
https://github.com/restic/restic/pull/1126
|
||||
|
||||
* Enhancement #211: Add support for storing backups on Google Cloud Storage
|
||||
* Enhancement #1134: Add support for storing backups on Google Cloud Storage
|
||||
|
||||
https://github.com/restic/restic/issues/211
|
||||
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
|
||||
|
||||
* Enhancement #609: Add support for storing backups on Microsoft Azure Blob Storage
|
||||
* Enhancement #1149: Add support for storing backups on Microsoft Azure Blob Storage
|
||||
|
||||
The library we're using to access the service requires Go 1.8, so restic now needs at least Go
|
||||
1.8.
|
||||
@@ -655,14 +913,14 @@ restic users. The changes are ordered by importance.
|
||||
Summary
|
||||
-------
|
||||
|
||||
* Enh #953: Make `forget` consistent
|
||||
* Enh #965: Unify repository layout for all backends
|
||||
* Enh #957: Make `forget` consistent
|
||||
* Enh #966: Unify repository layout for all backends
|
||||
* Enh #962: Improve memory and runtime for the s3 backend
|
||||
|
||||
Details
|
||||
-------
|
||||
|
||||
* Enhancement #953: Make `forget` consistent
|
||||
* Enhancement #957: Make `forget` consistent
|
||||
|
||||
The `forget` command was corrected to be more consistent in which snapshots are to be
|
||||
forgotten. It is possible that the new code removes more snapshots than before, so please
|
||||
@@ -671,7 +929,7 @@ Details
|
||||
https://github.com/restic/restic/issues/953
|
||||
https://github.com/restic/restic/pull/957
|
||||
|
||||
* Enhancement #965: Unify repository layout for all backends
|
||||
* Enhancement #966: Unify repository layout for all backends
|
||||
|
||||
Up to now the s3 backend used a special repository layout. We've decided to unify the repository
|
||||
layout and implemented the default layout also for the s3 backend. For creating a new
|
||||
|
||||
@@ -120,7 +120,8 @@ 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, they will be
|
||||
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
|
||||
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 = "2d3a6656c17a60b0815b7e06ab0be04eacb6e613"
|
||||
version = "v0.16.0"
|
||||
revision = "767c40d6a2e058483c25fa193e963a22da17236d"
|
||||
version = "v0.18.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/Azure/azure-sdk-for-go"
|
||||
packages = ["storage"]
|
||||
revision = "7692b0cef22674113fcf71cc17ac3ccc1a7fef48"
|
||||
version = "v11.2.2-beta"
|
||||
revision = "eae258195456be76b2ec9ad2ee2ab63cdda365d9"
|
||||
version = "v12.2.0-beta"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/Azure/go-autorest"
|
||||
packages = ["autorest","autorest/adal","autorest/azure","autorest/date"]
|
||||
revision = "c67b24a8e30d876542a85022ebbdecf0e5a935e8"
|
||||
version = "v9.4.1"
|
||||
revision = "c2a68353555b68de3ee8455a4fd3e890a0ac6d99"
|
||||
version = "v9.8.1"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/cenkalti/backoff"
|
||||
@@ -65,7 +65,7 @@
|
||||
branch = "master"
|
||||
name = "github.com/golang/protobuf"
|
||||
packages = ["proto"]
|
||||
revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845"
|
||||
revision = "c65a0412e71e8b9b3bfd22925720d23c0f054237"
|
||||
|
||||
[[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,26 +88,31 @@
|
||||
[[projects]]
|
||||
name = "github.com/kurin/blazer"
|
||||
packages = ["b2","base","internal/b2types","internal/blog"]
|
||||
revision = "e269a1a17bb6aec278c06a57cb7e8f8d0d333e04"
|
||||
version = "v0.2.1"
|
||||
revision = "cd0304efa98725679cf68422cefa328d3d96f2f4"
|
||||
version = "v0.3.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/minio/go-homedir"
|
||||
name = "github.com/marstr/guid"
|
||||
packages = ["."]
|
||||
revision = "21304a94172ae3a09dee2cd86a12fb6f842138c7"
|
||||
revision = "8bdf7d1a087ccc975cf37dd6507da50698fd19ca"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/minio/minio-go"
|
||||
packages = [".","pkg/credentials","pkg/encrypt","pkg/policy","pkg/s3signer","pkg/s3utils","pkg/set"]
|
||||
revision = "57a8ae886b49af6eb0d2c27c2d007ed2f71e1da5"
|
||||
version = "4.0.3"
|
||||
revision = "14f1d472d115bac5ca4804094aa87484a72ced61"
|
||||
version = "4.0.6"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/mitchellh/go-homedir"
|
||||
packages = ["."]
|
||||
revision = "b8bc1bf767474819792c23f32d8286a45736f1c6"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/ncw/swift"
|
||||
packages = ["."]
|
||||
revision = "c95c6e5c2d1a3d37fc44c8c6dc9e231c7500667d"
|
||||
revision = "ae9f0ea1605b9aa6434ed5c731ca35d83ba67c55"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/pkg/errors"
|
||||
@@ -124,8 +129,8 @@
|
||||
[[projects]]
|
||||
name = "github.com/pkg/sftp"
|
||||
packages = ["."]
|
||||
revision = "98203f5a8333288eb3163b7c667d4260fe1333e9"
|
||||
version = "1.0.0"
|
||||
revision = "f6a9258a0f570c3a76681b897b6ded57cb0dfa88"
|
||||
version = "1.2.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/pkg/xattr"
|
||||
@@ -146,16 +151,16 @@
|
||||
version = "v1.5"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/satori/uuid"
|
||||
name = "github.com/satori/go.uuid"
|
||||
packages = ["."]
|
||||
revision = "879c5887cd475cd7864858769793b2ceb0d44feb"
|
||||
version = "v1.1.0"
|
||||
revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3"
|
||||
version = "v1.2.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/sirupsen/logrus"
|
||||
packages = ["."]
|
||||
revision = "f006c2ac4710855cf0f916dd6b77acf6b048dc6e"
|
||||
version = "v1.0.3"
|
||||
revision = "d682213848ed68c0a260ca37d6dd5ace8423f5ba"
|
||||
version = "v1.0.4"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/spf13/cobra"
|
||||
@@ -172,32 +177,44 @@
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/crypto"
|
||||
packages = ["curve25519","ed25519","ed25519/internal/edwards25519","pbkdf2","poly1305","scrypt","ssh","ssh/terminal"]
|
||||
revision = "94eea52f7b742c7cbe0b03b22f0c4c8631ece122"
|
||||
packages = ["curve25519","ed25519","ed25519/internal/edwards25519","internal/chacha20","pbkdf2","poly1305","scrypt","ssh","ssh/terminal"]
|
||||
revision = "3d37316aaa6bd9929127ac9a527abf408178ea7b"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/net"
|
||||
packages = ["context","context/ctxhttp"]
|
||||
revision = "a8b9294777976932365dabb6640cf1468d95c70f"
|
||||
packages = ["context","context/ctxhttp","idna","lex/httplex"]
|
||||
revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/oauth2"
|
||||
packages = [".","google","internal","jws","jwt"]
|
||||
revision = "f95fa95eaa936d9d87489b15d1d18b97c1ba9c28"
|
||||
revision = "b28fcf2b08a19742b43084fb40ab78ac6c3d8067"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/sync"
|
||||
packages = ["errgroup"]
|
||||
revision = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/sys"
|
||||
packages = ["unix","windows"]
|
||||
revision = "8b4580aae2a0dd0c231a45d3ccb8434ff533b840"
|
||||
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"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "google.golang.org/api"
|
||||
packages = ["gensupport","googleapi","googleapi/internal/uritemplates","storage/v1"]
|
||||
revision = "3a1d936b7575b82197a1fea0632218dd07b1e65c"
|
||||
revision = "65b0d8655182691ad23b4fac11e6f7b897d9b634"
|
||||
|
||||
[[projects]]
|
||||
name = "google.golang.org/appengine"
|
||||
@@ -209,11 +226,11 @@
|
||||
branch = "v2"
|
||||
name = "gopkg.in/yaml.v2"
|
||||
packages = ["."]
|
||||
revision = "287cf08546ab5e7e37d55a84f7ed3fd1db036de5"
|
||||
revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "f0a207197cb502238ac87ca8e07b2640c02ec380a50b036e09ef87e40e31ca2d"
|
||||
inputs-digest = "336ac5c261c174cac89f9a7102b493f08edfbd51fd61d1673d1d2ec4132d80ab"
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
||||
|
||||
@@ -102,7 +102,7 @@ News
|
||||
----
|
||||
|
||||
You can follow the restic project on Twitter `@resticbackup <https://twitter.com/resticbackup>`__ or by subscribing to
|
||||
the `development blog <https://restic.github.io/blog/>`__.
|
||||
the `development blog <https://restic.net/blog/>`__.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
@@ -17,8 +17,8 @@ init:
|
||||
|
||||
install:
|
||||
- rmdir c:\go /s /q
|
||||
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.9.windows-amd64.msi
|
||||
- msiexec /i go1.9.windows-amd64.msi /q
|
||||
- appveyor DownloadFile https://dl.google.com/go/go1.10.windows-amd64.msi
|
||||
- msiexec /i go1.10.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
|
||||
|
||||
173
build.go
173
build.go
@@ -1,4 +1,33 @@
|
||||
// +build ignore
|
||||
// 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
|
||||
|
||||
package main
|
||||
|
||||
@@ -11,9 +40,31 @@ import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"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
|
||||
@@ -21,20 +72,6 @@ var (
|
||||
enableCGO bool
|
||||
)
|
||||
|
||||
var config = struct {
|
||||
Name string
|
||||
Namespace string
|
||||
Main string
|
||||
Tests []string
|
||||
}{
|
||||
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/..."},
|
||||
}
|
||||
|
||||
// specialDir returns true if the file begins with a special character ('.' or '_').
|
||||
func specialDir(name string) bool {
|
||||
if name == "." {
|
||||
@@ -137,7 +174,6 @@ func copyFile(dst, src string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer fsrc.Close()
|
||||
|
||||
if err = os.MkdirAll(filepath.Dir(dst), 0755); err != nil {
|
||||
fmt.Printf("MkdirAll(%v)\n", filepath.Dir(dst))
|
||||
@@ -148,17 +184,28 @@ func copyFile(dst, src string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer fdst.Close()
|
||||
|
||||
_, err = io.Copy(fdst, fsrc)
|
||||
if _, err = io.Copy(fdst, fsrc); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
err = fsrc.Close()
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
err = fdst.Close()
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
err = os.Chmod(dst, fi.Mode())
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
err = os.Chtimes(dst, fi.ModTime(), fi.ModTime())
|
||||
}
|
||||
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
// die prints the message with fmt.Fprintf() to stderr and exits with an error
|
||||
@@ -180,6 +227,7 @@ 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{}) {
|
||||
@@ -205,13 +253,16 @@ func cleanEnv() (env []string) {
|
||||
}
|
||||
|
||||
// build runs "go build args..." with GOPATH set to gopath.
|
||||
func build(cwd, goos, goarch, gopath string, args ...string) error {
|
||||
func build(cwd, 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))
|
||||
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")
|
||||
}
|
||||
@@ -300,10 +351,80 @@ func (cs Constants) LDFlags() string {
|
||||
return strings.Join(l, " ")
|
||||
}
|
||||
|
||||
// GoVersion is the version of Go used to compile the project.
|
||||
type GoVersion struct {
|
||||
Major int
|
||||
Minor int
|
||||
Patch int
|
||||
}
|
||||
|
||||
// ParseGoVersion parses the Go version s. If s cannot be parsed, the returned GoVersion is null.
|
||||
func ParseGoVersion(s string) (v GoVersion) {
|
||||
if !strings.HasPrefix(s, "go") {
|
||||
return
|
||||
}
|
||||
|
||||
s = s[2:]
|
||||
data := strings.Split(s, ".")
|
||||
if len(data) != 3 {
|
||||
return
|
||||
}
|
||||
|
||||
major, err := strconv.Atoi(data[0])
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
minor, err := strconv.Atoi(data[1])
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
patch, err := strconv.Atoi(data[2])
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
v = GoVersion{
|
||||
Major: major,
|
||||
Minor: minor,
|
||||
Patch: patch,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// AtLeast returns true if v is at least as new as other. If v is empty, true is returned.
|
||||
func (v GoVersion) AtLeast(other GoVersion) bool {
|
||||
var empty GoVersion
|
||||
|
||||
// the empty version satisfies all versions
|
||||
if v == empty {
|
||||
return true
|
||||
}
|
||||
|
||||
if v.Major < other.Major {
|
||||
return false
|
||||
}
|
||||
|
||||
if v.Minor < other.Minor {
|
||||
return false
|
||||
}
|
||||
|
||||
if v.Patch < other.Patch {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (v GoVersion) String() string {
|
||||
return fmt.Sprintf("Go %d.%d.%d", v.Major, v.Minor, v.Patch)
|
||||
}
|
||||
|
||||
func main() {
|
||||
ver := runtime.Version()
|
||||
if strings.HasPrefix(ver, "go1") && ver < "go1.8" {
|
||||
fmt.Fprintf(os.Stderr, "Go version %s detected, restic requires at least Go 1.8\n", ver)
|
||||
ver := ParseGoVersion(runtime.Version())
|
||||
if !ver.AtLeast(config.MinVersion) {
|
||||
fmt.Fprintf(os.Stderr, "%s detected, this program requires at least %s\n", ver, config.MinVersion)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@@ -314,6 +435,7 @@ func main() {
|
||||
|
||||
targetGOOS := runtime.GOOS
|
||||
targetGOARCH := runtime.GOARCH
|
||||
targetGOARM := ""
|
||||
|
||||
var outputFilename string
|
||||
|
||||
@@ -347,6 +469,9 @@ func main() {
|
||||
case "--goarch":
|
||||
skipNext = true
|
||||
targetGOARCH = params[i+1]
|
||||
case "--goarm":
|
||||
skipNext = true
|
||||
targetGOARM = params[i+1]
|
||||
case "-h":
|
||||
showUsage(os.Stdout)
|
||||
return
|
||||
@@ -431,7 +556,7 @@ func main() {
|
||||
"-o", output, config.Main,
|
||||
}
|
||||
|
||||
err = build(filepath.Join(gopath, "src"), targetGOOS, targetGOARCH, gopath, args...)
|
||||
err = build(filepath.Join(gopath, "src"), targetGOOS, targetGOARCH, targetGOARM, 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,4 +1,4 @@
|
||||
Bugfix: Improve s3 backend with DigitalOcean Spaces
|
||||
|
||||
https://github.com/restic/restic/pull/1459
|
||||
https://github.com/restic/restic/issues/1457
|
||||
https://github.com/restic/restic/pull/1459
|
||||
4
changelog/0.8.2_2018-02-17/issue-1506
Normal file
4
changelog/0.8.2_2018-02-17/issue-1506
Normal file
@@ -0,0 +1,4 @@
|
||||
Bugfix: Limit bandwith at the http.RoundTripper for HTTP based backends
|
||||
|
||||
https://github.com/restic/restic/issues/1506
|
||||
https://github.com/restic/restic/pull/1511
|
||||
9
changelog/0.8.2_2018-02-17/issue-1512
Normal file
9
changelog/0.8.2_2018-02-17/issue-1512
Normal file
@@ -0,0 +1,9 @@
|
||||
Bugfix: 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
|
||||
8
changelog/0.8.2_2018-02-17/issue-1522
Normal file
8
changelog/0.8.2_2018-02-17/issue-1522
Normal file
@@ -0,0 +1,8 @@
|
||||
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
|
||||
4
changelog/0.8.2_2018-02-17/issue-1528
Normal file
4
changelog/0.8.2_2018-02-17/issue-1528
Normal file
@@ -0,0 +1,4 @@
|
||||
Bugfix: Correctly create missing subdirs in data/
|
||||
|
||||
https://github.com/restic/restic/issues/1528
|
||||
https://github.com/restic/restic/pull/1529
|
||||
7
changelog/0.8.2_2018-02-17/issue-1541
Normal file
7
changelog/0.8.2_2018-02-17/issue-1541
Normal file
@@ -0,0 +1,7 @@
|
||||
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
|
||||
9
changelog/0.8.2_2018-02-17/issue-1567
Normal file
9
changelog/0.8.2_2018-02-17/issue-1567
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
7
changelog/0.8.2_2018-02-17/issue-1590
Normal file
7
changelog/0.8.2_2018-02-17/issue-1590
Normal file
@@ -0,0 +1,7 @@
|
||||
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
|
||||
3
changelog/0.8.2_2018-02-17/pull-1507
Normal file
3
changelog/0.8.2_2018-02-17/pull-1507
Normal file
@@ -0,0 +1,3 @@
|
||||
Enhancement: Only reload snapshots once per minute for fuse mount
|
||||
|
||||
https://github.com/restic/restic/pull/1507
|
||||
7
changelog/0.8.2_2018-02-17/pull-1538
Normal file
7
changelog/0.8.2_2018-02-17/pull-1538
Normal file
@@ -0,0 +1,7 @@
|
||||
Enhancement: 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
|
||||
7
changelog/0.8.2_2018-02-17/pull-1549
Normal file
7
changelog/0.8.2_2018-02-17/pull-1549
Normal file
@@ -0,0 +1,7 @@
|
||||
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
|
||||
7
changelog/0.8.2_2018-02-17/pull-1554
Normal file
7
changelog/0.8.2_2018-02-17/pull-1554
Normal file
@@ -0,0 +1,7 @@
|
||||
Enhancement: 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
|
||||
10
changelog/0.8.2_2018-02-17/pull-1564
Normal file
10
changelog/0.8.2_2018-02-17/pull-1564
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
3
changelog/0.8.2_2018-02-17/pull-1579
Normal file
3
changelog/0.8.2_2018-02-17/pull-1579
Normal file
@@ -0,0 +1,3 @@
|
||||
Enhancement: Retry Backend.List() in case of errors
|
||||
|
||||
https://github.com/restic/restic/pull/1579
|
||||
12
changelog/0.8.2_2018-02-17/pull-1584
Normal file
12
changelog/0.8.2_2018-02-17/pull-1584
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
17
changelog/0.8.2_2018-02-17/pull-1589
Normal file
17
changelog/0.8.2_2018-02-17/pull-1589
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
7
changelog/0.8.2_2018-02-17/pull-1594
Normal file
7
changelog/0.8.2_2018-02-17/pull-1594
Normal file
@@ -0,0 +1,7 @@
|
||||
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
|
||||
11
changelog/0.8.2_2018-02-17/pull-1595
Normal file
11
changelog/0.8.2_2018-02-17/pull-1595
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
8
changelog/0.8.3_2018-02-26/issue-1497
Normal file
8
changelog/0.8.3_2018-02-26/issue-1497
Normal file
@@ -0,0 +1,8 @@
|
||||
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
|
||||
7
changelog/0.8.3_2018-02-26/issue-1633
Normal file
7
changelog/0.8.3_2018-02-26/issue-1633
Normal file
@@ -0,0 +1,7 @@
|
||||
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
|
||||
10
changelog/0.8.3_2018-02-26/issue-1641
Normal file
10
changelog/0.8.3_2018-02-26/issue-1641
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
5
changelog/0.8.3_2018-02-26/pull-1560
Normal file
5
changelog/0.8.3_2018-02-26/pull-1560
Normal file
@@ -0,0 +1,5 @@
|
||||
Enhancement: Retry all repository file download errors
|
||||
|
||||
Restic will now retry failed downloads, similar to other operations.
|
||||
|
||||
https://github.com/restic/restic/pull/1560
|
||||
12
changelog/0.8.3_2018-02-26/pull-1623
Normal file
12
changelog/0.8.3_2018-02-26/pull-1623
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
7
changelog/0.8.3_2018-02-26/pull-1634
Normal file
7
changelog/0.8.3_2018-02-26/pull-1634
Normal file
@@ -0,0 +1,7 @@
|
||||
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
|
||||
16
changelog/0.8.3_2018-02-26/pull-1638
Normal file
16
changelog/0.8.3_2018-02-26/pull-1638
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user