syncr: syncr

Description Usage Arguments Details

Description

Wrapper around rsync, with only a few options exposed. WARNING: This command modifies files on your computer and therefore is potentially dangerous. Files in dest may be overwritten or deleted!

Usage

1
2
3
syncr(src, dest, archive = TRUE, compress = TRUE, verbose = FALSE,
  relative = FALSE, delete = FALSE, dry_run = FALSE,
  drop_src_directory = FALSE, inplace = NULL, args_only = FALSE)

Arguments

src

Source files to copy. See details

dest

A single destination path, possibly remote.

archive

Copy in archive mode, being recursive, preserving attributes etc? Generally this is wanted.

compress

Compress files on transfer?

verbose

Be verbose? (Always TRUE when using dry_run).

relative

Copy relative paths only, rather than the last part of the file name. So if you have a directory src and you want to syncronise all the .c files in it, you could use src="src/*.c", relative=TRUE. You can include a dot at any point in a path name to indicate where the relative directory should start from; e.g. /absolute/path/to/./src/*.c which will create a directory src with .c files in it.

delete

Delete files on the remote machine. When mirroring this is generally what you want to do but it is not enabled by default because it's potentially dangerous.

dry_run

Don't actually do anything, but print what would be done instead.

drop_src_directory

In the case where src is a single directory, don't copy the directory, but copy the contents.

inplace

Copy files in place. This helps when copying to windows network shares where the unix emulation layer and windows don't get on very well. The downside is that if the copy fails it leaves files in an inconsistent state. By default, it will be used on windows and when the destination is an absolute path.

args_only

Don't run anything and instead return the arguments that would have been passed to rsync.

Details

This is a simple wrapper around a few of the most common arguments to rsync. For a more complete interface, see rsync.


mrc-ide/syncr documentation built on May 15, 2019, 1:43 p.m.