1Rex::Commands::Sync(3)User Contributed Perl DocumentationRex::Commands::Sync(3)
2
3
4

NAME

6       Rex::Commands::Sync - Sync directories
7

DESCRIPTION

9       This module can sync directories between your Rex system and your
10       servers without the need of rsync.
11

SYNOPSIS

13        use Rex::Commands::Sync;
14
15        task "prepare", "mysystem01", sub {
16          # upload directory recursively to remote system.
17          sync_up "/local/directory", "/remote/directory";
18
19          sync_up "/local/directory", "/remote/directory", {
20            # setting custom file permissions for every file
21            files => {
22              owner => "foo",
23              group => "bar",
24              mode  => 600,
25            },
26            # setting custom directory permissions for every directory
27            directories => {
28              owner => "foo",
29              group => "bar",
30              mode  => 700,
31            },
32            exclude => [ '*.tmp' ],
33            parse_templates => TRUE|FALSE,
34            on_change => sub {
35             my (@files_changed) = @_;
36            },
37          };
38
39          # download a directory recursively from the remote system to the local machine
40          sync_down "/remote/directory", "/local/directory";
41        };
42
43
44
45perl v5.32.1                      2021-03-06            Rex::Commands::Sync(3)
Impressum