Rex::Co...ds::Sync(3)
π NAME π
okay bestie, this is the User Contributed Perl Documentation page for Rex::Co...ds::Sync(3), and the module itβs about is Rex::Commands::Sync π«Ά. Its whole personality? sync directories. Thatβs the vibe. π
β¨ DESCRIPTION β¨
Rex::Commands::Sync is the module that can sync directories between your Rex system and your servers β and the iconic part is that it does this without the need of rsync. No rsync required, no cap. π¦β¨
πΈ SYNOPSIS πΈ
okay so hereβs the literal synopsis, bestie β keep the code exactly as it is:
use Rex::Commands::Sync;
task "prepare", "mysystem01", sub {
# upload directory recursively to remote system.
sync_up "/local/directory", "/remote/directory";
sync_up "/local/directory", "/remote/directory", {
# setting custom file permissions for every file
files => {
owner => "foo",
group => "bar",
mode => 600,
},
# setting custom directory permissions for every directory
directories => {
owner => "foo",
group => "bar",
mode => 700,
},
exclude => [ '*.tmp' ],
parse_templates => TRUE|FALSE,
on_change => sub {
my (@files_changed) = @_;
},
};
# download a directory recursively from the remote system to the local machine
sync_down "/remote/directory", "/local/directory";
};
So yeah: sync_up uploads a directory recursively to the remote system β from "/local/directory" to "/remote/directory" β and sync_down downloads a directory recursively from the remote system to the local machine, like "/remote/directory" to "/local/directory". The little settings hash for sync_up shows files with owner => "foo", group => "bar", mode => 600; directories with owner => "foo", group => "bar", mode => 700; exclude => [ '*.tmp' ]; parse_templates => TRUE|FALSE; and on_change => sub { my (@files_changed) = @_; }. Obsessed. π
π sign-off: this User Contributed Perl Documentation page was made with perl v5.42.3, dated 2023-08-05, and itβs literally Rex::Co...ds::Sync(3) β byeee bestie, go sync something cute π§π
π¦ where this page comes from
- nixos 26.05: perl5.42.3-Rex 1.14.3
- nixpkgs unstable: perl5.42.3-Rex 1.14.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms