Search code examples
mirroringlftp

LFTP Mirror - list with "mirrored" files


I'm using LFTP to mirror files from an FTP server to a local directory in Windows.

My question is how can I log which files were actually mirrored. I can get some output by doing something like this:

lftp -e 'mirror --only-newer /FtpFolder/ /MyFolder;quit' ftp://127.0.0.1 >> /logFile.log

However when I check my log file after running this code it gives me something like this:

Total: 1 directory, 2 files, 0 symlinks
New: 2 files, 0 symlinks
6466 bytes transferred
To be removed: 1 directory, 0 files, 0 symlinks

What I was expecting was something more complete such as:

Total: 1 directory, 2 files, 0 symlinks
New: 2 files, 0 symlinks
6466 bytes transferred
To be removed: 1 directory, 0 files, 0 symlinks
File1_20141209.txt
File2_20141209.txt

This would allow me to know which were the mirrored files (this is important information to me). Is there any configuration or command that allows us to get more information from lftp to perform this?

Thank you.


Solution

  • Nevermind, found out that adding the --verbose in the command solved my issue.

    Now lftp output looks like:

    Total: 1 directory, 2 files, 0 symlinks
    New: 2 files, 0 symlinks
    6466 bytes transferred
    To be removed: 1 directory, 0 files, 0 symlinks
    Transferring file 'File1_20141209.txt'
    Transferring file 'File2_20141209.txt'