Search

User login

Poll

What is your favorite DB Server ?:
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

My YM

Author Information

sentono
Offline
Last seen: 2 days 16 hours ago
Joined: 09/21/2007

Alexa Rank

Who's online

There are currently 0 users and 13 guests online.
Home
  • warning: Invalid argument supplied for foreach() in /usr/home/wowtutorial/public_html/sites/all/modules/adsense_injector/adsense_injector.module on line 352.
  • warning: Invalid argument supplied for foreach() in /usr/home/wowtutorial/public_html/sites/all/modules/adsense_injector/adsense_injector.module on line 35.

Rsync over SSH Daemon

What is Rsync ?

rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar programs/protocols is that the mirroring  takes place with only one transmission in each direction. rsync can copy or display directory contents and copy files, optionally using compression and recursion.

In daemon mode, rsync listens on the default TCP port of 873, serving files in the native rsync protocol or via a remote shell such as RSH or SSH. In the latter case, the rsync client executable must be installed on both the local and the remote host.

Download Rsync

#cd /root
#wget http://samba.org/ftp/rsync/rsync-3.0.7.tar.gz
#tar -zxvf rsync-3.0.7.tar.gz
#cd rsync-3.0.7
#./configure
#make && make install

Remove Current Rsync / Old Rsync packages

#rpm -e rsync*

Installed Rsync Version

#/usr/local/bin/rsync -v
rsync  version 3.0.7  protocol version 30
Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, no ACLs, xattrs, iconv, symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

Setup SSH Without Password

#ssh-keygen -t dsa
#scp .ssh/id_dsa.pub username@192.168.1.10:~/.ssh/authorized_keys
#cat .ssh/id_dsa.pub > .ssh/authorized_keys

Setting Up Backup Over SSH via Crontab

#crontab -e
*/5 * * * * /usr/bin/rsync -e "ssh -l username" -portgWlz /path/to/source username@192.168.1.10:/path/to/destination

if data was originally in both server, assuming you want rsync to delete any file from destination/ that is not in source/, you'll need to use the --delete flag:

*/5 * * * * /usr/bin/rsync -e "ssh -l username" -portgWlz /path/to/source username@192.168.1.10:/path/to/destination --delete

 

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Recent comments

Facebook Fans

Sponsors

Online Store

Tag Cloud