Giter Site home page Giter Site logo

rsynchost's Introduction

rsynchost

rsync front end - sync to/from a remote host via ssh

rsyncfrom - rsync from a remote host to a local directory
rsyncto - rsync from a local directory to a remote host

Examples:

Pull a directory tree from a remote host in verbose mode to a local directory of the same path:

rsyncfrom -v host.example.org /usr/local/src/bin/name

Push a local copy of a directory tree onto the same path on a remote host:

rsyncto -v /usr/local/src/bin/curds host.example.org

IMPORTANT:

Because you can do a lot of damage by syncing the wrong thing to/from the wrong host,
we STRONGLY RECOMMEND that you ALWAYS try the command with -n -v options first!

The use of -n -v will:

  • print the effective commands that will be used
  • make a connection to the remote host
  • go through the syncing motions without changing anything
  • print some syncing stats

For example:

rsyncfrom -n -v archive.example.net /project/curds
rsyncto -n -v /project/curds archive.example.net

By default, the same path is used on the local host as the remote host.

To sync from a directory on a remote host, into a different local directory and sync a local directory into a different directory on a remote host:

rsyncfrom -v host.example.org:/var/tmp/testdir /usr/local/src/bin/new
rsyncto -v /usr/local/src/bin/workdir host.example.org:/var/tmp/testdir

NOTE: When using the host:dir form, the dir MUST be a directory.

Without using the host:dir form, you may sync either a directory tree or just a single file:

rsyncfrom -v host.example.org /etc/motd
rsyncto -v /etc/motd host.example.org

To see what might happen without even connecting to the remote host, use the -N -v options:

rsyncfrom -N -v archive.example.net /project/curds
rsyncto -N -v /project/curds archive.example.net

To install:

The primary location of the rsynchost repo is:

https://github.com/lcn2/rsynchost

To fetch this repo and move into the sub-directory rsynchost:

git clone https://github.com/lcn2/rsynchost.git
cd rsynchost

To update your repo with the latest from the master branch:

git pull

To install under /usr/local/bin:

make clobber all install

Usage:

rsyncfrom [-options ...] [user@]host[:dir] dest
rsyncto [-options ...] src [user@]host[:dir]

Common options:

While rsyncfrom and rsyncto have a number of -options, the most common and useful are:

-n

Connect and run thru the rsync(1) motions, but to not change anything

-v

Print the cd(1) and rsync(1) operations. Unless -N is used, run rsync(1) in verbose mode.

-N

Print the cd(1) and rsync(1) operations but do not run rsync(1) do not connect, do not change anything.

See the rsyncfrom(1) and rsyncto(1) man pages for a complete list of -options.

XXX: The man pages are being written. Until these man pages are written, use:

rsyncfrom -h
rsyncto -h

rsynchost's People

Contributors

lcn2 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.