Michael Eischer and GitHub
351cbb4f94
Merge pull request #4139 from restic/doc-no-scan
...
doc: Move and update documentation for --no-scan
2023-01-11 21:41:20 +01:00
Leo R. Lundgren
c5542ddcd2
doc: Move and update documentation for --no-scan
2023-01-11 00:09:24 +01:00
rawtaz and GitHub
dffb8e0c14
Merge pull request #4138 from MichaelEischer/doc-sparse
...
doc: add description for restore --sparse
2023-01-10 23:39:51 +01:00
Michael Eischer
b151fa498a
doc: add description for restore --sparse
2023-01-10 23:27:42 +01:00
Michael Eischer and GitHub
c354b55e62
Merge pull request #4136 from restic/doc-small-files
...
doc: Clarify text about tuning backups for small files
2023-01-08 22:00:09 +01:00
Michael Eischer and GitHub
375953a001
Merge pull request #4088 from MichaelEischer/doc-cifs-backup-source
...
doc: reading from CIFS can be a problem on linux
2023-01-08 21:56:48 +01:00
Leo R. Lundgren and Michael Eischer
6306797238
doc: Clarify text about tuning backups for small files
2023-01-08 21:49:55 +01:00
Michael Eischer
ef9164fcbb
doc: reading from CIFS can be a problem on linux
2023-01-08 21:47:34 +01:00
rawtaz and GitHub
e2bcfd68dd
Merge pull request #4135 from restic/changelogs
...
Polish changelogs
2023-01-08 20:04:24 +01:00
Leo R. Lundgren
33fb351386
Polish changelogs
2023-01-08 19:48:51 +01:00
Michael Eischer and GitHub
c9840da4f8
Merge pull request #4134 from MichaelEischer/fix-verbose-help-text
...
Correct maximum verbosity level in help message
2023-01-07 22:24:04 +01:00
Michael Eischer
732184a849
Correct maximum verbosity level in help message
...
The maximum for `--verbose=n` is n=2. Internally it is translated into a
scale from 0 to 3. However, the default (without verbose) is 1, thus the
verbosity level can only be increased two times.
2023-01-07 22:02:13 +01:00
Michael Eischer and GitHub
24178c97e9
Merge pull request #4117 from MichaelEischer/prune-dry-run-help
...
prune: make it clearer when prune is used in dry-run mode
2023-01-04 23:18:53 +01:00
Michael Eischer
7a36306901
forget: Clarify log message for --dry-run --prune
2023-01-04 00:44:46 +01:00
Michael Eischer
b404ad4eaa
prune: make it clearer when prune is used in dry-run mode
2023-01-04 00:44:46 +01:00
Michael Eischer and GitHub
e02a10c58a
Merge pull request #4109 from MichaelEischer/fix-prune-uncompressed-accounting
...
prune: Fix calculation of remaining uncompressed data
2023-01-03 23:28:10 +01:00
Michael Eischer
81dc8c8d13
prune: Fix calculation of remaining uncompressed data
...
Only the repacking of *un*compressed packs reduces the amount of
uncompressed data. Previously the counter even overflowed for fully
compressed repositories.
2023-01-03 22:34:36 +01:00
Michael Eischer and GitHub
89a8006578
Merge pull request #4104 from philaris/fix_max_uint32_uid_gid_to_zero
...
in tar dump, convert uid, gid of value -1 to zero
2023-01-02 22:28:28 +01:00
Panagiotis Cheilaris
3b516d4b70
convert uid/gid -1 to 0 only in 32-bit tar dump
...
Only for a 32-bit build of restic, convert a uid or gid value of -1 to 0.
2022-12-30 18:12:12 +01:00
Michael Eischer and GitHub
0de3b24756
Merge pull request #4110 from MichaelEischer/remove-exitf
...
Remove Exitf function
2022-12-29 12:07:51 +01:00
Michael Eischer and GitHub
0fbff39ae8
Merge pull request #4108 from MichaelEischer/cleanup-check-output
...
Cleanup check output
2022-12-29 11:59:18 +01:00
Michael Eischer
68b1f30733
Remove Exitf function
...
Commands should use the normal shutdown path. In addition, the Exitf
function was only used by `dump` and `restore` but not any other command
which introduces the risk of inconsistent behavior.
2022-12-28 21:42:38 +01:00
Panagiotis Cheilaris
a86a56cf3b
fix lint issue with function name 'tarId'
...
See https://github.com/golang/lint/issues/89 and
https://github.com/golang/lint/issues/124
2022-12-28 18:46:58 +01:00
Panagiotis Cheilaris
050ed616ae
be more explicit with uid or gid of value -1
2022-12-28 18:44:36 +01:00
Michael Eischer
8430399fce
check: Partially fix garbled output
...
When reporting an error for a tree, the output message can overlap with
the progress bar output, e.g. `error for tree e91ef6fb:napshots`.
The fix only applies for this specific message and does not work on
Windows.
2022-12-28 17:47:27 +01:00
Michael Eischer
aea96b7d86
check: Slightly improve help message
...
If a repository has both pack/index related warnings and errors, then
the help message is quite misleading. Reword it slightly to be more
clear.
2022-12-28 17:46:06 +01:00
Michael Eischer and GitHub
bcae28afb4
Merge pull request #4100 from klemensn/tag-self-update
...
Reinstate selfupdate tag to make builds without self-update work
2022-12-28 15:49:11 +01:00
Panagiotis Cheilaris
10fa5cde0a
in tar dump, convert uid, gid of value -1 to zero
2022-12-27 16:36:04 +01:00
Klemens Nanni
61e7386384
Bugfix: Make distribution package builds without self-update work
2022-12-26 21:52:24 +04:00
Klemens Nanni
94f6e7d4a6
Reinstate selfupdate tag to make builds without self-update work
...
Revert what seems to be a typo introduced as part of the fix for #2041
in 2018 7d0f2eaf24 .
`xbuild` does not look like a go build/tag keyword to me, I failed to
find documentation for it and using `go install -tags '!selfupdate' ...`
has no effect, i.e. self-update code is still compiled.
`+build` however works; updating the OpenBSD port/binary package
security/restic to apply this PR works as expected:
```
$ restic help | grep self
$ restic self-update
unknown command "self-update" for "restic"
```
(Using `go:build` now as per restic's style and gofmt.)
Previously, using `restic-0.14.0p1` on OpenBSD/amd64 7.2-current would
check for a newer version and probably attempt replacing the system wide
root-owned executable (on a read-only filesystem) as unprivileged user:
```
$ restic version
restic 0.14.0 compiled with go1.19.2 on openbsd/amd64
$ restic help | grep self
self-update Update the restic binary
$ restic self-update
writing restic to /usr/local/bin/restic
find latest release of restic at GitHub
restic is up to date
```
(It never tried to actually write besaid path; doing so would fail, so
the current message can be considered misleading.)
2022-12-26 21:46:22 +04:00
Michael Eischer and GitHub
90fb6f70b4
Merge pull request #4089 from greatroar/errors
...
Clean up error handling further
2022-12-24 10:41:56 +01:00
Michael Eischer and GitHub
29b8500254
Merge pull request #4090 from restic/upgrade-dependencies
...
Upgrade dependencies
2022-12-23 22:34:39 +01:00
Michael Eischer and GitHub
705cabb304
Merge pull request #3981 from MichaelEischer/prune-uncompressed-stats
...
prune: report how much data must be repacked to compressed the repo
2022-12-23 22:34:04 +01:00
Michael Eischer and GitHub
a6f3ae5790
Merge pull request #4094 from googol42/master
...
remove duplicated init
2022-12-23 22:33:01 +01:00
Andreas Dominik Preikschat and Andreas P
ea37240597
remove duplicated init
...
the documentation contained the `init` command twice
2022-12-20 17:24:56 +01:00
Michael Eischer
bd2f6aaac3
azure: downgrade azblob dependency due to build breakages on Solaris
2022-12-17 23:35:07 +01:00
Michael Eischer
583372956b
Upgrade dependencies
...
Nothing special has changed.
2022-12-17 15:23:11 +01:00
greatroar
1678392a6d
checker: Make ErrLegacyLayout a value, not a type
2022-12-17 09:41:07 +01:00
greatroar
d9002f050e
backend: Don't Wrap errors from url.Parse
...
The messages from url.Error.Error already start with the word "parse".
2022-12-17 09:41:07 +01:00
greatroar
b150dd0235
all: Replace some errors.Wrap calls by errors.WithStack
...
Mostly changed the ones that repeat the name of a system call, which is
already contained in os.PathError.Op. internal/fs.Reader had to be
changed to actually return such errors.
2022-12-17 09:41:07 +01:00
Michael Eischer and GitHub
cccc17e4e9
Merge pull request #4086 from blackpiglet/modify_access_denied_code
...
Fix: change error code in function isAccessDenied to AccessDenied
2022-12-16 21:55:52 +01:00
Michael Eischer and GitHub
2723159ed4
Merge pull request #3931 from kjetilho/feature/optional_scanner
...
add --no-scan to backup command
2022-12-16 21:42:22 +01:00
ecc62c8be2
Update changelog/unreleased/issue-4085
...
Co-authored-by: greatroar <61184462+greatroar@users.noreply.github.com >
Signed-off-by: Xun Jiang <blackpiglet@gmail.com >
2022-12-16 21:41:16 +01:00
Xun Jiang and Michael Eischer
cc5325d22b
Fix: change error code in function isAccessDenied to AccessDenied
...
Signed-off-by: Xun Jiang <blackpiglet@gmail.com >
2022-12-16 21:41:16 +01:00
Michael Eischer and GitHub
da0e45cf40
Merge pull request #4083 from greatroar/cleanup
...
repository: Remove empty cleanup functions in tests
2022-12-16 21:39:30 +01:00
Kjetil Torgrim Homme and Michael Eischer
14aa6f2a00
add --disable-scanner to backup command
...
The scanner process has only cosmetic effect for the progress printer,
and can be disabled without impacting functionality when the user does
not need an estimate of completion.
In many cases the scanner process can provide beneficial priming of
the file system cache, so as general advice it should not be disabled.
However, tests have shown that backup of NFS and fuse based filesystems,
where stat(2) is relatively expensive, can be significantly faster
without the scanner.
2022-12-16 21:29:59 +01:00
Michael Eischer and GitHub
7bdb985dde
Merge pull request #4079 from MichaelEischer/rewrite-set-original
...
rewrite: Always set the Original field in a rewritten snapshot
2022-12-13 22:56:20 +01:00
Michael Eischer and GitHub
1bfe98bdc0
Merge pull request #2398 from DanielG/b2-hide-file
...
b2: Fallback to b2_hide_file when delete returns unauthorized
2022-12-13 22:52:23 +01:00
Michael Eischer and GitHub
1c071a462e
Merge pull request #4084 from ekarlso/azure-stat-fix
...
fix: Make create not error out when ContainerNotFound
2022-12-13 22:49:05 +01:00
Michael Eischer and GitHub
25d22d5241
Merge pull request #4082 from MichaelEischer/unbuffered-logger-for-testing
...
Don't buffer the golang `log` package output when running tests
2022-12-13 22:45:50 +01:00
Endre Karlson
7dd33c0ecc
azure: Make create not error out when ContainerNotFound
2022-12-11 22:57:23 +01:00
greatroar
c0b5ec55ab
repository: Remove empty cleanup functions in tests
...
TestRepository and its variants always returned no-op cleanup functions.
If they ever do need to do cleanup, using testing.T.Cleanup is easier
than passing these functions around.
2022-12-11 11:06:25 +01:00
Michael Eischer
2e3d4640be
Don't buffer the golang log output when running tests
2022-12-10 16:08:27 +01:00
Michael Eischer
38b2e9b42c
rewrite: Always set the Original field in a rewritten snapshot
...
The Original field is meant to remember the original snapshot id if e.g.
changing its tags. It was only set by the `rewrite` command if it was
not set previously. However, a rewritten snapshot is potentially rather
different from the original snapshot. Thus just always set the Original
field. This also makes it easier to later on detect and potentially
remove the original snapshots.
2022-12-10 12:47:00 +01:00
Michael Eischer and GitHub
049a105ba5
Merge pull request #4077 from greatroar/cleanup
...
test: Use testing.T.Cleanup to remove tempdirs
2022-12-09 22:17:46 +01:00
Michael Eischer and GitHub
4b98b5562d
Merge pull request #4075 from greatroar/sftp-enospc
...
sftp: Fix ENOSPC check
2022-12-09 22:00:13 +01:00
greatroar
f90bf84ba7
test: Use testing.T.Cleanup to remove tempdirs
2022-12-09 14:23:55 +01:00
greatroar
83d23b3ae8
Changelog for ENOSPC handling bug
2022-12-09 08:50:30 +01:00
Michael Eischer and GitHub
eae7366563
Merge pull request #4028 from ekarlso/use-az-blob-sdk
...
Switch to azblob sdk
2022-12-07 21:58:03 +01:00
Endre Karlson and Michael Eischer
25648e2501
azure: Switch to azblob sdk
2022-12-07 21:46:07 +01:00
greatroar
62520bb7b4
sftp: Fix ENOSPC check
...
We now check for space that is not reserved for the root user on the
remote, and the check is no longer in a defer block because it wouldn't
fire. Some change in the surrounding code may have led the deferred
function to capture the wrong err variable.
Fixes #3336 .
2022-12-07 21:06:46 +01:00
rawtaz and GitHub
4ba31df08f
Merge pull request #4074 from greatroar/lobaro-docker
...
doc: Remove ref to Lobaro's Docker image
2022-12-04 18:00:08 +01:00
greatroar
5efcbe143c
doc: Remove ref to Lobaro's Docker image
...
It hasn't been updated for a while and has restic 0.12.0. Fixes #4002 .
2022-12-04 16:20:42 +01:00
Michael Eischer and GitHub
0df585dd99
Merge pull request #4066 from sedlund/fix#4033
...
fix#4033 cmd: copy no longer lists skipped existing snapshots by default
2022-12-03 19:22:11 +01:00
Michael Eischer and GitHub
223da7344e
Merge pull request #4070 from restic/fix-cloud-tests
...
Fix cloud tests
2022-12-03 19:21:25 +01:00
Michael Eischer
2b67862420
backend/test: check that IsNotExist actually works
2022-12-03 18:56:55 +01:00
Michael Eischer
2f934f5803
gs: check against the correct error in IsNotExist
2022-12-03 18:49:54 +01:00
Michael Eischer
04d101fa94
gs/s3: remove useless os.IsNotExist check
2022-12-03 18:49:54 +01:00
Michael Eischer
579cd6dc64
azure: fix totally broken IsNotExist
2022-12-03 18:49:54 +01:00
Michael Eischer and GitHub
3ebdadc58f
Merge pull request #4069 from greatroar/cleanup
...
cache, prune, restic: Cleanup
2022-12-03 17:50:52 +01:00
Michael Eischer and GitHub
bc8b2455b9
Merge pull request #4064 from MichaelEischer/flaky-abort-early-on-error
...
archiver: Fix flaky TestArchiverAbortEarlyOnError
2022-12-03 17:43:44 +01:00
Michael Eischer and GitHub
60c6a09324
Merge pull request #4065 from MichaelEischer/flaky-rclone-failed-start
...
rclone: treat "file already closed" as command startup error
2022-12-03 17:42:56 +01:00
Michael Eischer and GitHub
8bf6b2b80d
Merge pull request #4067 from MichaelEischer/remove-backend-test-method
...
Remove `Test()` method from Backend
2022-12-03 17:40:55 +01:00
Michael Eischer and GitHub
78ea69082a
Merge pull request #4068 from MichaelEischer/debug-lock-refresh-test
...
Add more debug logging to `TestLockSuccessfulRefresh`
2022-12-03 17:38:21 +01:00
cbe73ace3f
Update changelog/unreleased/issue-4033
...
Co-authored-by: greatroar <61184462+greatroar@users.noreply.github.com >
2022-12-03 20:07:37 +08:00
greatroar
63bed34608
restic: Clean up restic.IDs type
...
IDs.Less can be rewritten as
string(list[i][:]) < string(list[j][:])
Note that this does not copy the ID's.
The Uniq method was no longer used.
The String method has been reimplemented without first copying into a
separate slice of a custom type.
2022-12-03 12:38:20 +01:00
greatroar
0c749dd358
prune: Pass fewer options around
2022-12-03 12:14:04 +01:00
greatroar
d45a2475e1
cache: Rewrite unnecessary if-else
2022-12-03 12:13:54 +01:00
Michael Eischer
6b5d6b9f2c
Add more debug logging to TestLockSuccessfulRefresh
...
The test fails from time to time. Add some more logging to hopefully get
an idea where things go wrong.
2022-12-03 12:05:38 +01:00
Michael Eischer
648edeca40
retry: Do not retry Stat() if file does not exist
...
In non test/debug code, Stat() is used exclusively to check whether a
file exists. Thus, do not retry if a file is reported as not existing.
2022-12-03 11:42:48 +01:00
Michael Eischer
40ac678252
backend: remove Test method
...
The Test method was only used in exactly one place, namely when trying
to create a new repository it was used to check whether a config file
already exists.
Use a combination of Stat() and IsNotExist() instead.
2022-12-03 11:28:10 +01:00
sedlund
06ee0339aa
fix#4033 cmd: copy no longer lists skipped existing snapshots by default
2022-12-03 09:55:39 +08:00
Michael Eischer and GitHub
57d8eedb88
Merge pull request #4020 from greatroar/fuse-inode
...
fuse: Better inode generation
2022-12-02 22:28:15 +01:00
Michael Eischer and GitHub
ca1803cacb
Merge pull request #4063 from MichaelEischer/replace-ioutil-usage
...
Replace ioutil usage
2022-12-02 21:49:40 +01:00
Michael Eischer and GitHub
0af89a5738
Merge pull request #3132 from metalsp0rk/init-json
...
Init command JSON output
2022-12-02 21:49:22 +01:00
Michael Eischer
364a396fd6
init: use standard name message_type to distinguish JSON messages
2022-12-02 21:33:03 +01:00
Michael Eischer
9a9f559806
init: cleanup json print code
2022-12-02 21:33:03 +01:00
Kyle Brennan and Michael Eischer
933c9af328
create changelog entry for issue-3124 and pull-3132
2022-12-02 21:32:30 +01:00
Kyle Brennan and Michael Eischer
a6ae79b39e
support json output for init command
2022-12-02 21:32:30 +01:00
Michael Eischer
f3d964a8c1
rclone: treat "file already closed" as command startup error
...
Since #3940 the rclone backend returns the commands exit code if it
fails to start. The list of expected errors was missing the "file
already closed"-error which can occur if the http test request first
learns about the closed pipe to rclone before noticing the canceled
context.
Go internally makes sure that a file descriptor is unusable once it was
closed, thus this cannot have unintended side effects (like accidentally
reading from the wrong file due to a reused file descriptor).
2022-12-02 20:46:02 +01:00
Michael Eischer
a9972dbe7d
archiver: Fix flaky TestArchiverAbortEarlyOnError
...
Saving the blobs of a file by now happens asynchronously to the
processing in the FileSaver. Thus we have to account for the blobs
queued for saving.
2022-12-02 20:07:34 +01:00
Michael Eischer
f755233210
Replace usages of ioutil.ReadDir
...
This changes the return type to []fs.DirEntry. However, as we only use
the filenames anyways, this doesn't make a difference.
2022-12-02 19:54:27 +01:00
Michael Eischer and GitHub
fa20a78bb6
Merge pull request #4056 from greatroar/cleanup
...
backend, fs, options: Minor cleanup
2022-12-02 19:44:54 +01:00
Michael Eischer
ff7ef5007e
Replace most usages of ioutil with the underlying function
...
The ioutil functions are deprecated since Go 1.17 and only wrap another
library function. Thus directly call the underlying function.
This commit only mechanically replaces the function calls.
2022-12-02 19:36:43 +01:00
greatroar and Michael Eischer
65612d797c
backend, options: Prefer strings.Cut to SplitN
...
Also realigned the various "split into host:bucket:prefix"
implementations.
2022-12-02 19:19:14 +01:00
Michael Eischer and GitHub
2d5e28e777
Merge pull request #4059 from restic/dependabot/go_modules/github.com/minio/minio-go/v7-7.0.45
...
build(deps): bump github.com/minio/minio-go/v7 from 7.0.44 to 7.0.45
2022-12-01 21:20:57 +01:00
dependabot[bot] and GitHub
4fefa2ade2
build(deps): bump github.com/minio/minio-go/v7 from 7.0.44 to 7.0.45
...
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go ) from 7.0.44 to 7.0.45.
- [Release notes](https://github.com/minio/minio-go/releases )
- [Commits](https://github.com/minio/minio-go/compare/v7.0.44...v7.0.45 )
---
updated-dependencies:
- dependency-name: github.com/minio/minio-go/v7
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-12-01 01:03:42 +00:00
Michael Eischer and GitHub
3c5d1eabe9
Merge pull request #4051 from restic/dependabot/go_modules/github.com/klauspost/compress-1.15.12
...
build(deps): bump github.com/klauspost/compress from 1.15.9 to 1.15.12
2022-11-28 21:47:55 +01:00
Michael Eischer and GitHub
bec391ee26
Merge pull request #4053 from greatroar/xattr
...
Upgrade pkg/xattr to version with Solaris FIFO fix
2022-11-28 21:06:19 +01:00
greatroar
daafcaf380
Upgrade pkg/xattr to version with Solaris FIFO fix
...
This version doesn't have a release tag yet, but it's 0.4.9 + one patch.
Fixes #4003 .
2022-11-28 20:43:51 +01:00