Bug 11189 - dry run gives incomplete log
dry run gives incomplete log
Status: RESOLVED WONTFIX
Product: rsync
Classification: Unclassified
Component: core
3.0.9
x64 Linux
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-01 20:32 UTC by Jerome
Modified: 2015-04-01 21:31 UTC (History)
0 users

See Also:


Attachments
a simple script and the files it produces (5.05 KB, application/zip)
2015-04-01 20:32 UTC, Jerome
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome 2015-04-01 20:32:15 UTC
Created attachment 10930 [details]
a simple script and the files it produces

The log file created during a dry run doesn't list all the operations that an actual run will perform.

Dry run logs this :
2015/04/01 22:12:53 [3944] building file list
2015/04/01 22:12:53 [3944] cd+++++++++ subDirCreate/
2015/04/01 22:12:53 [3944] sent 200 bytes  received 26 bytes  452.00 bytes/sec
2015/04/01 22:12:53 [3944] total size is 95  speedup is 0.42 (DRY RUN)

While actual run does and logs this :
2015/04/01 22:12:53 [3947] building file list
2015/04/01 22:12:53 [3947] *deleting   subDirDelete/needsdelete2.txt
2015/04/01 22:12:53 [3947] *deleting   subDirDelete/
2015/04/01 22:12:53 [3947] cd+++++++++ subDirCreate/
2015/04/01 22:12:53 [3947] >f+++++++++ subDirCreate/needscreate2.txt
2015/04/01 22:12:53 [3947] *deleting   subDirUpdate/needsdelete1.txt
2015/04/01 22:12:53 [3947] >f+++++++++ subDirUpdate/needscreate1.txt
2015/04/01 22:12:53 [3947] >f.s....... subDirUpdate/needsupdate.txt
2015/04/01 22:12:53 [3947] sent 387 bytes  received 74 bytes  922.00 bytes/sec
2015/04/01 22:12:53 [3947] total size is 95  speedup is 0.21

The example is attached.
Comment 1 Kevin Korb 2015-04-01 20:48:20 UTC
I believe the bug here is that it logged any changes during the dry run.  The logfile is supposed to be a log of what it actually did not what it would do.

The log-file setting was really made for rsyncd and there is no reason for it to log what it only pretended to do only what it actually did.

BTW, the logfile will contain an entry for metadata changes like permissions too.
Comment 2 Jerome 2015-04-01 21:31:24 UTC
Ok, so to check the impact of --delete, one has to use --verbose and --dry-run, and look at stdout