Hendrik Luup
5592c17e4a
Display 'created new cache in ' message only if output is terminal
2021-03-22 11:31:08 +02:00
MichaelEischer
c9b4fadd91
Merge pull request #3294 from Achilleshiel/fix-copy-repofile
...
Add RepositoryFile2 Option for secondary repository
2021-03-08 22:50:31 +01:00
Michael Eischer
da458a55db
Cleanup comments in secondary repo test
2021-03-08 22:41:13 +01:00
Wouter Horlings
9ccdba9df6
Add repositoryFile2 option
...
The `init` and `copy` commands can now use `--repository-file2` flag and
the `$RESTIC_REPOSITORY_FILE2` environment variable.
This also fixes the conflict with the `--repository-file` and `--repo2`
flag.
Tests are added for the initSecondaryGlobalOpts function.
This adds a NOK function to the test helper functions. This NOK tests if
err is not nil, and otherwise fail the test.
With the NOK function a couple of sad paths are tested in the
initSecondaryGlobalOpts function.
In total the tests checks wether the following are passed correct:
- Password
- PasswordFile
- Repo
- RepositoryFile
The following situation must return an error to pass the test:
- no Repo or RepositoryFile defined
- Repo and RepositoryFile defined both
2021-03-08 22:41:13 +01:00
Juergen Hoetzel
18fccb5995
backup: In case of error also Wait() for terminal goroutine
...
This prevents a race condition where the final summary message can get lost.
2021-03-08 22:11:34 +01:00
MichaelEischer
814a399e4c
Merge pull request #3283 from dennypage/master
...
Treat an empty password as a fatal error for repository init.
2021-02-28 00:49:21 +01:00
Denny Page
0f41e99ea7
Treat an empty password as a fatal error for repository init.
2021-02-28 00:40:00 +01:00
Michael Eischer
9e852af5be
check: Fix crash of --read-data-subset=x% on empty repository
...
Rounding up to at least one pack file should only be done if at least a
pack file exists.
2021-02-27 16:05:36 +01:00
Michael Eischer
65bd2a9a49
backup: Correctly handle --quiet flag
...
The quiet flag changes the backup output to assume a non-interactive
terminal. However, the output progress interval was not set to 0 by
default.
2021-02-15 22:14:58 +01:00
Alexander Neumann
bb53fcfc0d
Set development version for 0.12.0
2021-02-14 11:44:24 +01:00
Alexander Neumann
27f241334e
Add version for 0.12.0
2021-02-14 11:44:20 +01:00
Alexander Neumann
c0f2c1d871
ls: Check for non-nil error before calling panic()
2021-02-07 21:12:54 +01:00
Alexander Weiss
39a26066f7
rebuild-index: add missing bar.Done()
2021-01-31 18:28:02 +01:00
MichaelEischer
b3dc127af5
Merge pull request #3207 from aawsome/filerestorer-fix-errorhandling
...
Fix error handling in filerestorer and fix #3166
2021-01-31 17:47:46 +01:00
Alexander Weiss
6e942693ba
Fix #3166
2021-01-31 14:22:57 +01:00
Alexander Neumann
027a51529d
prune: Improve error message for missing files
...
This commit changes the error message so that a list of file names is
printed. Before, just the raw map was printed, which is not a great user
interface.
2021-01-31 11:31:27 +01:00
Alexander Neumann
f867e65bcd
Fix issues reported by staticcheck
2021-01-30 20:43:53 +01:00
Alexander Neumann
aef3658a5f
Address review comments
2021-01-30 20:02:37 +01:00
Alexander Neumann
200f09522d
Add more error checks
2021-01-30 20:02:37 +01:00
Alexander Neumann
cbd88c457a
backup: Improve error handling
2021-01-30 20:02:37 +01:00
Alexander Neumann
1a0eb05bfa
errcheck: Add more error checks
2021-01-30 20:02:37 +01:00
MichaelEischer
4d576c2f79
Merge pull request #3217 from M4a1x/read-data-subset-fix
...
Fix missing rand seed for restic check --read-data-subset=x%
2021-01-29 23:34:13 +01:00
Max Stabel
f9e1fa26ff
Fix missing rand seed for restic check --read-data-subset=x%
2021-01-29 23:18:35 +01:00
Alexander Weiss
e08e65dc30
prune: Simplify logic selecting packs to repack
2021-01-29 22:27:22 +01:00
Alexander Weiss
daeb4cdf8f
prune: Fix statistics for --repack-cacheable-only
2021-01-29 22:27:22 +01:00
Alexander Neumann
a16ce65295
Merge pull request #3244 from MichaelEischer/better-damage-reports
...
Print more details about possible repository damages
2021-01-29 11:45:45 +01:00
rawtaz
de7e3a0648
Merge pull request #2823 from greatroar/trust-mtime
...
Add --ignore-ctime flag to backup and document change detection
2021-01-29 00:02:19 +01:00
greatroar
6bd8a2faaa
backup: Add --ignore-ctime option and document change detection
2021-01-28 23:42:10 +01:00
Michael Eischer
58b5679f14
prune: reword missing blobs error
...
The previous wording could be understood such that the prune run did
damage the repository.
2021-01-28 21:48:24 +01:00
Michael Eischer
7b8886c052
prune: report missing but unneeded pack files
...
This indicates a damaged repository so add some output to help with
debugging.
2021-01-28 21:46:01 +01:00
Michael Eischer
ff95999246
rebuild-index: report added/removed/reindexed files
...
This should help with investigating missing pack files.
2021-01-28 21:46:01 +01:00
Michael Eischer
b71c52797a
find: correctly expand multiple blob ids
...
For example `restic find --show-pack-id --blob f78dc991 5b9e4366 ddd8c7d4`
would previously only expand one blob if all of them belong to the same
file.
2021-01-28 21:21:54 +01:00
MichaelEischer
82140967d3
Merge pull request #3228 from aawsome/prune-all-trees
...
prune: Remove all unused trees
2021-01-28 21:04:27 +01:00
MichaelEischer
35033d9b79
Merge pull request #3177 from MichaelEischer/fix-2759
...
prune: don't print stacktrace on console
2021-01-28 20:28:45 +01:00
Alexander Neumann
4d40c70214
Merge pull request #3211 from MichaelEischer/sftp-speedup
...
Speed-up caching/pack download via SFTP
2021-01-28 14:16:55 +01:00
Alexander Neumann
44169d0dc4
Merge pull request #3205 from MichaelEischer/fix-quiet-verbose
...
Properly check that --quiet and --verbose are not combined
2021-01-28 13:53:31 +01:00
Alexander Neumann
bdfedf1f5b
Merge pull request #3173 from MichaelEischer/unify-index-loading
...
Unify index loading
2021-01-28 13:50:42 +01:00
Michael Eischer
e2b0072441
check: add progress bar to the tree structure check
2021-01-28 11:10:50 +01:00
Michael Eischer
505f8a2229
progress/counter: Support updating the progress bar maximum
2021-01-28 11:10:47 +01:00
Michael Eischer
eda8c67616
restic: let FindUsedBlobs handle multiple snapshots at once
2021-01-28 11:08:43 +01:00
Michael Eischer
258ce0c1e5
parallel: report progress for StreamTrees
...
This assigns an id to each tree root and then keeps track of how many
tree loads (i.e. trees referenced for the first time) are pending per
tree root. Once a tree root and its subtrees were fully processed there
are no more pending tree loads and the tree root is reported as
processed.
2021-01-28 11:08:43 +01:00
Michael Eischer
3d6a3e2555
copy: Remove treeCloner struct
2021-01-28 11:08:43 +01:00
Michael Eischer
0caad1e890
copy: parallelize tree walk
2021-01-28 11:08:43 +01:00
Alexander Neumann
a4689eb3b9
Merge pull request #3199 from MichaelEischer/non-interactive-counter
...
Don't print progress on non-interactive terminals
2021-01-28 10:53:38 +01:00
Alexander Weiss
d7dc19a496
prune: Always repack packs containing tree blobs
2021-01-15 16:42:04 +01:00
Michael Eischer
f3442ce8a5
Test that WriteTo of a backend's Load remains accessible
2021-01-03 22:23:53 +01:00
Michael Eischer
97388b3504
Properly check that --quiet and --verbose are not combined
...
If --verbose is specified once, then globalOptions.Verbose == 1.
Previously --quiet --verbose would silently ignore the --verbose flag.
2020-12-30 21:24:18 +01:00
MichaelEischer
e1efc193e1
Merge pull request #3139 from aawsome/prune-healing
...
prune: Add healing of repository in some situations
2020-12-29 22:17:27 +01:00
Alexander Weiss
f0113139ea
prune: Correct error message
2020-12-29 20:20:05 +01:00
Alexander Weiss
f6df94a50e
prune: Add self-healing
...
Allow prune to heal situations where blobs in the index are missing or
the corresponding packfiles are damaged if those blobs are not needed.
2020-12-29 20:20:05 +01:00