Adding a new rsync service


 
Thread Tools Search this Thread
Operating Systems Solaris Adding a new rsync service
# 1  
Old 03-18-2010
Adding a new rsync service

Hi,

This process has already been covered before in the forum. I have just installed rsync on Solaris 10 and would now like to activate a service. Tornado has previously posted a thread explaining the process. The question I have is:

If the following directory does not exist on your system (see below) where would you create this script?

If a script is required to start and stop the process, create the script and place it in a local directory such as /usr/local/svc/method

Code:
# vi /usr/local/svc/method/newservice
#!/sbin/sh
#
# Copyright (c) 1995, 1997-1999 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident  "@(#)newservice    1.14    06/11/17 SMI"

case "$1" in
'start')
/usr/bin/newservice &
;;

'stop')
        /usr/bin/pkill -x -u 0 newservice
;;

*0
echo "Usage: $0 { start | stop }"
;;
esac
exit 0

# 2  
Old 03-19-2010
You need to create this directory. However, /usr/local/something is a poor advice (i.e. non Solaris standard compliant) and might lead to trouble. I would suggest /opt/local/svc/method instead.
# 3  
Old 03-25-2010
Thanks jlliagre.

Maybe another few questions you could answer for me:

I have downloaded rsync-3.0.6 into the tmp directory.

Where is the best location to install rsync?

Do you have an example manifest .xml file for the rsync service?

Will the start stop script I previously posted work?

I also read that you have also to configure the “/etc/rsyncd.conf” and “/etc/rsyncd.motd” files, as well as the “/etc/default/rsync” configuration file.

Are these files created after rsync installation?
# 4  
Old 03-25-2010
I'm confused. You wrote a week ago that you have already installed it. Did you download the source code or a binary package ? In the latter case, from what repository ?

The configuration files will depend on options provided when rsync is built.
# 5  
Old 03-26-2010
I downloaded rsync from Sunfreeware - Free and Open Source Software (FOSS) for Sun Microsystem's Solaris , created a directory called
/james, unzipped the file and ran ./configure

Code:
 
# ./configure
configure.sh: Configuring rsync 3.0.7
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking whether to include debugging symbols... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure.sh: error: in `/james/rsync-3.0.7':
configure.sh: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

This is not working for me as I need to define the PATH

I have also tried installing from the Solaris 10 companion CD


Code:
 
# pkgadd -d /cdrom/s10_software_companion/components/i386/Packages SFWrsync
Processing package instance <SFWrsync> from </cdrom/s10_software_companion/components/i386/Packages>
 
Installing rsync - A faster, flexible replacement for rcp as <SFWrsync>
## Installing part 1 of 1.
596 blocks
Installation of <SFWrsync> was successful.
 
# pwd
/opt/sfw/bin
# ls -l
total 432
-r-xr-xr-x   1 root     bin       212912 Jan  6  2005 rsync

It seems rsync was installed.

What else do I need to do to get this running ?
# 6  
Old 03-26-2010
Quote:
Originally Posted by jamba1
What else do I need to do to get this running ?
A common way to use rsync is through ssh so as long as ssh is enabled, you don't need to configure anything for rsync to work.
# 7  
Old 04-08-2010
Thanks for the replies jlliagre....

If the next questions are outwith the scope of this thread then please ignore.

I have installed rsync from the companion cd as previously mentioned which
installs rsync to /opt/sfw/bin/rsync.

I have also added an entry into the /etc/inet/inetd.conf file

Code:
 
rsync   stream  tcp     nowait  root    /opt/sfw/bin/rsync  rsyncd -daemon

I then converted the rsync service to a SMF Service

Code:
 
# inetconv
 
           rsync -> /var/svc/manifest/network/rsync-tcp.xml
           Importing rsync-tcp.xml ...Done

I then tested the new service is online

Code:
 
# svcs -a | grep rsync
           online         16:04:52 svc:/network/rsync/tcp:default


Added an entry into the /etc/services file

Code:
rsync           873/tcp



I am now trying to connect to the Solaris system(considered remote host in this situation) using rsync on a Readynas Pro which is on one of our subnets. Evertime I try to connect to Solaris system using rsync on the NASbox says it cannot connect to host 192.168.xxx.xxx where I have installed and enabled rsync. I am trying to backup user files on the NASbox to a directory on the Sun system. There is a VPN router in the equation as well as a firewall, however I just
want to be sure that rsync is installed and working correctly on the Solaris box.

Have I missed anything out of the rsync install and config?
Any examples of how I can test this?




Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Adding to an array in an external file, and adding elements to it.

I have an array in an external file, "array.txt", which contains: char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies

2. Shell Programming and Scripting

Rsync Error: rsync: link_stat failed: No such file or directory (2)

I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
Discussion started by: mohtashims
2 Replies

3. UNIX for Beginners Questions & Answers

Run one service after another service has finished - systemd

Hi all I would like to know how to run task2.service after task1.service has finished. task1.service has a timer (task1.timer), that makes it run every 5 minutes OnCalendar=*:0/5task2.service is basically a script, that has to work on the files created after task1 has finished. This is what I... (2 Replies)
Discussion started by: guilliber
2 Replies

4. Ubuntu

FAQ adding rules in udev for my usb 8G to autorun rsync

Hi, I would like to ask if someone knows and show/point me or simple help me how udev rules work in lucyd, upon my quest and search all the tuts i used is based on old udev since something i read the udev change in lucyd version.. I want to accomplised when i plug my usb 8Gb device and automount... (0 Replies)
Discussion started by: jao_madn
0 Replies

5. Shell Programming and Scripting

Adding new lines to a file + adding suffix to a pattern

I need some help with adding lines to file and substitute a pattern. Ok I have a file: #cat names.txt name: John Doe stationed: 1 name: Michael Sweets stationed: 41 . . . And would like to change it to: name: John Doe employed permanently stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies
Login or Register to Ask a Question