Rex::Commands::Rsync - Simple Rsync Frontend
With this module you can sync 2 directories via the rsync command.
Version <= 1.0: All these functions will not be reported.
All these functions are not idempotent.
use Rex::Commands::Rsync; sync "dir1", "dir2";
This function executes rsync to sync $source and $dest.
task "sync", "server01", sub { sync "html/*", "/var/www/html", { exclude => "*.sw*", parameters => '--backup --delete', }; }; task "sync", "server01", sub { sync "html/*", "/var/www/html", { exclude => ["*.sw*", "*.tmp"], parameters => '--backup --delete', }; };
task "sync", "server01", sub { sync "/var/www/html/*", "html/", { download => 1, parameters => '--backup', }; };
To install Rex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rex
CPAN shell
perl -MCPAN -e shell install Rex
For more information on module installation, please visit the detailed CPAN module installation guide.