kevincolyar / rbsync

rbsync is a ruby wrapper for rsync that simplifies simple pushing and pulling to and from remote filesystems. Push and pull actions can be performed from the command line anywhere in the file system.

This URL has Read+Write access

kevincolyar (author)
Thu Jan 08 09:13:49 -0800 2009
commit  2c3dc72b98144d440e3eaa6d2957b1564221fcab
tree    c31fd96559a5306da9e7533a61d2d2cb4449d353
parent  0954167f380199206552aa34920179986e22131c
rbsync /
name age message
file .gitignore Loading commit data...
file .rbsync.sample
file README.rdoc
file Rakefile
directory bin/
directory lib/
README.rdoc

Description

  rbsync is a ruby wrapper for rsync that simplifies simple pushing and pulling to and from remote filesystems.
  Push and pull actions can be performed from the command line anywhere in the file system.

Prerequisites

  ruby
  rsync

Usage

  > pull_from [user@]host [path] [rsync_options]
  > push_to   [user@]host [path] [rsync_options]

  * path defaults to current directory if not supplied.
  * rsync_options can be any option supported by rsync, such as --dry-run or --delete.  See rsync documentation.

Examples

  Simple Example:
  > pull_from server ~/mp3

  Pulling server:/home/user/mp3/ to /home/user/mp3/

  Example with mappings and rsync options defined in ~/.rbsync:
  > push_to server ~/mp3

  Pushing server:/Users/macuser/Music/mp3/ to /home/linuxuser/mp3/ with options
  --progress -avzut -e ssh --exclude .DS_Store --dry-run

~/.rbsync

  .rbsync is a yaml file that should be place in the users home directory
  that contains path mappings and default rsync options.

  Sample .rbsync file:

  mappings:
    /Users/macuser: /home/linuxuser
    /Users/macuser/Music: /home/linuxuser/music

  rsync: --progress -avzut -e ssh --exclude .DS_Store

  The mappings section contains a regex expression and it's corresponding map-to
  value.
  The rsync section contains the options that are used everything the push_to or
  pull_from commands are used.

Download

Currently this library is available with git from:

  git://github.com/kevincolyar/rbsync.git

Installation

From Git

You can check out the latest source from git:

  > git pull git://github.com/kevincolyar/rbsync.git

From Ruby Gems

Installation from RubyGems

  Make sure github is a gems source
  > gem sources -a http://gems.github.com (you only have to do this once)

  > gem install kevincolyar-rbsync