in reply to File::Rsync match pattern

I guess the problem is the double quoting of the include/exclude patterns.

Anyway, you can also try using Net::OpenSSH instead of File::Rsync:

use Net::OpenSSH; my $ssh = Net::OpenSSH->new($host); $ssh->rsync_get({glob => 1, verbose => 1, times => 1}, "/var/log/mail.log*", "log/mail");

Replies are listed 'Best First'.
Re^2: File::Rsync match pattern
by rei (Novice) on Jul 21, 2011 at 07:49 UTC

    Thank you very much for the tip ! I will try it and I feedback to you

      You can also try running your script with strace (or similar) in order to see the rsync invocation done by File::Rsync.

        Ok, I've checked for Net::OpenSSH, but the lib isn't packaged for Debian/Ubuntu. So, because of care reasons, I can't use it. I will build the rsync command and run it trough an "open" function. Thanks anyway !