Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

azureblob: allow remote emulator (azurite) - fixes #6290

Lorenzo Maiorfib5efffee9d53
diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go
index a852bac56..5597ed21f 100644
--- a/backend/azureblob/azureblob.go
+++ b/backend/azureblob/azureblob.go
@@ -600,7 +600,11 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
if err != nil {
return nil, fmt.Errorf("failed to parse credentials: %w", err)
}
- u, err = url.Parse(emulatorBlobEndpoint)
+ var actualEmulatorEndpoint = emulatorBlobEndpoint
+ if opt.Endpoint != "" {
+ actualEmulatorEndpoint = opt.Endpoint
+ }
+ u, err = url.Parse(actualEmulatorEndpoint)
if err != nil {
return nil, fmt.Errorf("failed to make azure storage url from account and endpoint: %w", err)
}
diff --git a/docs/content/azureblob.md b/docs/content/azureblob.md
index a8151912b..fa2205ae5 100644
--- a/docs/content/azureblob.md
+++ b/docs/content/azureblob.md
@@ -526,7 +526,8 @@ See [List of backends that do not support rclone about](https://rclone.org/overv
## Azure Storage Emulator Support
-You can test rclone with storage emulator locally, to do this make sure azure storage emulator
-installed locally and set up a new remote with `rclone config` follow instructions described in
-introduction, set `use_emulator` config as `true`, you do not need to provide default account name
-or key if using emulator.
+You can run rclone with storage emulator (usually _azurite_).
+
+To do this, just set up a new remote with `rclone config` following instructions described in introduction and set `use_emulator` config as `true`. You do not need to provide default account name neither an account key.
+
+Also, if you want to access a storage emulator instance running on a different machine, you can override _Endpoint_ parameter in advanced settings, setting it to `http(s)://<host>:<port>/devstoreaccount1` (e.g. `http://10.254.2.5:10000/devstoreaccount1`).