Commit Graph

7351 Commits

Author SHA1 Message Date
Michael Eischer 8154f6a77a Ensure consistent naming for `<snapshot>:<subfolder>` syntax 2023-07-22 19:55:57 +02:00
Michael Eischer 184b7616ba document snapshot:subfolder syntax 2023-07-22 19:55:57 +02:00
Michael Eischer 67f237b4f3 add changelog for snapshot:path syntax 2023-07-22 19:55:57 +02:00
Michael Eischer 090f9d6237 restic: Cleanup and simplify TestCreateSnapshot 2023-07-22 19:55:57 +02:00
Michael Eischer 321cc35cde restic: add test for FindTreeDirectory 2023-07-22 19:55:57 +02:00
Michael Eischer a97915642c restic: Ensure snapshots created by TestCreateSnapshot are valid
All nodes in a tree must be sorted by node name. Otherwise functionality
like searching for a specific tree node will break.
2023-07-22 19:55:57 +02:00
Michael Eischer c64d81063e test snapshot filtering with snapshot:path syntax 2023-07-22 19:55:57 +02:00
Michael Eischer 233b841ad9 Add cat tree snapshot:subpath command
This command prints the tree for the given path.
2023-07-22 19:55:57 +02:00
Michael Eischer 85860e6e97 Add support for snapshot:subpath syntax
This snapshot specification syntax is supported by the cat, diff, dump,
ls and restore command.
2023-07-22 19:55:57 +02:00
Michael Eischer 2dd6769429 lock: Fix possible deadlock during refresh of stale lock
A delayed lock refresh could send a signal on the `refreshed` channel
while the `monitorLockRefresh` goroutine waits for a reply to its
`refreshLockRequest`. As the channels are unbuffered, this resulted in a
deadlock.
2023-07-22 19:55:44 +02:00
Michael Eischer 5d9b0d894e lock: add unit test for RefreshStaleLock 2023-07-22 19:55:44 +02:00
Michael Eischer d4bf7a3cb1 restic: cleanup lock test 2023-07-22 19:55:44 +02:00
Michael Eischer 24c8a33da9 restic: reduce sleeps in lock tests 2023-07-22 19:55:44 +02:00
Michael Eischer 399f8e84a1 lock: use mem backend for locking tests
This hopefully fixes the timing related test failures which appear to be
caused by very slow fsync calls.
2023-07-22 19:55:44 +02:00
Michael Eischer 6a436d731d lock: rename test helper function 2023-07-22 19:55:44 +02:00
Michael Eischer b2fcbc21cb lock: rework stale lock refresh to avoid data race 2023-07-22 19:55:44 +02:00
Michael Eischer 05e5e29a8c backup: don't pretend to lock repo for dry run
The dry run did not actually create lock files, but still ran all other
parts of the lock processing.
2023-07-22 19:55:44 +02:00
Michael Eischer f490288738 lock: freeze backend operations while refreshing stale lock
Freeze new backend operations while trying to refresh a stale lock.
2023-07-22 19:55:44 +02:00
Michael Eischer 51718ec561 restic: generic implemention of AsBackend 2023-07-22 19:55:44 +02:00
Michael Eischer 11eb88a2ea lock: cleanup 2023-07-22 19:55:44 +02:00
Michael Eischer bee3231ed4 lock: try refreshing of stale locks
A stale lock may be refreshed if it continues to exist until after a
replacement lock has been created. This ensures that a repository was
not unlocked in the meantime.
2023-07-22 19:55:44 +02:00
Michael Eischer 60d8066568
Merge pull request #4407 from MichaelEischer/simpler-required-ci
CI: Add check that verifies the results of other checks
2023-07-22 19:55:06 +02:00
Michael Eischer 08dea911bd CI: Add check that verifies the results of other checks
To properly use merge queues, it is necessary to mark certain checks as
"required" in the branch protection rules. However, this doesn't scale
with matrix jobs and would require manual tweaks of the CI jobs change.
The new analyze job simplifies this by allowing the branch protection
rule just check for that job. All further dependencies are then
configured within the CI config.
2023-07-16 14:13:41 +02:00
Michael Eischer 47206a6579
Merge pull request #4351 from kenny-y-dev/human-readable-ls
Add --human-readable to ls and find output
2023-07-16 11:44:41 +00:00
Michael Eischer 594689db32
Merge pull request #4400 from MichaelEischer/rest-handle-missing-dirs
rest: Ignore missing directories
2023-07-14 23:29:37 +02:00
Michael Eischer 5705326bb8 add changelog 2023-07-14 22:39:38 +02:00
Michael Eischer 978ebaac49 rest: use http status code constants 2023-07-14 22:39:38 +02:00
Michael Eischer 307aeb6849 rest: Don't return error if listing non-existent directory
When transferring a repository from S3 to, for example, a local disk
then all empty folders will be missing.

