Hi (sorry to only answer to the list)

On Tue, 21 Aug 2018 23:03:56 -0000 just subscribed for rsync-qa from bugzilla 
via rsync wrote:

> User very much wants to know where the files _will go_ before daring to try an
> actual run.

> He tries even
> rsync -vv --dry-run --itemize-changes -avz x.y.z:dir1/dir2/backup/ backup/

> but still there is no way to make it say
> File x.y.z:dir1/dir2/backup/F1 will be copied to backup/F1
> File x.y.z:dir1/dir2/backup/F2 will be copied to backup/F2

What about that:

  with this hierarchy:

    find dir1 dir3
    dir1
    dir1/dir2
    dir1/dir2/backup
    dir1/dir2/backup/subdir
    dir1/dir2/backup/subdir/F3
    dir1/dir2/backup/F2
    dir1/dir2/backup/F1
    dir3
    dir3/backup
    dir3/backup/F4

  one may say, for two source directories:

    rsync --dry-run --out-format='%i %f -> %n%L' -a dir1/dir2/backup/ 
dir3/backup/ backup/
    cd+++++++++ dir1/dir2/backup/. -> ./
    >f+++++++++ dir1/dir2/backup/F1 -> F1
    >f+++++++++ dir1/dir2/backup/F2 -> F2
    >f+++++++++ dir3/backup/F4 -> F4
    cd+++++++++ dir1/dir2/backup/subdir -> subdir/
    >f+++++++++ dir1/dir2/backup/subdir/F3 -> subdir/F3

Ref: man rsyncd.conf: log format

 %i an itemized list of what is being updated
 %f the filename (long form on sender; no trailing "/")
 %n the filename (short form; trailing "/" on dir)

-- 
francis

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to