Rsync is a remarkably handy tool that I use virtually every day. But there is one thing about rsync that drives me totally crazy. Under the -n (dry run) flag, rsync seems to produce exactly the same output as without that flag. I cannot tell you how many times I sit and scratch my head long and hard,after I discover that my intended rsync operations did not actually happen. Until I finally remember that I ran rsync in dry-run mode. That's why! This is especially a problem for very long-running rsync jobs run in dry-run mode. It seems to me that when run in dry-run mode, rsync should display a warning at the very, very end, something like: *WARNING: None of the above operations have been actually performed, * *because you ran rsync in dry-run mode.* Or does rsync already have such a feature, and I am not aware of it? But if not, that is my vote for the next feature to be added. It should be a very, very easy fix. Todd S. Austin, Texas, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20200310/c442fe6a/attachment.htm>
If you used -v then the very last line rsync outputs is:> total size is ### speedup is ### (DRY RUN)-- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._., Kevin Korb Phone: (407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. Kevin at FutureQuest.net (work) Orlando, Florida kmk at sanitarium.net (personal) Web page: https://sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._., On Tue, 10 Mar 2020, T. Shandelman via rsync wrote:> Date: Tue, 10 Mar 2020 17:26:41 -0500 > From: T. Shandelman via rsync <rsync at lists.samba.org> > To: rsync at lists.samba.org > Subject: Question/comment about -n (dry run) flag of rsync > > Rsync is a remarkably handy tool that I use virtually every day. > > But there is one thing about rsync that drives me totally crazy. > > Under the -n (dry run) flag, rsync seems to produce exactly the same output > as without that flag. > > I cannot tell you how many times I sit and scratch my head long and > hard,after I discover that my intended rsync operations did not actually > happen. Until I finally remember that I ran rsync in dry-run mode. That's > why! This is especially a problem for very long-running rsync jobs run in > dry-run mode. > > It seems to me that when run in dry-run mode, rsync should display a > warning at the very, very end, something like: > > *WARNING: None of the above operations have been actually performed, * > *because you ran rsync in dry-run mode.* > > > Or does rsync already have such a feature, and I am not aware of it? > > But if not, that is my vote for the next feature to be added. It should be > a very, very easy fix. > > Todd S. > Austin, Texas, USA >
T. Shandelman via rsync wrote:> Rsync is a remarkably handy tool that I use virtually every day. > > But there is one thing about rsync that drives me totally crazy. > > Under the -n (dry run) flag, rsync seems to produce exactly the same output > as without that flag. > > I cannot tell you how many times I sit and scratch my head long and > hard,after I discover that my intended rsync operations did not actually > happen. Until I finally remember that I ran rsync in dry-run mode. That's > why! This is especially a problem for very long-running rsync jobs run in > dry-run mode. > > It seems to me that when run in dry-run mode, rsync should display a > warning at the very, very end, something like: > > *WARNING: None of the above operations have been actually performed, * > *because you ran rsync in dry-run mode.* > > Or does rsync already have such a feature, and I am not aware of it? > > But if not, that is my vote for the next feature to be added. It should be > a very, very easy fix. > > Todd S. > Austin, Texas, USABear in mind that it shouldn't happen by default as that could break scripts that parse rsync's output. You should need to request this behaviour in the config file somehow. cheers, raf
raf via rsync wrote:> T. Shandelman via rsync wrote: > > > Rsync is a remarkably handy tool that I use virtually every day. > > > > But there is one thing about rsync that drives me totally crazy. > > > > Under the -n (dry run) flag, rsync seems to produce exactly the same output > > as without that flag. > > > > I cannot tell you how many times I sit and scratch my head long and > > hard,after I discover that my intended rsync operations did not actually > > happen. Until I finally remember that I ran rsync in dry-run mode. That's > > why! This is especially a problem for very long-running rsync jobs run in > > dry-run mode. > > > > It seems to me that when run in dry-run mode, rsync should display a > > warning at the very, very end, something like: > > > > *WARNING: None of the above operations have been actually performed, * > > *because you ran rsync in dry-run mode.* > > > > Or does rsync already have such a feature, and I am not aware of it? > > > > But if not, that is my vote for the next feature to be added. It should be > > a very, very easy fix. > > > > Todd S. > > Austin, Texas, USA > > Bear in mind that it shouldn't happen by default as > that could break scripts that parse rsync's output. You > should need to request this behaviour in the config > file somehow.Oops. Please ignore that.