push: Push local files to a remote server

Description Usage Arguments Details See Also Examples

View source: R/prp.R

Description

push makes a remote copy of a new or updated local file(s)

Usage

1
push(path, remoteName, fileName = "", verbose = FALSE, path2)

Arguments

path

Character string for path to be pushed, or path containing file to be pushed. If path2 is specified, path refers only to local source path.

remoteName

Character string for remote server;

fileName

Character string of file within path to be pushed. If "", all files in path are pushed

verbose

logical. print extra output.

path2

remote destination path; if blank, path2 is the remote equivalent of path

Details

Works via ssh and rsync. Can push all files in a folder, or a specific file in the specified path. The only files that are altered remotely are those that a newer locally (or only present locally). Will not delete a remote file if it isn't already present locally, and will not overwrite a remote file if the local version is older (or absent). Does not change local files. Assumes local and remote file paths are identical unless path2 is specified.

See Also

pull for the opposite process, run to run script remotely, and prp to push run pull. See rbLib-package for overview.

Examples

1
2
3
4
5
6
7
## Not run: 
path <- "./Documents/School&Work/NCEAS_UnderIce/core/scripts/analysis/"
scriptName <- "reset.sim.R"
remoteName <- "ryanb@amphiprion.deenr.rutgers.edu"
(push(path, remoteName, fileName=scriptName))

## End(Not run)

rBatt/rbLib documentation built on May 26, 2019, 7:45 p.m.