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

azure domain can be overridden with env variable #4387

Merged
merged 2 commits into from Jul 7, 2023

Conversation

arjunajesh
Copy link
Contributor

@arjunajesh arjunajesh commented Jun 27, 2023

What does this PR change? What problem does it solve?

Restic backups on azure only worked for storages on the global domain core.windows.net. This meant that backups to other domains such as Azure China (core.chinacloudapi.cn') were not supported. Restic now allows overriding the global domain using the environment variable AZURE_DOMAIN'.

Was the change previously discussed in an issue or on the forum?

Closes #2468

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.

@arjunajesh arjunajesh changed the title Issue#2468 azure domain can be overridden with env variable Jun 29, 2023
Copy link
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this issue! The PR currently still needs a bit of polishing, see the comments below. The comments also explain where to add documentation. For testing it should be sufficient to manually verify that the parameter works as intended and does not change the current behavior is no other azure endpoint is specified.

internal/backend/azure/config.go Outdated Show resolved Hide resolved
internal/backend/azure/azure.go Outdated Show resolved Hide resolved
cmd/restic/cmd_backup.go Outdated Show resolved Hide resolved
changelog/unreleased/issue-2468 Show resolved Hide resolved
changelog/unreleased/issue-2468 Outdated Show resolved Hide resolved
internal/backend/azure/config.go Outdated Show resolved Hide resolved
changelog/unreleased/issue-2468 Outdated Show resolved Hide resolved
.DS_Store Outdated Show resolved Hide resolved
@arjunajesh
Copy link
Contributor Author

I have fixed everything you mentioned. Thanks for the help!

Copy link
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

I've squash the commits and added a few further tweaks.

@MichaelEischer MichaelEischer added this pull request to the merge queue Jul 7, 2023
Merged via the queue into restic:master with commit 825651a Jul 7, 2023
11 checks passed
@arjunajesh arjunajesh deleted the issue#2468 branch July 8, 2023 19:53
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.

Lack of parameter "azure domain" when use azure blob storage as a repository
2 participants