From 1a504e6e64077ce23a473e8b8f5b56e1b807fa48 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Sinha Date: Thu, 14 Apr 2022 19:19:57 +0530 Subject: [PATCH] Replace fake with dry-run (#4050) --- cmd/mirror-main.go | 10 ++++++++-- docs/minio-client-complete-guide.md | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cmd/mirror-main.go b/cmd/mirror-main.go index df3f5319..9887e73f 100644 --- a/cmd/mirror-main.go +++ b/cmd/mirror-main.go @@ -55,7 +55,12 @@ var ( Usage: "overwrite object(s) on target if it differs from source", }, cli.BoolFlag{ - Name: "fake", + Name: "fake", + Usage: "perform a fake mirror operation", + Hidden: true, // deprecated 2022 + }, + cli.BoolFlag{ + Name: "dry-run", Usage: "perform a fake mirror operation", }, cli.BoolFlag{ @@ -870,9 +875,10 @@ func runMirror(ctx context.Context, cancelMirror context.CancelFunc, srcURL, dst // preserve is also expected to be overwritten if necessary isMetadata := cli.Bool("a") || isWatch || len(userMetadata) > 0 isOverwrite = isOverwrite || isMetadata + isFake := cli.Bool("fake") || cli.Bool("dry-run") mopts := mirrorOptions{ - isFake: cli.Bool("fake"), + isFake: isFake, isRemove: isRemove, isOverwrite: isOverwrite, isWatch: isWatch, diff --git a/docs/minio-client-complete-guide.md b/docs/minio-client-complete-guide.md index c8beab42..1d5d6a79 100644 --- a/docs/minio-client-complete-guide.md +++ b/docs/minio-client-complete-guide.md @@ -1012,7 +1012,7 @@ FLAGS: --force allow a recursive remove operation --dangerous allow site-wide removal of objects --incomplete, -I remove incomplete uploads - --fake perform a fake remove operation + --dry-run perform a fake remove operation --stdin read object names from STDIN --older-than value remove objects older than L days, M hours and N minutes --newer-than value remove objects newer than L days, M hours and N minutes @@ -1172,7 +1172,7 @@ USAGE: FLAGS: --overwrite overwrite object(s) on target if it differs from source - --fake perform a fake mirror operation + --dry-run perform a fake mirror operation --watch, -w watch and synchronize changes --remove remove extraneous object(s) on target --region value specify region when creating new bucket(s) on target (default: "us-east-1")