Skip to main content
How to setup an RSYNC Server on a CommGate Professional Server 3.x

1) Install the rsync daemon via apt-get by typing the following command on a CommGate system as user root;

apt-get update
apt-get install rsync


2) Create the rsync daemon configuration file so that we can start the xinetd service and the rsync daemon is automatically started. Edit the following files;

vi /etc/rc.d/xinetd.d/rsync



Add the following lines in the configuration file;


# default: off

# description: The rsync server is a good addition to
# an ftp server, as it
allows crc checksumming etc.

service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync

server_args = --daemon

log_on_failure += USERID

}


3)
Configure the /etc/rsyncd.conf file as follow;

## This is the rsyncd configuration file to start the rsync
## daemon for
remote synchronization of data.

log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
max connections = 5
syslog facility = local3

[name-of-shared-path]
path = /opt/named/of/shared/path
comment = Change to the Name of Shared Path
auth users = root
secrets file = /etc/rsyncd.secrets
uid = root
gid = root
read only = yes
list = yes
hosts allow = 127.0.0.0/8 192.168.1.0/24


4) Export the RSYNC password as follow;

export RSYNC_PASSWORD=password



5) Set-up the RSYNC password file in case it will be needed for rsync scripts as follow;


vi /etc/rsyncd.secrets



Within the file, type the rsync username and password in the following format;


root:password

user1:password

user2:password



Save the file with command;


:wq



Change the file ownership as follow;

chmod 600 /etc/rsyncd.secrets


5) Start the RSYNC server as follow;

service xinetd start


6) Test the RSYNC server setup from the server;

rsync localhost::


You should see these;

rsync localhost::
name-of-shared-path Change to the Name of Shared Path


7) Viola! Your rsync server is ready and you can now use your Linux PC/Server rsync client to do rsync backups!

8) Here's how you can create the script to run the backup automatically via
cron.

9) Decide on where you want to store all your administration scripts. Mine is in /root/scripts/ so I create multiple rsync scripts for every individual server.


Example of my rsync script.

#!/bin/sh
export RSYNC_PASSWORD='mypassword'
/usr/bin/rsync -av --stats --progress --exclude "*.tmp" --exclude "*.c" \
root@192.168.1.100::HOME /home > /var/log/rsync.log


10) I then edit my crontab to backup my data to my rsync server which has 500GB (RAID-5) storage every hourly via rsync. The command to edit your crontab is as follow;

crontab -e


11) I add the following line in my crontab.

0 0-23 * * * /root/scripts/rsync-backup-home.sh


That's all folks! You now have an RSYNC server and you can start backing-up all your Windows and Linux PC/Servers automatically without forgetting it ever again or worrying about loss of data anymore. Of course you should think of offline storage too if your data is worth a lot of money. That's where a tape-drive is useful :)

Comments

Popular posts from this blog

OpenProj - FREE alternative to Microsoft Project I wanted to share with all of you about Projity's important announcement last week at LinuxWorld. Projity announced the release of OpenProj, a FREE (yeah, another FREE software) and open source replacement of Microsoft Project. OpenProj is available on Windows, Linux, Unix or Mac and is interoperable with Microsoft Project. The best thing is, it even opens existing MS Project files! How cool is that? I read on OpenProj website that OpenProj has been downloaded on an average every 35 seconds around the clock at http://www.projity.com since they launched and made the software available last week. OpenProj is now in the 99.99th percentile for activity on Sourceforge.net and is quickly becoming one of the most used open source solutions worldwide. The OpenProj folks are expecting about 11 million worldwide users and in my opinion, this has been an excellent start for them. MS Project has been a key strategic solution for Micro...
In early April 2006, I sign-up for the Excellerated Business School for Entrepreneurs (BSE) after a preview session held in Singapore by Executive-Directions. The seminar was held from 15 April to 23 April 2006 in Subang Jaya Hotel in Kuala Lumpur, Malaysia. The BSE in KL was organized by GlobeSL Sdn Bhd. I left Singapore on 14 April via Transtar , the only 1st class coach service which has 16 seats to create a lot of room for your leg. They also provide hot meal during the journey with hot drinks on demand. The seats are equipped with a massage chair, a personal in-flight entertainment system on LCD screen, PC Games and the F&B Attendant will provide anything that you ask for. From newspaper, magazines, blanket, hot/cold drinks, a new set of earphones for the entertainment system... they have it all. They are most courteous and polite at all times. I truly enjoy the Transtar service. For SG$50 from Singapore to KL, it's worth it. I arrived in Subang Jaya Hotel at about 10p...

What Makes a Champion?

By NG Chang Siang, Education Success Coach MindChamps Holdings Ltd ‘’ What makes a champion is a champion mindset. The champion mindset is the transferable commodity, not the skill itself. If you have done something great in one field, you are far more likely to do it in another ‘’ --Professor Allan Snyder FRS I have a good friend who is a primary school teacher. He also takes on as a role of a coach in flaw ball for the students in his school. Guess what? He never play flaw ball before. Not even that, after he coached his students, they won a school team which was coached by a national flawball player. That day I met him in our soccer game as we play soccer together every Monday. He played soccer very well and represented his schools when he was very young. I ask him : “ How did you do it…?” “ How can someone with no flaw-ball playing experience train and beat another team whom has an experience coach?” He replied: “ Oh, I just use the strategy I know in playing soccer and apply...