"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
s3: MEGA S4 support
Nick Craig-Wood5c81132da001
diff --git a/README.md b/README.mdindex 92684cc24..869587216 100644--- a/README.md+++ b/README.md@@ -65,7 +65,8 @@ Rclone *("rsync for cloud storage")* is a command-line program to sync files and* Magalu Object Storage [:page_facing_up:](https://rclone.org/s3/#magalu)* Mail.ru Cloud [:page_facing_up:](https://rclone.org/mailru/)* Memset Memstore [:page_facing_up:](https://rclone.org/swift/)- * Mega [:page_facing_up:](https://rclone.org/mega/)+ * MEGA [:page_facing_up:](https://rclone.org/mega/)+ * MEGA S4 Object Storage [:page_facing_up:](https://rclone.org/s3/#mega)* Memory [:page_facing_up:](https://rclone.org/memory/)* Microsoft Azure Blob Storage [:page_facing_up:](https://rclone.org/azureblob/)* Microsoft Azure Files Storage [:page_facing_up:](https://rclone.org/azurefiles/)diff --git a/backend/s3/s3.go b/backend/s3/s3.goindex 099cdd17b..3171f6ad1 100644--- a/backend/s3/s3.go+++ b/backend/s3/s3.go@@ -137,6 +137,9 @@ var providerOption = fs.Option{}, {Value: "Magalu",Help: "Magalu Object Storage",+ }, {+ Value: "Mega",+ Help: "MEGA S4 Object Storage",}, {Value: "Minio",Help: "Minio Object Storage",@@ -573,7 +576,7 @@ func init() {}, {Name: "region",Help: "Region to connect to.\n\nLeave blank if you are using an S3 clone and you don't have a region.",- Provider: "!AWS,Alibaba,ArvanCloud,ChinaMobile,Cloudflare,FlashBlade,IONOS,Petabox,Liara,Linode,Magalu,Qiniu,RackCorp,Scaleway,Selectel,Storj,Synology,TencentCOS,HuaweiOBS,IDrive",+ Provider: "!AWS,Alibaba,ArvanCloud,ChinaMobile,Cloudflare,FlashBlade,IONOS,Petabox,Liara,Linode,Magalu,Qiniu,RackCorp,Scaleway,Selectel,Storj,Synology,TencentCOS,HuaweiOBS,IDrive,Mega",Examples: []fs.OptionExample{{Value: "",Help: "Use this if unsure.\nWill use v4 signatures and an empty region.",@@ -1526,6 +1529,22 @@ func init() {Value: "s3.ir-tbz-sh1.arvanstorage.ir",Help: "ArvanCloud Tabriz Iran (Shahriar) endpoint",Provider: "ArvanCloud",+ }, {+ Value: "s3.eu-central-1.s4.mega.io",+ Help: "Mega S4 eu-central-1 (Amsterdam)",+ Provider: "Mega",+ }, {+ Value: "s3.eu-central-2.s4.mega.io",+ Help: "Mega S4 eu-central-2 (Bettembourg)",+ Provider: "Mega",+ }, {+ Value: "s3.ca-central-1.s4.mega.io",+ Help: "Mega S4 ca-central-1 (Montreal)",+ Provider: "Mega",+ }, {+ Value: "s3.ca-west-1.s4.mega.io",+ Help: "Mega S4 ca-west-1 (Vancouver)",+ Provider: "Mega",}},}, {Name: "location_constraint",@@ -1908,7 +1927,7 @@ func init() {}, {Name: "location_constraint",Help: "Location constraint - must be set to match the Region.\n\nLeave blank if not sure. Used when creating buckets only.",- Provider: "!AWS,Alibaba,ArvanCloud,HuaweiOBS,ChinaMobile,Cloudflare,FlashBlade,IBMCOS,IDrive,IONOS,Leviia,Liara,Linode,Magalu,Outscale,Qiniu,RackCorp,Scaleway,Selectel,StackPath,Storj,TencentCOS,Petabox",+ Provider: "!AWS,Alibaba,ArvanCloud,HuaweiOBS,ChinaMobile,Cloudflare,FlashBlade,IBMCOS,IDrive,IONOS,Leviia,Liara,Linode,Magalu,Outscale,Qiniu,RackCorp,Scaleway,Selectel,StackPath,Storj,TencentCOS,Petabox,Mega",}, {Name: "acl",Help: `Canned ACL used when creating buckets and storing or copying objects.@@ -1923,7 +1942,7 @@ doesn't copy the ACL from the source but rather writes a fresh one.If the acl is an empty string then no X-Amz-Acl: header is added andthe default (private) will be used.`,- Provider: "!Storj,Selectel,Synology,Cloudflare,FlashBlade",+ Provider: "!Storj,Selectel,Synology,Cloudflare,FlashBlade,Mega",Examples: []fs.OptionExample{{Value: "default",Help: "Owner gets Full_CONTROL.\nNo one else has access rights (default).",@@ -3531,6 +3550,14 @@ func setQuirks(opt *Options) {urlEncodeListings = falseuseMultipartEtag = falseuseAlreadyExists = false+ case "Mega":+ listObjectsV2 = true+ virtualHostStyle = false+ urlEncodeListings = true+ useMultipartEtag = false+ useAlreadyExists = false+ // Multipart server side copies not supported+ opt.CopyCutoff = math.MaxInt64case "Minio":virtualHostStyle = falsecase "Netease":diff --git a/docs/content/_index.md b/docs/content/_index.mdindex 344c9a931..14274120e 100644--- a/docs/content/_index.md+++ b/docs/content/_index.md@@ -150,7 +150,8 @@ WebDAV or S3, that work out of the box.){{< provider name="Magalu" home="https://magalu.cloud/object-storage/" config="/s3/#magalu" >}}{{< provider name="Mail.ru Cloud" home="https://cloud.mail.ru/" config="/mailru/" >}}{{< provider name="Memset Memstore" home="https://www.memset.com/cloud/storage/" config="/swift/" >}}-{{< provider name="Mega" home="https://mega.nz/" config="/mega/" >}}+{{< provider name="MEGA" home="https://mega.nz/" config="/mega/" >}}+{{< provider name="MEGA S4" home="https://mega.io/objectstorage" config="/s3/#mega" >}}{{< provider name="Memory" home="/memory/" config="/memory/" >}}{{< provider name="Microsoft Azure Blob Storage" home="https://azure.microsoft.com/en-us/services/storage/blobs/" config="/azureblob/" >}}{{< provider name="Microsoft Azure Files Storage" home="https://azure.microsoft.com/en-us/services/storage/files/" config="/azurefiles/" >}}diff --git a/docs/content/s3.md b/docs/content/s3.mdindex dba4350bc..48bc4c4fb 100644--- a/docs/content/s3.md+++ b/docs/content/s3.md@@ -26,6 +26,7 @@ The S3 backend can be used with a number of different providers:{{< provider name="Liara Object Storage" home="https://liara.ir/landing/object-storage" config="/s3/#liara-cloud" >}}{{< provider name="Linode Object Storage" home="https://www.linode.com/products/object-storage/" config="/s3/#linode" >}}{{< provider name="Magalu Object Storage" home="https://magalu.cloud/object-storage/" config="/s3/#magalu" >}}+{{< provider name="MEGA S4 Object Storage" home="https://mega.io/objectstorage" config="/s3/#mega" >}}{{< provider name="Minio" home="https://www.minio.io/" config="/s3/#minio" >}}{{< provider name="Outscale" home="https://en.outscale.com/storage/outscale-object-storage/" config="/s3/#outscale" >}}{{< provider name="Petabox" home="https://petabox.io/" config="/s3/#petabox" >}}@@ -5079,6 +5080,116 @@ secret_access_key = SECRET_ACCESS_KEYendpoint = br-ne1.magaluobjects.com```+### MEGA S4 {#mega}++[MEGA S4 Object Storage](https://mega.io/objectstorage) is an S3+compatible object storage system. It has a single pricing tier with no+additional charges for data transfers or API requests and it is+included in existing Pro plans.++Here is an example of making a configuration. First run:++ rclone config++This will guide you through an interactive setup process.++```+No remotes found, make a new one?+n) New remote+s) Set configuration password+q) Quit config+n/s/q> n++Enter name for new remote.+name> megas4++Option Storage.+Type of storage to configure.+Choose a number from below, or type in your own value.+[snip]+XX / Amazon S3 Compliant Storage Providers including AWS,... Mega, ...+ \ (s3)+[snip]+Storage> s3++Option provider.+Choose your S3 provider.+Choose a number from below, or type in your own value.+Press Enter to leave empty.+[snip]+XX / MEGA S4 Object Storage+ \ (Mega)+[snip]+provider> Mega++Option env_auth.+Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars).+Only applies if access_key_id and secret_access_key is blank.+Choose a number from below, or type in your own boolean value (true or false).+Press Enter for the default (false).+ 1 / Enter AWS credentials in the next step.+ \ (false)+ 2 / Get AWS credentials from the environment (env vars or IAM).+ \ (true)+env_auth>++Option access_key_id.+AWS Access Key ID.+Leave blank for anonymous access or runtime credentials.+Enter a value. Press Enter to leave empty.+access_key_id> XXX++Option secret_access_key.+AWS Secret Access Key (password).+Leave blank for anonymous access or runtime credentials.+Enter a value. Press Enter to leave empty.+secret_access_key> XXX++Option endpoint.+Endpoint for S3 API.+Required when using an S3 clone.+Choose a number from below, or type in your own value.+Press Enter to leave empty.+ 1 / Mega S4 eu-central-1 (Amsterdam)+ \ (s3.eu-central-1.s4.mega.io)+ 2 / Mega S4 eu-central-2 (Bettembourg)+ \ (s3.eu-central-2.s4.mega.io)+ 3 / Mega S4 ca-central-1 (Montreal)+ \ (s3.ca-central-1.s4.mega.io)+ 4 / Mega S4 ca-west-1 (Vancouver)+ \ (s3.ca-west-1.s4.mega.io)+endpoint> 1++Edit advanced config?+y) Yes+n) No (default)+y/n> n++Configuration complete.+Options:+- type: s3+- provider: Mega+- access_key_id: XXX+- secret_access_key: XXX+- endpoint: s3.eu-central-1.s4.mega.io+Keep this "megas4" remote?+y) Yes this is OK (default)+e) Edit this remote+d) Delete this remote+y/e/d> y+```++This will leave the config file looking like this.++```+[megas4]+type = s3+provider = Mega+access_key_id = XXX+secret_access_key = XXX+endpoint = s3.eu-central-1.s4.mega.io+```+### ArvanCloud {#arvan-cloud}[ArvanCloud](https://www.arvancloud.com/en/products/cloud-storage) ArvanCloud Object Storage goes beyond the limited traditional file storage.