Aneesh Nireshwalia
aad1cafe97
fix linter warnings.
...
Correct method definition for unused param ctx
2023-06-07 16:13:47 -06:00
Aneesh Nireshwalia
8a74de8b67
Merge remote-tracking branch 'old-origin/master' into add-smb-backend
2023-06-07 15:19:28 -06:00
sohalt
ed5b2c2c9b
gs: support other regions than us
2023-05-26 19:54:42 +02:00
Michael Eischer
658aa4c0f7
Merge pull request #4339 from greatroar/ioctl
...
backend, termstatus: fix ioctl calls for 64-bit big-endian platforms
2023-05-26 19:34:14 +02:00
greatroar
51dc80be5b
backend: Use IoctlSetPointerInt for tcsetpgrp
...
This function casts its argument to int32 before passing it to the
system call, so that big-endian CPUs read the lower rather than the
upper 32 bits of the pid.
This also gets rid of the last import of "unsafe" in the Unix build.
I changed syscall to x/sys/unix while I was at it, to remove one more
import line. The constants and types there are aliases for their syscall
counterparts.
2023-05-25 17:31:51 +02:00
Aneesh Nireshwalia
4b02684f69
Merge remote-tracking branch 'old-origin/master' into add-smb-backend
2023-05-18 14:25:16 -06:00
Michael Eischer
16ba237d8b
azure: Fix missing rate limiting
2023-05-18 21:17:53 +02:00
Michael Eischer
22c9276719
rest: remove unused parameter
2023-05-18 21:17:53 +02:00
Michael Eischer
472bf5184f
Replace lots of unused parameters with _
...
The parameters are required by the implemented function signature or interface.
2023-05-18 21:17:53 +02:00
Michael Eischer
d1a5ec7839
Rename unused testing parameter to _
...
The parameter is an additional marker that the test helper must only be
used for tests.
2023-05-18 21:17:53 +02:00
Michael Eischer
1514593f22
Remove unused context or testing parameters
2023-05-18 21:17:53 +02:00
Michael Eischer
5e4e268bdc
Use _ as parameter name for unused Context
...
The context is required by the implemented interface.
2023-05-18 21:15:45 +02:00
Michael Eischer
2fa8b96843
Don't shadow builtins
2023-05-18 21:15:45 +02:00
Michael Eischer
319087c056
Remove redundant if ...; err != nil; return pattern
2023-05-18 21:15:45 +02:00
Michael Eischer
f9850b79b5
rest/sftp: Remove redundant fatal from error message
...
This caused restic to exit with error messages like
`Fatal: parsing repository location failed: Fatal: sftp path [...]`
`Fatal: create repository at rest:http://localhost:12345/ failed: Fatal: config file already exists`
2023-05-18 17:22:26 +02:00
Michael Eischer
d05f6211d1
lock: Do not limit backend concurrency for lock files
...
restic must be able to refresh lock files in time. However, large
uploads over slow connections can cause the lock refresh to be stuck
behind the large uploads and thus time out.
2023-05-08 19:04:46 +02:00
Michael Eischer
831f593b87
backend/sema: Add tests
2023-04-22 13:20:20 +02:00
Michael Eischer
ebba233a3a
backend/sema: rename constructor to NewBackend
2023-04-22 12:32:57 +02:00
Michael Eischer
f27750e270
backend/sema: rename type to connectionLimitedBackend
2023-04-21 22:53:09 +02:00
Michael Eischer
6042df075f
migrations: Fix S3 backend detection
2023-04-14 22:32:16 +02:00
Michael Eischer
c934c99d41
gs: replace usage of context.Background()
2023-04-14 22:32:15 +02:00
Michael Eischer
616926d2c1
gs: use IsNotExist to check error
2023-04-14 22:32:15 +02:00
Michael Eischer
05abc6d6f5
backend: deduplicate implementation of Delete() method
2023-04-14 22:32:15 +02:00
Michael Eischer
45244fdf68
backend: remove parameter validation tests
...
These parameter validations have been factored out into
SemaphoreBackend.
2023-04-14 22:32:15 +02:00
Michael Eischer
803640ba4b
backend: remove a few unnecessary debug logs
2023-04-14 22:32:15 +02:00
Michael Eischer
8e1e3844aa
backend: factor out connection limiting and parameter validation
...
The SemaphoreBackend now uniformly enforces the limit of concurrent
backend operations. In addition, it unifies the parameter validation.
The List() methods no longer uses a semaphore. Restic already never runs
multiple list operations in parallel.
By managing the semaphore in a wrapper backend, the sections that hold a
semaphore token grow slightly. However, the main bottleneck is IO, so
this shouldn't make much of a difference.
The key insight that enables the SemaphoreBackend is that all of the
complex semaphore handling in `openReader()` still happens within the
original call to `Load()`. Thus, getting and releasing the semaphore
tokens can be refactored to happen directly in `Load()`. This eliminates
the need for wrapping the reader in `openReader()` to release the token.
2023-04-14 22:32:15 +02:00
Michael Eischer
8b5ab5b59f
dryrun: fix outdated comments
2023-04-14 22:32:15 +02:00
Michael Eischer
4703473ec5
backend: extract most debug logs into logger backend
2023-04-14 22:32:15 +02:00
Michael Eischer
8bfc2519d7
backend: Deduplicate sanity checks for parameters of Load() method
...
The check is now handled by backend.DefaultLoad. This also guarantees
consistent behavior across all backends.
2023-04-14 22:32:15 +02:00
Michael Eischer
faa83db9e4
azure: Adapt code to API change
2023-04-07 15:05:55 +02:00
Aneesh Nireshwalia
4b0f27a0b8
Correct help for default smb Connections to 5
2023-02-15 14:20:47 -07:00
Aneesh Nireshwalia
2882872736
Fix SMB test setup for Mac
2023-02-08 15:10:51 -07:00
Aneesh Nireshwalia
c9dba2cdd7
Use connection pointer directly in putConnection
...
Setting *pc back to nil is too easily defeated to be useful.
This is more concise and prevents pointer from getting heap-allocated.
2023-02-05 07:41:58 -07:00
Aneesh Nireshwalia
a3e9be1656
Increase default max SMB connections to 5
2023-02-04 23:01:01 -07:00
Aneesh Nireshwalia
aab8a5f36f
Move copyright notice below imports
2023-01-31 17:48:36 -07:00
Aneesh Nireshwalia
59ecedacaf
Fix review comments for temp file creation
...
Add rclone copyright notice for smb files.
Change temp file creation code to match sftp code.
Remove fastrand dependency.
2023-01-31 17:35:18 -07:00
Aneesh Nireshwalia
3f1673d6aa
Fix lint issues
2023-01-30 21:03:27 -07:00
Aneesh Nireshwalia
5ff9f58fbb
Add document and cleanup config
...
Add documentation for configuring smb repository.
Clean up configuration for smb. Renamed address to host.
Add option to configure user in smb repo url as well.
Options take highest precendence.
2023-01-30 19:45:37 -07:00
Aneesh Nireshwalia
46c3dc618a
Add unrelease issue and cleanup configs
...
Removed extra environment variables
2023-01-30 16:46:52 -07:00
Aneesh N
375a9b7940
Add smb changes ( #6 )
...
* backend/smb: Add SMB backend and testcases
Add new SMB storage backend for restic.
Added test cases for testing SMB backend.
---------
Co-authored-by: Aneesh Nireshwalia <aneeshynot@gmail.com>
Co-authored-by: Srigovind Nayak <sgovind.dev@outlook.com>
2023-01-30 15:42:07 -07:00
Michael Eischer
90fb6f70b4
Merge pull request #4089 from greatroar/errors
...
Clean up error handling further
2022-12-24 10:41:56 +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
Xun Jiang
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
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
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
Endre Karlson
7dd33c0ecc
azure: Make create not error out when ContainerNotFound
2022-12-11 22:57:23 +01:00
Michael Eischer
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
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
Endre Karlson
25648e2501
azure: Switch to azblob sdk
2022-12-07 21:46:07 +01:00