Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using Ubuntu server, no GUI, and I would like ot have rsync running to backup my Windows laptop. I have installed rsync and created the rsyncd.conf file
I installed cygwin in order to run rsync and this is what I get
Code:
$ rsync 192.168.1.105::backup
rsync: failed to connect to 192.168.1.105: Connection refused (111)
rsync error: error in socket IO (code 10) at /home/lapo/packaging/tmp/rsync-2.6.
6/clientserver.c(98)
I know my server resides at 192.168.1.105, but I have no idea how to configure the firewall. The error message looks like the ubuntu firewall is blocking my request to backup. How do I configure the firewall to open up port 111?
I think that it is but I am not sure, as I am rather new to linux. How do I check if it is running? Also, is it possible that I have only installed the rsync client, not the server. How do I check that? When I apt-get rsync it says that I have the newest version.
apt-get install rsync must work for the server side because I finally got it to sync. I could not figure out how to open another port. However, I found that if you go through ssh, it is more secure and the firewall will be a little easier to work with. Anyway, after the rsync.conf is set up and cygwin is loaded on the windows side here is the line that will make it back up (for future reference).
ssh will slow it down as well, and requires you to have a password or a certificate. You need to decide if the security is needed, i.e. if you are on a secure network or not. But it's certainly a good habit to use ssh whereever possible.
From the point of view of the firewall, ssh and rsync have the same level of complexity: one port to open (ssh:22 rsync:873).
It's good that you've got it running, but it might still be useful to try the native rsync protocol as well, if only to find out why it didn't work in the first place.
This is just on my home LAN, so security through ssh is probably overkill. However, when Ubuntu Server is installed SSH port 22 is already open and functioning. However, I could not get port 873 to open up, any ideas on how to open it? I could figure it out through a GUI, but I did not install one on this server.
I must admit I'm lazy and always use Guarddog as a firewall. Without GUI, you'll have to tinker with the iptables command. I am not at a Linux box now but I remember that iptables has a list command (try `man iptables`) which shows the rules. If you post them, we can go further.
The command to see what firewall rules are used on a linux box (itself) is:
Code:
iptables -L
That might print just a few lines or it might spit pages. If you have many rules, you'll want to pipe the output either to a file or into the less or more command to only show one screen at a time -
Code:
iptables -L > /tmp/fiirewall (then read /tmp/firewall)
OR
iptables -L | less
iptables -L | more
Also, for future reference, it would help new users (or people new to rsync) to point out that the command you listed above:
is run on the cygwin (windows) machine, not the server. As I read through the thread, I saw you trying to connect from the Ubuntu box to the Ubuntu box in the beginning, and never saw how you got data from the win box to Ubuntu. Also, it looks like your command would only backup the c:\Documents folder, which is fine if you have a c:\Documents folder. Most of the time, I think windows puts things like My Documents in c:\Documents and Settings?
When backing up windows servers to linux boxes, I have found it easier to use rsyncd on the windows box. I do it on the LAN, so I have no need of encrypting the traffic, which is the big benefit of using ssh. If the data ever touches the internet, you are far better with ssh+rsync than rsyncd. There are opensource ports of rsyncd packages available for windows, both as batch files, services, and I've even seen and used a GUI program that runs an rsync server on windows.
I've had this exact same error and i resolved it using ubuntu rsync community page. I was missing the configuration of the rsync Daemon.
From the Ubuntu community rsync help page
1. Edit the file /etc/default/rsync to start rsync as daemon using xinetd. The entry listed below, should be changed from false to inetd.
RSYNC_ENABLE=inetd
2. Install xinetd because it's not installed by default.
$ sudo apt-get -y install xinetd
3. Create the file /etc/xinetd.d/rsync to launch rsync via xinetd. It should contain the following lines of text.
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
flags = IPv6
}
4. Create the file /etc/rsyncd.conf configuration for rsync in daemon mode. The file should contain the following. In the file, user should be replaced with the name of user on the remote machine being logged into.
[share]
comment = Public Share
path = /home/share
read only = no
list = yes
uid = nobody
gid = nogroup
auth users = user
secrets file = /etc/rsyncd.secrets
5. Create /etc/rsyncd.secrets for user's password. User should be the same as above, with password the one used to log into the remote machine as the indicated user.
$ sudo vim /etc/rsyncd.secrets
user:userpassword
6. This step sets the file permissions for rsyncd.secrets.
just a side note question: why not mount the windows directories via SAMBA or as a cifs mount point and use rsync on your Ubuntu server instead of fighting with trying to force rsync to run inside MS Windows. run it native on the Ubuntu box with much less hassle.
just a side note question: why not mount the windows directories via SAMBA or as a cifs mount point and use rsync on your Ubuntu server instead of fighting with trying to force rsync to run inside MS Windows. run it native on the Ubuntu box with much less hassle.
1. Running rsync on Win is not a "fight".
2. Local business security rules may prevent sharing folders on local machines.
3. Volume Shadow Copy cannot be done from the Linux side
4. Can schedule from the local side when convenient for local resources.
5. Should I continue????
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.