Repository: rclone/rclone (language: go)

Issue:
`rclone backend restore` - documentation regression
<!--

We understand you are having a problem with rclone; we want to help you with that!

**STOP and READ**
**YOUR POST WILL BE REMOVED IF IT IS LOW QUALITY**:
Please show the effort you've put into solving the problem and please be specific.
People are volunteering their time to help! Low effort posts are not likely to get good answers!

If you think you might have found a bug, try to replicate it with the latest beta (or stable).
The update instructions are available at https://rclone.org/commands/rclone_selfupdate/

If you can still replicate it or just got a question then please use the rclone forum:

    https://forum.rclone.org/

for a quick response instead of filing an issue on this repo.

If nothing else helps, then please fill in the info below which helps us help you.

**DO NOT REDACT** any information except passwords/keys/personal info.

You should use 3 backticks to begin and end your paste to make it readable.

Make sure to include a log obtained with '-vv'.

You can also use '-vv --log-file bug.log' and a service such as https://pastebin.com or https://gist.github.com/

Thank you

The Rclone Developers

-->

#### The associated forum post URL from `https://forum.rclone.org`

https://forum.rclone.org/t/cant-restore-files-from-aws-glacier-deep-only-directories/39258/10

#### What is the problem you are having with rclone?

The [rclone documentation](https://rclone.org/s3/#restore) lost the fix in #7077 [at some point](https://github.com/rclone/rclone/commit/e90537b2e93d194848560b83e2c5164641a02595#diff-22ce4ba99f00925bc5402c273e57cb2e66a43b5c659392ff21cc1b85b713fed6R3149).
The underlying issue is still the same, so the fix PR just needs reapplying.

#### What is your rclone version (output from `rclone version`)

```
rclone v1.69.1
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-1071-raspi (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.24.0
- go/linking: static
- go/tags: none
```

#### Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

linux, 64 bit

#### Which cloud storage system are you using? (e.g. Google Drive)

AWS S3

#### The command you were trying to run (e.g. `rclone copy /tmp remote:tmp`)

rclone backend restore awss3:bucket/path/object

#### A log from the command with the `-vv` flag (e.g. output from `rclone -vv copy /tmp remote:tmp`)

2025/03/09 01:25:01 DEBUG : rclone: Version "v1.69.1" starting with parameters ["rclone" "-vv" "backend" "restore" "awss3:bucket/path/object"]
2025/03/09 01:25:01 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2025/03/09 01:25:01 DEBUG : 5 go routines active
2025/03/09 01:25:01 NOTICE: Failed to backend: is a file not a directory

<!--- Please keep the note below for others who read your bug report. -->

#### How to use GitHub

* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are affected by the same issue.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.



Discussion / hints:
Indeed somebody edited it out by mistake. Feel free to submit docs correction PR.

Maintaining up to date documentation is never ending task and is impossible without community watchful eyes and contributions.
Well spotted @Anthchirp 

I see the problem. The edits were made to an auto generated part of s3.md - they should have been made in backend/s3/s3.go which is the source.

We should probably make a linter for this.

That is my bad for not spotting that in the review.

Do you want to send a PR with the change applied to s3.go?

Fix patch:
diff --git a/backend/s3/s3.go b/backend/s3/s3.go
index 89faffcc263a7..d9a6ab026970b 100644
--- a/backend/s3/s3.go
+++ b/backend/s3/s3.go
@@ -5061,7 +5061,7 @@ or from INTELLIGENT-TIERING Archive Access / Deep Archive Access tier to the Fre
 
 Usage Examples:
 
-    rclone backend restore s3:bucket/path/to/object -o priority=PRIORITY -o lifetime=DAYS
+    rclone backend restore s3:bucket/path/to/ --include /object -o priority=PRIORITY -o lifetime=DAYS
     rclone backend restore s3:bucket/path/to/directory -o priority=PRIORITY -o lifetime=DAYS
     rclone backend restore s3:bucket -o priority=PRIORITY -o lifetime=DAYS
     rclone backend restore s3:bucket/path/to/directory -o priority=PRIORITY
diff --git a/docs/content/s3.md b/docs/content/s3.md
index 77a571f032536..b21e46930bfdf 100644
--- a/docs/content/s3.md
+++ b/docs/content/s3.md
@@ -771,7 +771,8 @@ tries to access data from the glacier storage class you will see an error like b
     2017/09/11 19:07:43 Failed to sync: failed to open source object: Object in GLACIER, restore first: path/to/file
 
 In this case you need to [restore](http://docs.aws.amazon.com/AmazonS3/latest/user-guide/restore-archived-objects.html)
-the object(s) in question before using rclone.
+the object(s) in question before accessing object contents.
+The [restore](#restore) section below shows how to do this with rclone.
 
 Note that rclone only speaks the S3 API it does not speak the Glacier
 Vault API, so rclone cannot directly access Glacier Vaults.


Test patch: