NAME
Rex::Commands::Rsync - Simple Rsync Frontend
DESCRIPTION
With this module you can sync 2 directories via the rsync command.
DEPENDENCIES
- Expect
SYNOPSIS
use Rex::Commands::Rsync;
sync "dir1", "dir2";
EXPORTED FUNCTIONS
- sync($source, $dest, $opts)
-
This function executes rsync to sync $source and $dest.
- UPLOAD - sync remote directory /var/www/html on server01 with the local directory html.
-
task "sync", "server01", sub { sync "html/*", "/var/www/html", { exclude => "*.sw*", }; };
- DOWNLOAD - sync local directory html with the remote directory /var/www/html from server01.
-
task "sync", "server01", sub { sync "html/*", "/var/www/html", { download => 1 }; };