Skip to content
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

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open

Add smb backend #4186

wants to merge 35 commits into from

Conversation

aneesh-n
Copy link
Contributor

@aneesh-n aneesh-n commented Jan 31, 2023

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

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

aneesh-n and others added 5 commits January 30, 2023 15:42
* 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.
@aneesh-n
Copy link
Contributor Author

aneesh-n commented Jan 31, 2023

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.
SMB test setup complete for Linux, Windows and Mac.

Fix the check for macOS which was failing after commenting brew install.
@greatroar
Copy link
Contributor

Parts of this code have been copied from rclone. That means the rclone license should appear somewhere in it:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

@aneesh-n aneesh-n mentioned this pull request Feb 3, 2023
prajwaltr93

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage backend: SMB
3 participants