From b5972f184ce0774d56749ad804427276e00d84f7 Mon Sep 17 00:00:00 2001
From: Wouter van Os <wouter0100@gmail.com>
Date: Sat, 23 Jan 2021 16:54:08 +0100
Subject: [PATCH 1/3] doc: Note only path-style URL support for S3

This adds a node to mention that currently only path-style URL's are supported for S3, as per code at:
- https://github.com/restic/restic/blob/aa0faa8c7d7800b6ba7b11164fa2d3683f7f78aa/internal/backend/s3/config.go#L42-L45
- https://github.com/restic/restic/blob/aa0faa8c7d7800b6ba7b11164fa2d3683f7f78aa/internal/backend/s3/config.go#L48-L62
---
 doc/030_preparing_a_new_repo.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/030_preparing_a_new_repo.rst b/doc/030_preparing_a_new_repo.rst
index abe4a37de..49f8a3e25 100644
--- a/doc/030_preparing_a_new_repo.rst
+++ b/doc/030_preparing_a_new_repo.rst
@@ -239,6 +239,10 @@ For an S3-compatible server that is not Amazon (like Minio, see below),
 or is only available via HTTP, you can specify the URL to the server
 like this: ``s3:http://server:port/bucket_name``.
 
+.. note:: Currently, restic only supports defining the `path-style URLs <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro>`__.           Virtual-hosted–style URLs, where the bucket name is in the 
+          hostname itself (like ``bucket_name.s3.us-west-2.amazonaws.com``), 
+          is not supported. It should be written in the path-style URL instead, 
+          for example ``s3.us-west-2.amazonaws.com/bucket_name``.
 
 .. note:: Certain S3-compatible servers do not properly implement the
           ``ListObjectsV2`` API, most notably Ceph versions before v14.2.5. On these

From 8442c43209508131613339082861ef70ff2690f7 Mon Sep 17 00:00:00 2001
From: Wouter van Os <wouter0100@gmail.com>
Date: Sun, 31 Jan 2021 15:10:03 +0100
Subject: [PATCH 2/3] doc: Update wording for S3 path-only requirement

---
 doc/030_preparing_a_new_repo.rst | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/doc/030_preparing_a_new_repo.rst b/doc/030_preparing_a_new_repo.rst
index 49f8a3e25..a2762e04e 100644
--- a/doc/030_preparing_a_new_repo.rst
+++ b/doc/030_preparing_a_new_repo.rst
@@ -238,11 +238,12 @@ after the bucket name like this:
 For an S3-compatible server that is not Amazon (like Minio, see below),
 or is only available via HTTP, you can specify the URL to the server
 like this: ``s3:http://server:port/bucket_name``.
-
-.. note:: Currently, restic only supports defining the `path-style URLs <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro>`__.           Virtual-hosted–style URLs, where the bucket name is in the 
-          hostname itself (like ``bucket_name.s3.us-west-2.amazonaws.com``), 
-          is not supported. It should be written in the path-style URL instead, 
-          for example ``s3.us-west-2.amazonaws.com/bucket_name``.
+          
+.. note:: restic expects `path-style URLs <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro>`__
+          like for example ````s3.us-west-2.amazonaws.com/bucket_name``.
+          Virtual-hosted–style URLs like ``bucket_name.s3.us-west-2.amazonaws.com``,
+          where the bucket name is part of the hostname are not supported. These must
+          be converted to path-style URLs instead, for example ``s3.us-west-2.amazonaws.com/bucket_name``.
 
 .. note:: Certain S3-compatible servers do not properly implement the
           ``ListObjectsV2`` API, most notably Ceph versions before v14.2.5. On these

From 0aed8d47d718a86a1b19349e24fff3ae6a623396 Mon Sep 17 00:00:00 2001
From: Michael Eischer <michael.eischer@fau.de>
Date: Sun, 31 Jan 2021 18:33:15 +0100
Subject: [PATCH 3/3] docs: Fix typo in S3 URL support

---
 doc/030_preparing_a_new_repo.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/030_preparing_a_new_repo.rst b/doc/030_preparing_a_new_repo.rst
index a2762e04e..43e409d28 100644
--- a/doc/030_preparing_a_new_repo.rst
+++ b/doc/030_preparing_a_new_repo.rst
@@ -240,7 +240,7 @@ or is only available via HTTP, you can specify the URL to the server
 like this: ``s3:http://server:port/bucket_name``.
           
 .. note:: restic expects `path-style URLs <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro>`__
-          like for example ````s3.us-west-2.amazonaws.com/bucket_name``.
+          like for example ``s3.us-west-2.amazonaws.com/bucket_name``.
           Virtual-hosted–style URLs like ``bucket_name.s3.us-west-2.amazonaws.com``,
           where the bucket name is part of the hostname are not supported. These must
           be converted to path-style URLs instead, for example ``s3.us-west-2.amazonaws.com/bucket_name``.