Skip to content

Rsyncing

Usage

$ skpr rsync ./.skpr ./.skpr2
sending incremental file list
created directory ./example/drupal/.skpr2

             44 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=18/20) .skpr/defaults.yml
             81 100%   79.10kB/s    0:00:00 (xfr#2, to-chk=17/20) .skpr/dev.yml
              0 100%    0.00kB/s    0:00:00 (xfr#3, to-chk=16/20) .skpr/prod.yml
             16 100%   15.62kB/s    0:00:00 (xfr#4, to-chk=15/20) .skpr/stg.yml
              0 100%    0.00kB/s    0:00:00 (xfr#5, to-chk=14/20) .skpr/package/
                                                                  .skpr/package/cli/
                                                                  .skpr/package/cli/Dockerfile
            334 100%  326.17kB/s    0:00:00 (xfr#6, to-chk=7/20)  .skpr/package/common/
                                                                  .skpr/package/common/opendistro.pem
          1,338 100%    1.28MB/s    0:00:00 (xfr#7, to-chk=6/20)  .skpr/package/compile/
                                                                  .skpr/package/compile/Dockerfile
            380 100%  371.09kB/s    0:00:00 (xfr#8, to-chk=5/20)  .skpr/package/compile/composer.json
          1,697 100%    1.62MB/s    0:00:00 (xfr#9, to-chk=4/20)  .skpr/package/compile/services.yml
          6,004 100%    5.73MB/s    0:00:00 (xfr#10, to-chk=3/20) .skpr/package/compile/settings.php
          2,023 100%    1.93MB/s    0:00:00 (xfr#11, to-chk=2/20) .skpr/package/fpm/
                                                                  .skpr/package/fpm/Dockerfile
            334 100%  326.17kB/s    0:00:00 (xfr#12, to-chk=1/20) .skpr/package/nginx/
                                                                  .skpr/package/nginx/Dockerfile
            126 100%  123.05kB/s    0:00:00 (xfr#13, to-chk=0/20)

sent 6,180 bytes  received 345 bytes  13,050.00 bytes/sec
total size is 12,377  speedup is 1.90

Examples

Syncing a given file/folder from a given environment to localhost

# usage: skpr rsync <ENV_SOURCE>:/path/to/file ./path/to/file
$ skpr rsync dev:/mnt/private/ app/sites/default/private/

Syncing a given file/folder from a given environment to a path on a given environment

# usage: skpr rsync <ENV_SOURCE>:/path/to/file <ENV_DESTINATION>:/path/to/file
$ skpr rsync dev:/mnt/private/ stg:/mnt/private/

Syncing a given file/folder from localhost to a path on a given environment

# usage: skpr rsync ./path/to/file <ENV_DESTINATION>:/path/to/file
$ skpr rsync app/sites/default/private/ dev:/mnt/private/

Syncing a given file/folder from localhost to another path on a localhost

# usage: skpr rsync ./path/to/file <ENV_DESTINATION>:/path/to/file
$ skpr rsync app/sites/default/private/ app/sites/default/public/

More Information

$ skpr rsync --help
usage: skpr rsync <source> <destination>

Rsync files between local and remote environments.

Flags:
  --help  Show context-sensitive help (also try --help-long and --help-man).

Args:
  <source>       File/directory source location.
  <destination>  File/directory destination.

What's next?

After performing a file sync, consider one of the following: