Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions hadoop-hdds/docs/content/feature/Snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,32 @@ Manage snapshots using `ozone sh` or `ozone fs` (Hadoop-compatible) commands:
Output prefixes: `+` (add), `-` (delete), `M` (modify), `R` (rename). Use `-p`, `-t` for pagination.
Manage diff jobs: `ozone sh snapshot listDiff /vol1/bucket1`, `ozone sh snapshot cancelDiff <jobId>`.

* **List Snapshot Diff Jobs:** Lists snapshot diff jobs for a bucket.
```shell
ozone sh snapshot listDiff /vol1/bucket1
```
By default, lists jobs with `in_progress` status. Use `--job-status` to filter by specific status:
```shell
# List jobs with specific status (queued, in_progress, done, failed, rejected)
ozone sh snapshot listDiff /vol1/bucket1 --job-status done
```
Use `--all-status` to list all jobs regardless of status:
```shell
# List all snapshot diff jobs regardless of status
ozone sh snapshot listDiff /vol1/bucket1 --all-status
```
**Note:** The difference between `--all-status` and `-all` (or `-a`):
* `--all-status`: Controls which jobs to show based on status (lists all jobs regardless of status)
* `-all` (or `-a`): Controls the number of results returned (pagination option, removes pagination limit, **not related to snapdiff job status**)
Comment thread
rich7420 marked this conversation as resolved.
Outdated

For example:
```shell
# List all jobs regardless of status, with pagination limit removed
ozone sh snapshot listDiff /vol1/bucket1 --all-status -all
# Or limit results to 10 items
ozone sh snapshot listDiff /vol1/bucket1 --all-status -l 10

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fine to not mention it since it's too detailed. The pagination limit default is also applicable to other commands so mentioning it here isn't appropriate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jojochuang thanks for the feedback!

```

* **Rename Snapshot:**
```shell
ozone sh snapshot rename /vol1/bucket1 <oldName> <newName>
Expand Down