Skip to content

Commit e01ab94

Browse files
committed
S3UTILS-211: Update README with configurable replication status
1 parent 78b7881 commit e01ab94

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

README.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,48 @@ and aborts any ongoing multipart uploads to prepare the bucket for deletion.
243243
node cleanupBuckets.js testbucket1,testbucket2
244244
```
245245

246-
# List objects that failed replication
246+
# List objects by replication status
247247

248-
This script prints the list of objects that failed replication to stdout,
249-
following a comma-separated list of buckets. Run the command as
248+
This script prints the list of objects with a specific replication status to stdout,
249+
following a comma-separated list of buckets. By default, it lists objects with FAILED
250+
replication status to maintain backwards compatibility.
251+
252+
## Usage
253+
254+
```
255+
node listObjectsByReplicationStatus.js testbucket1,testbucket2
256+
```
257+
258+
Or using the legacy script name (symlink):
250259

251260
```
252-
node listFailedObjects testbucket1,testbucket2
261+
node listFailedObjects.js testbucket1,testbucket2
253262
```
254263

264+
## Optional environment variables
265+
266+
### REPLICATION_STATUS
267+
268+
Comma-separated list of replication statuses to list. The recognized statuses are:
269+
270+
* **NEW**: No replication status is attached to the object.
271+
* **PENDING**: The object replication status is PENDING.
272+
* **COMPLETED**: The object replication status is COMPLETED.
273+
* **FAILED**: The object replication status is FAILED (default).
274+
* **REPLICA**: The object replication status is REPLICA.
275+
276+
The default behavior is to list objects with FAILED replication status (equivalent to `REPLICATION_STATUS=FAILED`).
277+
278+
Examples:
279+
280+
`REPLICATION_STATUS=PENDING`
281+
282+
List objects that have a replication status of PENDING.
283+
284+
`REPLICATION_STATUS=PENDING,FAILED`
285+
286+
List objects that either have a replication status of PENDING or FAILED.
287+
255288
# Verify existence of sproxyd keys
256289

257290
This script verifies that :

0 commit comments

Comments
 (0)