When saving files, the missing intermediate folders are created
automatically. Therefore, missing directories can be ignored by the
`List()` operation.
2023-07-14 22:39:38 +02:00
Michael Eischer 9cd85d5956
Merge pull request #4029 from ekarlso/add-azure-workload-identity-support
add azure workload identity support
2023-07-09 19:06:59 +00:00
Michael Eischer c9f506925c azure: Document additional auth options 2023-07-09 20:56:21 +02:00
Michael Eischer e990d3d483 azure: Support authentication using managed / workload identity
See https://github.com/Azure/azure-sdk-for-go/tree/sdk/azidentity/v1.3.0/sdk/azidentity
2023-07-09 14:47:03 +02:00
Michael Eischer 7042190807
Merge pull request #4403 from MichaelEischer/fix-certificate-env-handling
Fix certificate env handling
2023-07-09 14:46:38 +02:00
Michael Eischer c158741e2e CI: add minimal CLI test
Just create a repository and run a minimal backup.
2023-07-09 14:29:43 +02:00
Michael Eischer 89fbd39e59 Don't print stacktrace on invalid cacert option 2023-07-09 14:23:54 +02:00
Michael Eischer 1ce599d2ae Fix handling of empty cacert environment variable
This resulted in a "empty filename for root certificate supplied" error.
2023-07-09 14:23:54 +02:00
Michael Eischer 789fec3da7
Merge pull request #4402 from MichaelEischer/merge-queue-setup
CI: Enable missing CI tests for Github merge queue
2023-07-09 13:57:10 +02:00
Michael Eischer 8a120c8800 CI: Enable missing CI tests for Github merge queue 2023-07-08 23:51:39 +02:00
Michael Eischer 41395e83c5
Merge pull request #2740 from metalsp0rk/document-json
Add JSON documentation
2023-07-08 21:34:02 +00:00
Michael Eischer 2a193195b0
Merge pull request #4364 from MichaelEischer/multiplatform-docker
Setup multiplatform docker builds
2023-07-08 23:31:58 +02:00
Michael Eischer 229c7b24a4 doc: add program_version field of snapshot JSON output 2023-07-08 23:31:20 +02:00
Michael Eischer b34ce57dd4 doc: describe JSON output of restore command 2023-07-08 23:31:20 +02:00
Michael Eischer 1ce839228e doc: Expand JSON documentation 2023-07-08 23:31:20 +02:00
Kyle Brennan fb1170c1d6 doc tweaks 2023-07-08 23:21:41 +02:00
Kyle Brennan e457fe22bc Documentation improvement 2023-07-08 23:21:41 +02:00
Kyle Brennan 39299e36ef add json documentation 2023-07-08 23:21:41 +02:00
Michael Eischer 0512f292e8
Merge pull request #4361 from MichaelEischer/stats-repo-debug-info
stats: Add `debug` mode to collect repository statistics
2023-07-08 23:20:23 +02:00
Michael Eischer 3a93e28605 CI: Remove .dockerignore to ensure reproducible builds
Since go 1.18, built binaries also include VCS information such as the
built commit. This information is also included in the official
binaries. To ensure that the Docker container recreates the same
binaries, the .git folder must also be transferred into the container.
Thus, remove the .dockerignore file.

The copied files must also be owned by the current user within the
container, as git refuses to work otherwise.
2023-07-08 23:16:14 +02:00
Michael Eischer 6b82cce1bd add changelog for multiplatform containers 2023-07-08 23:16:14 +02:00
Michael Eischer 31e07cecbb docker: update to Go 1.20 for custom container builds 2023-07-08 23:05:39 +02:00
Michael Eischer c181b51360 doc: Update docker build process 2023-07-08 23:05:38 +02:00