"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
Make the --dry-run warnings into logs so they appear without the -v flag
Nick Craig-Wood5c37b777fc09
diff --git a/docs/content/docs.md b/docs/content/docs.mdindex d53c7ca2d..041aeb4ea 100644--- a/docs/content/docs.md+++ b/docs/content/docs.md@@ -63,8 +63,7 @@ modification time or MD5SUM. Destination is updated to matchsource, including deleting files if necessary.**Important**: Since this can cause data loss, test first with the-`--dry-run` and `-v` flags to see exactly what would be copied and-deleted.+`--dry-run` flag to see exactly what would be copied and deleted.Note that files in the destination won't be deleted if there were anyerrors at any point.@@ -227,9 +226,9 @@ connection to go through to a remote object storage system. It is### -n, --dry-run ###-Do a trial run with no permanent changes. Use this in combination-with the `-v` flag to see what rclone would do without actually doing-it. Useful when setting up the `sync` command.+Do a trial run with no permanent changes. Use this to see what rclone+would do without actually doing it. Useful when setting up the `sync`+command which deletes files in the destination.### --ignore-existing ###diff --git a/fs/operations.go b/fs/operations.goindex d6e4679d9..c072a103d 100644--- a/fs/operations.go+++ b/fs/operations.go@@ -334,7 +334,7 @@ func PairCopier(in ObjectPairChan, fdst Fs, wg *sync.WaitGroup) {src := pair.srcStats.Transferring(src)if Config.DryRun {- Debug(src, "Not copying as --dry-run")+ Log(src, "Not copying as --dry-run")} else {Copy(fdst, pair.dst, src)}@@ -353,7 +353,7 @@ func PairMover(in ObjectPairChan, fdst Fs, wg *sync.WaitGroup) {dst := pair.dstStats.Transferring(src)if Config.DryRun {- Debug(src, "Not moving as --dry-run")+ Log(src, "Not moving as --dry-run")} else if haveMover {// Delete destination if it existsif pair.dst != nil {@@ -386,7 +386,7 @@ func DeleteFiles(toBeDeleted ObjectsChan) {defer wg.Done()for dst := range toBeDeleted {if Config.DryRun {- Debug(dst, "Not deleting as --dry-run")+ Log(dst, "Not deleting as --dry-run")} else {Stats.Checking(dst)err := dst.Remove()@@ -872,7 +872,7 @@ func Purge(f Fs) error {if purger, ok := f.(Purger); ok {doFallbackPurge = falseif Config.DryRun {- Debug(f, "Not purging as --dry-run set")+ Log(f, "Not purging as --dry-run set")} else {err = purger.Purge()if err == ErrorCantPurge {