Michael Eischer
61035d68bc
Add test for --repository-file
2020-10-01 00:50:27 +02:00
Andreas Oberritter
97f7855de3
Add new option --repository-file (default: $RESTIC_REPOSITORY_FILE)
...
As an alternative to -r, this allows to read the repository URL
from a file in order to prevent certain types of information leaks,
especially for URLs containing credentials.
Fixes #1458 , fixes #2900 .
2020-10-01 00:50:26 +02:00
rawtaz
34ea960559
Merge pull request #2966 from MichaelEischer/recover-help-typo
...
recover: Fix typo in the command help
2020-09-30 18:16:26 +02:00
Michael Eischer
2a79c1a44d
recover: Fix typo in the command help
...
Reported-by: Steve Divskinsy <stevesbrain@users.noreply.github.com>
2020-09-30 17:44:34 +02:00
Michael Eischer
aea9f7d286
clarify verbose password prompt
2020-09-30 17:25:54 +02:00
plumbeo
009bd907f2
Don’t print too many messages when deleting files
...
Print detailed debug messages on file deletions only when --verbose=2 is used
2020-09-27 14:24:04 +02:00
MichaelEischer
14b312f00d
Merge pull request #2658 from creativeprojects/issue-2241
...
Don't echo authentication passwords (rest backend)
2020-09-22 22:17:53 +02:00
Fred
206cadfab4
Hide password from repository URLs
2020-09-22 22:00:51 +02:00
MichaelEischer
4875f7b659
Merge pull request #2614 from greatroar/simplify-fs
...
Simplify internal/fs
2020-09-21 22:05:10 +02:00
yoshiera
3cf29a777d
Fix nil check in rejectBySize
2020-09-21 19:20:24 +08:00
Alexander Neumann
429f97b887
Set development version for 0.10.0
2020-09-19 17:38:47 +02:00
Alexander Neumann
40832b2927
Add version for 0.10.0
2020-09-19 17:38:26 +02:00
Michael Eischer
f003410402
init: Add --copy-chunker-params
option
...
This allows creating multiple repositories with identical chunker
parameters which is required for working deduplication when copying
snapshots between different repositories.
2020-09-19 16:53:05 +02:00
Michael Eischer
655430550b
Extract parameters for second repository from copy command
2020-09-19 16:07:55 +02:00
Leo R. Lundgren
311ad2d2d0
Improve wording for --password-file and related options
2020-09-19 15:47:32 +02:00
Leo R. Lundgren
ffe6dce7e7
Improve wording for --password-command and --password-command2 options
2020-09-19 14:23:25 +02:00
yoshiera
ac4b8c98ac
Support excluding files by size
2020-09-19 19:52:09 +08:00
greatroar
9abef3bf1a
Move internal/fs.TestChdir to internal/test.Chdir
2020-09-17 10:43:33 +02:00
Michael Eischer
f5c448aa65
diff: Optimize diff calculation for shared subtrees
...
When the diff calculation compares two trees with identical id then no
differences between them can ever show up. Optimize for that case by
simply traversing the tree only once to collect all referenced blobs for
a proper calculation of added and removed blobs.
Just skipping the common subtrees is not possible as this would skew the
results if the added or removed blobs are shared with one of the
subtrees.
2020-09-13 16:28:46 +02:00
Michael Eischer
c0fc85d303
diff: Add integration test
2020-09-13 16:28:46 +02:00
Alexander Neumann
0c48e515f0
Merge pull request #2630 from MichaelEischer/fix-staticcheck
...
Fix lots of small issues reported by staticcheck
2020-09-13 16:19:22 +02:00
rawtaz
d3a286928a
Merge pull request #2905 from MichaelEischer/fix-ls-help
...
ls: Explicitly enforce that the user specifies a snapshot ID
2020-09-05 10:44:01 +02:00
Michael Eischer
1ede018ea6
error variable names should start with 'Err'
2020-09-05 10:07:17 +02:00
Michael Eischer
d0329cf3eb
Adjust comments to match name of exported methods
2020-09-05 10:07:16 +02:00
Michael Eischer
b22655367c
integration_test: Replace fprintf without format string
2020-09-05 10:07:16 +02:00
Michael Eischer
068a3ce23f
Remove redundant return
2020-09-05 10:07:16 +02:00
Michael Eischer
d19f05c960
Use buf.String() instead of string(buf.Bytes())
2020-09-05 10:07:16 +02:00
Michael Eischer
460e2ffbf6
Collapse a few boolean operations
2020-09-05 10:07:14 +02:00
Michael Eischer
49b6aac3fa
Use !bytes.Equal instead of bytes.Compare !=0 to check for inequality
2020-09-05 10:06:23 +02:00
Michael Eischer
2f8335554c
Remove a few unused variables
2020-09-05 10:06:23 +02:00
Michael Eischer
37113282ca
Merge a few variable declaration and initializations
2020-09-05 10:05:34 +02:00
Michael Eischer
337725c354
Use sort.Strings
2020-09-05 10:05:34 +02:00
MichaelEischer
2ddb7ffb7e
Merge pull request #2255 from Kidswiss/tar
...
Fix dumping issues with / and the first sub level
2020-09-01 21:52:17 +02:00
Michael Eischer
81dcfea11a
dump: Mention tar output in command help text
2020-08-31 22:43:10 +02:00
MichaelEischer
55071ee367
Merge pull request #2859 from buschjost/stats-filter-by-tag-and-path
...
Add filter by tag and path to stats command
2020-08-31 22:11:01 +02:00
Michael Eischer
bcf44a9c3f
dump: Properly handle file paths without / prefix
...
filepath.Rel failed if the requested path did not start with a `/` e.g.
`restic` instead of `/restic`.
2020-08-30 18:25:42 +02:00
Oliver Buschjost
a7b4c19abf
Fix display of warning about ignored filters
2020-08-30 17:14:56 +02:00
Oliver Buschjost
d3fcfeba3a
Add filter by tag and path to stats command
2020-08-30 17:14:48 +02:00
Michael Eischer
e69449bf2c
dump: Add test for splitPath
2020-08-30 16:00:48 +02:00
MichaelEischer
ea81a0e282
Merge pull request #2606 from middelink/fix-323
...
Add copy functionality.
2020-08-30 10:18:24 +02:00
Simon Beck
d6f739ec22
dump: Extract tar code to internal/dump
2020-08-29 21:14:34 +02:00
Simon Beck
b98598e55f
dump: Fix dumping issues with / and the first sub level
...
There was an issue that prevented the dump command from working
correctly when either:
* `/` contained multiple nodes (e.g. `restic backup /`)
* dumping a file in the first sublevel was attempted (e.g. `/foo`)
2020-08-29 21:14:29 +02:00
Michael Eischer
d5f86effa1
ls: Explicitly enforce that the user specifies a snapshot ID
...
The help messages suggested that the `ls` command work without
explicitly passing a snapshot ID. However, this was never the case:
without a snapshot ID the command just failed with the error
`Ignoring "", it is not a snapshot id`.
Fixes #2299
2020-08-29 14:28:53 +02:00
Michael Eischer
412623b848
copy: Reuse buffer for downloaded blobs
2020-08-29 10:48:44 +02:00
Michael Eischer
9a4796594a
integration tests: Fix checking of wrong snapshot
2020-08-29 10:48:44 +02:00
Michael Eischer
15374d22e9
integration tests: Add basic tests for copy command
2020-08-29 10:48:44 +02:00
Michael Eischer
88ad58d6cd
integration tests: Redirect directory diff into intermediate buffer
2020-08-29 10:48:44 +02:00
Michael Eischer
591a8c4cdf
integration tests: Deduplicate backup test-data setup code
2020-08-29 10:48:44 +02:00
Michael Eischer
ec9a53b7e8
copy: Mark and skip previously copied snapshots
...
Use the `Original` field of the copied snapshot to store a persistent
snapshot ID. This can either be the ID of the source snapshot if
`Original` was not yet set or the previous value stored in the
`Original` field. In order to still copy snapshots modified using the
tags command the source snapshot is compared to all snapshots in the
destination repository which have the same persistent ID. Snapshots are
only considered equal if all fields except `Original` and `Parent`
match. That way modified snapshots are still copied while avoiding
duplicate copies at the same time.
2020-08-29 10:48:44 +02:00
Alexander Weiss
9867c4bbb4
Add flag --iexclude-file to backup
2020-08-28 21:04:41 +02:00