Commit Graph

627 Commits

Author SHA1 Message Date
Michael Eischer 4e8eea7ab4 Merge pull request #21902 from restic/speedup-test
Cut local test suite execution time in half
2026-06-24 21:34:55 +02:00
Michael Eischer 8f00b335b4 rclone/fs: parallelize tests 2026-06-20 22:43:03 +02:00
Michael Eischer 5683224a3c layout: skip creation of pack subdirectories in integration tests
Each time a local backend is created, the local backend also creates all
shard subdirectories. For the integration tests this has the downside
that this results in ~120 (number of test) * 256 (number of directories)
= 30k directories that are created unnecessarily. This significantly
slows down test execution and cleanup.
2026-06-20 20:00:17 +02:00
Michael Eischer a3be3bd9e1 backend/test: gradually increase timeout for TestListCancel to speed up fast backends 2026-06-20 19:46:22 +02:00
Michael Eischer c021b8cde0 decrease test data sizes 2026-06-20 19:46:22 +02:00
Michael Eischer 28521d27c1 Merge pull request #21897 from MichaelEischer/sftp-fix-chmod
backend/sftp: fix removing files on windows sftp
2026-06-20 19:29:49 +02:00
Michael Eischer 9ab5fc59c2 restic: split FileType for backend.FileType
Equality of constants is enforced via internal/repository/filetype.go
using compile time checks.
2026-06-20 19:15:40 +02:00
Michael Eischer 6c509f7ac1 Correctly pair backend/restic.FileType with APIs
Use backend.FileType to interact with the backend. And restic.FileType
to interact with the repository.
2026-06-20 19:15:40 +02:00
Michael Eischer ea699bb0ba backend/rest: fix flaky test cleanup (#21901) 2026-06-20 19:14:54 +02:00
Michael Eischer 4d1b9cef63 internal/fileio: extract low-level file I/O from internal/fs
Move TempFile and PreallocateFile into internal/fileio. internal/fs
primarily focuses on converting between data.Node and the actual
filesystem state. Extract the two methods to not pull in unnecessary
dependencies.
2026-06-20 17:48:35 +02:00
Michael Eischer 203e595ccb backend/sftp: fix removing files on windows sftp 2026-06-19 23:23:01 +02:00
Michael Eischer 6c67a095dc backend/sftp: fix error reporting of Save method 2026-06-19 23:09:59 +02:00
Michael Eischer 18c47c5bf9 backend/util: fix errorhandling in DefaultDelete test helper 2026-06-14 16:40:09 +02:00
Michael Eischer faea0d677a backend/sftp: fix file handle leak if chmod for a file fails 2026-06-14 16:39:42 +02:00
Michael Eischer ae8fdb08fa backend/rest: correctly close body on out of bounds read 2026-06-14 16:38:54 +02:00
Michael Eischer 5c8c048c1a backend/b2: correctly close file if too short 2026-06-14 16:38:21 +02:00
Michael Eischer 8e93172bf8 cache: remove dependency on crypto package for truncation checks
The cache backend + repository can by now properly recover from damaged
files stored in the cache. Thus, remove the legacy sanity check.
2026-06-13 20:05:05 +02:00
Michael Eischer 784812361e Merge pull request #21858 from MichaelEischer/unexport-backends
Unexport several backend types
2026-06-10 22:51:32 +02:00
Michael Eischer c745f810b3 backend/cache: use backend types not restic types (#21860) 2026-06-10 22:45:39 +02:00
Michael Eischer 721411e04c backend/azure/gs/s3: remove unused Path() method 2026-06-10 22:37:07 +02:00
Michael Eischer b07ff6cd34 backends: remove unused SetListMax method
It was never used. Remove the dead code.
2026-06-10 22:37:07 +02:00
Michael Eischer 8b3bbb527c backend/s3: unexport 2026-06-10 22:37:07 +02:00
Michael Eischer 4a2d8e04aa backend/rclone: unexport 2026-06-10 22:37:07 +02:00
Michael Eischer a36488b706 backend/gs: unexport 2026-06-10 22:37:07 +02:00
Michael Eischer cfb506a77a backend/cache: unexport 2026-06-10 22:37:07 +02:00
Michael Eischer 474c094cac Merge pull request #21817 from eyupcanakman/fix/sftp-dir-permissions
sftp: Use mode 0700 for repository directories
2026-05-31 16:40:17 +02:00
Eyüp Can Akman 62cf574fd8 sftp: Use mode 0700 for repository directories
The SFTP backend created repository directories with pkg/sftp's Mkdir
and MkdirAll, which take no mode argument, so the directories inherited
the SFTP server's umask instead of the 0700 used for local
repositories. Set the mode of each directory the backend creates.
2026-05-31 12:40:26 +03:00
Michael Eischer c04a1d857d backend/retry: debug log correct error on failed file removal 2026-05-16 15:35:42 +02:00
Michael Eischer e1a5550a27 test: use generics in Equal function signature
This simplifies comparing a typed value against nil. Previously it was
necessary to case nil into the proper type.
2026-01-31 20:03:38 +01:00
Michael Eischer 1e6ed458ff remove old // +build comments 2025-11-30 11:53:23 +01:00
Michael Eischer 7e80536a9b Merge pull request #5472 from wplapper/cmd_copy_stream
restic copy --stream: run one large copy operation crossing snapshot boundaries - issue #5453
2025-11-26 20:57:46 +01:00
Winfried Plappert b87f7586e4 restic copy --batch: a fresh start from commit 382616747
Instead of rebasing my code, I decided to start fresh, since WithBlobUploader()
has been introduced.

changelog/unreleased/issue-5453:
doc/045_working_with_repos.rst:
the usual

cmd/restic/cmd_copy.go:
gather all snaps to be collected - collectAllSnapshots()
run overall copy step - func copyTreeBatched()
helper copySaveSnapshot() to save the corresponding snapshot

internal/repository/repack.go:
introduce wrapper CopyBlobs(), which passes parameter `uploader restic.BlobSaver` from
WithBlobUploader() via copyTreeBatched() to repack().

internal/backend/local/local_windows.go:
I did not touch it, but gofmt did: whitespace
2025-11-19 07:09:24 +00:00
Michael Eischer 1caeb2aa4d rclone: fix rare test failure if rclone cannot be started 2025-11-16 20:14:21 +01:00
Michael Terry 7f3e3b77ce backend/local: fix "operation not supported" when unlocking
If the repo is on a mounted folder that doesn't support chmod (like
SMB), it was causing an "operation not supported" error when trying to
chmod 666 a file before deleting it.

But it isn't generally needed before deleting a file (the folder
permissions matter there, not the file permissions). So, just drop it.
2025-11-16 08:09:51 -05:00
Michael Eischer 71432c7f4b Merge pull request #5555 from MichaelEischer/extract-globaloptions
Split globalOptions into separate package
2025-10-12 18:31:44 +02:00
Michael Eischer 394c8de502 add package to create a prepopulated backend registry 2025-10-12 17:56:28 +02:00
Srigovind Nayak e65ee3cba8 fix: keep the PutBlock Size to 100 MiB
No complaints in the past.
2025-10-05 21:41:26 +05:30
Srigovind Nayak 34a94afc48 azure: update upload size constants to reduce memory allocation 2025-10-05 21:41:25 +05:30
Srigovind Nayak 9bcd09bde0 azure: reduce singleBlockMaxSize to accommodate 32-bit systems 2025-10-05 21:41:25 +05:30
Srigovind Nayak e80e832130 azure: remove saveSmall, use only PutBlob API 2025-10-05 21:41:25 +05:30
Srigovind Nayak dd2d562b7b azure: enhanced upload with single PutBlob API and configurable upload methods 2025-10-05 21:41:25 +05:30
Rani 3ae6a69154 Bugfix(sftp): fix loose permissions on sftp backend. (#5497) 2025-10-03 18:20:52 +00:00
Michael Eischer fd241b8ec7 Merge pull request #5527 from MichaelEischer/drop-s3-static-credentials
s3: drop manual credentials loading from environment
2025-10-03 19:57:55 +02:00
Michael Eischer 4dc71f24c5 backends: pass error logger to backends 2025-10-03 18:22:42 +02:00
Michael Eischer a30a36ca51 s3: drop manual credentials loading from environment
credentials.EnvAWS offers a superset of the manually implemented
credentials loading. Rework the error message that is shown if no
credentials were found but either access or secret key are set.
2025-09-24 21:02:02 +02:00
Michael Eischer 7257cd2e5f extra linters 2025-09-21 22:24:35 +02:00
Michael Eischer 60d80a6127 Fix linter warnings 2025-09-21 22:24:15 +02:00
Michael Eischer 6ff7cd9050 backend/util: extract background handling code 2025-09-08 10:42:35 +02:00
greatroar 1ed93bd54d backend,termstatus: Unify foreground/background detection
PR #5358 reintroduced a version of the TIOCGPGRP ioctl call that works
on all Unix platforms except Linux, due to a bug/inconsistency in
x/sys/unix. This commit fixes that by introducing termstatus.Tcgetpgrp.

It also introduces termstatus.Getpgrp and termstatus.Tcsetpgrp to deal
with the different signature of unix.Getpgrp in Solaris vs. all other
Unix platforms and an int-overflowing constant on AIX, so that some
AIX/Solaris-specific code can be removed elsewhere and
foreground/background detection is done the same everywhere except on
Windows.
2025-09-08 09:33:44 +02:00
Michael Eischer 914bd699be backend: always start backend process in separate process group
The process group is necessary to properly handle ctrl-c.
2025-09-06 19:51:10 +02:00