-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add smb backend #4186
base: master
Are you sure you want to change the base?
Add smb backend #4186
Conversation
* 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>
Removed extra environment variables
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.
I have hard coded the SMB credentials as it runs a local test by installing Samba for Linux, configures SmbShare for Windows and configures smb file 'sharing' for Mac. |
Fix the check for macOS which was failing after commenting brew install.
Parts of this code have been copied from rclone. That means the rclone license should appear somewhere in it:
|
Add rclone copyright notice for smb files. Change temp file creation code to match sftp code. Remove fastrand dependency.
Setting *pc back to nil is too easily defeated to be useful. This is more concise and prevents pointer from getting heap-allocated.
Corrected the variable name for smbuser
Correct method definition for unused param ctx
What does this PR change? What problem does it solve?
Adds SMB as a new storage backend in restic. Currently for backing up to SMB, it has to be mounted on the OS or rclone needs to be used. With this change it will be possible to specify SMB details and restic will directly make SMB connections to do the backups.
Was the change previously discussed in an issue or on the forum?
Closes #4185
Checklist
changelog/unreleased/
that describes the changes for our users (see template).gofmt
on the code in all commits.