snapshot diff

Definition

Returns a difference between two snapshots.

Usage

$ ozone sh snapshot diff [-chV]  [-p=<pageSize>]
                                 [-t=<token>]
                                 <value>
                                 <fromSnapshot>
                                 <toSnapshot>
Arguments
Parameter Description

pageSize

Number of diff entries to be returned

token

Continuation token for the next page

fromSnapshot

An older snapshot of a bucket

toSnapshot

A newer snapshot of a bucket

-c, --cancel

Request to cancel a running SnapshotDiff job. If the job’s state is not IN_PROGRESS, the request will fail

value

A bucket URI. It can be a full URI (starts with o3://, e.g. o3://hostname:9862/vol1/bucket1/) or a short URI (starts with a volume name, e.g. vol1/bucket1). Any missing information is obtained from the configuration files

-h, --help

Prints out a help manual for this command

-V, --version

Prints out version information and exits

Examples

Create the first snapshot of a bucket:

$ ozone sh snapshot create vol1/bucket2 oldsnap

Add a key to that bucket:

$ ozone sh key put vol1/bucket2/key42 file.txt

Create the second snapshot of a bucket:

$ ozone sh snapshot create vol1/bucket2 newsnap

Request a diff:

$ ozone sh snapshot diff vol1/bucket1 oldsnap newsnap

The confirmation that a job has started:

Snapshot diff job is IN_PROGRESS. Please retry after 60000 ms.

In 60 seconds, repeat the previous command. The result should be as follows:

Difference between snapshot: oldsnap and snapshot: newsnap
+       ./key42
Found a mistake? Seleсt text and press Ctrl+Enter to report it