Albin Posted January 29, 2013 Share Posted January 29, 2013 UnRaid version: 5.0-rc8a DeltaCopy Version 1.4 (installed on Windows Vista Home Premium SP3) (I could use unison if that would be easier) http://lime-technology.com/forum/index.php?topic=2165.msg16145#msg16145 I have been wanting to sync files between my server and my laptop and attempted to follow WeeboTech and Tibbar "How to" to get this working. http://lime-technology.com/forum/index.php?topic=2165.msg16145#msg16145 I figured I would layout all the steps that I went through which came from the "How to" (Thanks WeeboTech and Tibbar) Maybe I missed one of the steps or did not do one of the steps properly. Steps already completed: Short description of the steps: Created the following folders and files /boot/Custom (Folder) /boot/Custom/etc (Folder) /boot/Custom/etc/rc.d (Folder) /boot/Custom/etc/rsyncd.conf (File)(see below for code inserted in filed) /boot/Custom/etc/rc.d/S20-init.rsyncd (File)(see below for code inserted in filed) Edited "GO" Script (see below for code) Copied the rsyncd.conf from /boot/Custom/etc/rsyncd.conf to /etc/rsyncd.conf Created a network share called "Backup" Rebooted the Unraid Server Installed DeltaCopy and attempted to fetch the directory names (this failed) Detailed Steps (long version of the steps): 1. Created folder called "Custom" on Flash Drive full path = /boot/Custom full path if flash drive is mounted to windows= /Custom 2. Created sub folder called "etc" full path = /boot/Custom/etc full path if flash drive is mounted to windows= /Custom/etc 3. Created sub folder called "rc.d" full path = /boot/Custom/etc/rc.d full path if flash drive is mounted to windows= /Custom/etc/rc.d 4. Created file in sub-folder "etc" file name "rsyncd.conf" full path = /boot/Custom/etc/rsyncd.conf full path if flash drive is mounted to windows= /Custom/etc/rsyncd.conf Code in file called rsyncd.conf gid = root uid = root use chroot = 4 max connections = 4 pid file = /var/run/rsyncd.pid timeout = 600 [backup] path = /mnt/disk1/Backup comment = Backup read only = FALSE list = yes *I noticed the code is pointing to a disk then a folder and under stand that I could use /mnt/Backup seeing I did create a network share called Backup. I currently left this the way it is, and I am assuming it should work, but maybe I am assuming wrong? 5. Creadted file in sub-folder "rc.d" file name S20-init.rsyncd code placed in file #!/bin/bash if ! grep ^rsync /etc/inetd.conf > /dev/null ; then cat <<-EOF >> /etc/inetd.conf rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon EOF read PID < /var/run/inetd.pid kill -1 ${PID} fi cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf 6. Edited the file called "GO" located in /boot/config full path = /boot/config/go full path if flash drive is mounted to windows= /config/go Code added as last line in the "GO" file /boot/custom/etc/rc.d/S20-init.rsyncd 7. Copied the rsyncd.conf from /boot/Custom/etc/rsyncd.conf to /etc/rsyncd.conf To do this I Telnet http://lime-technology.com/wiki/index.php/Telnet in to the server via putty After entering my login credentials I typed MC for midnight commander and navigated to /etc in the left pane and /boot/Custom/etc in the right pane, then clicked on the rsyncd.conf file and hit copy. 8. I created a network share called Backup (currently export is set to "YES" and security is set to "PUBLIC") 9. Downloaded and installed DeltaCopy to windows vista 10 ran deltacopy client used the "add New Profile" icon profile name "Backup" Server IP/HOST Name: 192.168.2.132 (also tried Tower3) This would be Tower for most users) Virtual Directory Name, I do not think you type anything here, you want to click the browse icon and let deltacopy fetch the available virtual directories. This is where I am getting stuck. I am getting the following error from deltacopy: Unable to fetch directory names. rsync: failed to connect to tower3: Connection refused (111) Separately: I also tried the following from a Telnet prompt: (NOTE I tried Tower3 and 192.168.2.132) This was from WeeboTech http://lime-technology.com/forum/index.php?topic=2165.15 Tower3 login: root Linux 3.4.11-unRAID. root@Tower3:~# whereis rsync rsync: /usr/bin/rsync /usr/bin/X11/rsync root@Tower3:~# ls -l /usr/bin/rsync -rwxr-xr-x 1 root root 361352 2010-02-28 20:38 /usr/bin/rsync* root@Tower3:~# /usr/bin/rsync rsync://tower3 rsync: failed to connect to tower3: Connection refused (111) rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.7] echo $PATH root@Tower3:~# echo $PATH /usr/local/sbin:/usr/sbin:/sbin:./:/usr/local/bin:/usr/bin:/bin:/usr/kerberos/bin:/usr/kerberos/sbin root@Tower3:~# /usr/bin/rsync rsync://192.168.2.132/ rsync: failed to connect to 192.168.2.132: Connection refused (111) rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.7] Did I miss a step? Do I have the code / scripts in the files wrong? I do not think it is a permissions issue seeing the security is set to public. Is it a problem with the unraid version I am using? I attached my sys log. I do see where there is a line in the syslog that says: get_config_idx: fopen /boot/config/shares/Backup.cfg: No such file or directory - assigning defaults Do I need Backup.cfg for this to work, or is this a separate issue? Thanks for any help on this. Albin System_Log.txt Quote Link to comment
trurl Posted January 29, 2013 Share Posted January 29, 2013 I had this working on 5rc8a and it has continued to work on all my upgrades since. I have DeltaCopy (Win7) doing a sync of three different folders, each on their own schedule. 5. Creadted file in sub-folder "rc.d" file name S20-init.rsyncd code placed in file #!/bin/bash if ! grep ^rsync /etc/inetd.conf > /dev/null ; then cat <<-EOF >> /etc/inetd.conf rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon EOF read PID < /var/run/inetd.pid kill -1 ${PID} fi cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf ... 7. Copied the rsyncd.conf from /boot/Custom/etc/rsyncd.conf to /etc/Custom/etc/rsyncd.conf To do this I Telnet http://lime-technology.com/wiki/index.php/Telnet in to the server via putty After entering my login credentials I typed MC for midnight commander and navigated to /etc in the left pane and /boot/Custom/etc in the right pane, then clicked on the rsyncd.conf file and hit copy. ... Is the path in step 7 above that I made bold really what you used or is that just a typo? The correct path should be the same as the cp command in the code in step 5: /etc/rsyncd.conf Also, what editor did you use to create these files? You must be sure to use an editor that can save text in Unix-compatible form; i.e., with LF for newline instead of CR/LF as is done by Windows. Search for notepad++ if you don't have an editor that will do this. Quote Link to comment
Albin Posted January 29, 2013 Author Share Posted January 29, 2013 I had this working on 5rc8a and it has continued to work on all my upgrades since. I have DeltaCopy (Win7) doing a sync of three different folders, each on their own schedule. 5. Creadted file in sub-folder "rc.d" file name S20-init.rsyncd code placed in file #!/bin/bash if ! grep ^rsync /etc/inetd.conf > /dev/null ; then cat <<-EOF >> /etc/inetd.conf rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon EOF read PID < /var/run/inetd.pid kill -1 ${PID} fi cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf ... 7. Copied the rsyncd.conf from /boot/Custom/etc/rsyncd.conf to /etc/Custom/etc/rsyncd.conf To do this I Telnet http://lime-technology.com/wiki/index.php/Telnet in to the server via putty After entering my login credentials I typed MC for midnight commander and navigated to /etc in the left pane and /boot/Custom/etc in the right pane, then clicked on the rsyncd.conf file and hit copy. ... Is the path in step 7 above that I made bold really what you used or is that just a typo? The correct path should be the same as the cp command in the code in step 5: /etc/rsyncd.conf Also, what editor did you use to create these files? You must be sure to use an editor that can save text in Unix-compatible form; i.e., with LF for newline instead of CR/LF as is done by Windows. Search for notepad++ if you don't have an editor that will do this. Thanks for your reply. /etc/Custom/etc/rsyncd.conf was typo when creating the post (sorry about that) I used /etc/rsyncd.conf I will correct the post The editor I use is notepad++ (I think I started using notepad++ when I started using Unraid for the first time) I think I answered all your questions. Thanks Albin Quote Link to comment
trurl Posted January 30, 2013 Share Posted January 30, 2013 Maybe it's being blocked by your windows firewall. I don't have Vista anymore but in my Window 7 Firewall I have an entry for DeltaCopy server: Quote Link to comment
Albin Posted January 30, 2013 Author Share Posted January 30, 2013 Maybe it's being blocked by your windows firewall. I don't have Vista anymore but in my Window 7 Firewall I have an entry for DeltaCopy server: Some of the errors I mention are when I telnet in. I do not see how those errors could be firewall related. I did turn off the firewall and tried detacopy with the firewall off. I got the same error / message Thanks Albin Quote Link to comment
trurl Posted January 30, 2013 Share Posted January 30, 2013 Some of the errors I mention are when I telnet in. I do not see how those errors could be firewall related. I did turn off the firewall and tried detacopy with the firewall off. I got the same error / message I think I had a firewall entry because I was also playing around with rsync going the other way, hence an entry for DeltaCopy Server, but there shouldn't need to be one for the client since it is outgoing. My unRAID is named unSERVER. When I do: rsync rsync://unSERVER I get a listing of the stuff I configured in /etc/rsyncd.conf I'm not real good with linux but I think the script in S20-init.rsyncd is checking for an rsync entry in /etc/inetd.conf and if it doesn't exist it appends: rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon to it, and if I do: cat /etc/inetd.conf I can see that line at the end so you might check that and also: cat /etc/rsyncd.conf to make sure it has what you intend in it as well. One other thing I noticed in your original post, in some places you have "Custom" in the path and some places just "custom". Linux is case-sensitive so make sure you are using the same case everywhere. Quote Link to comment
Albin Posted January 30, 2013 Author Share Posted January 30, 2013 Some of the errors I mention are when I telnet in. I do not see how those errors could be firewall related. I did turn off the firewall and tried detacopy with the firewall off. I got the same error / message I think I had a firewall entry because I was also playing around with rsync going the other way, hence an entry for DeltaCopy Server, but there shouldn't need to be one for the client since it is outgoing. My unRAID is named unSERVER. When I do: rsync rsync://unSERVER I get a listing of the stuff I configured in /etc/rsyncd.conf I'm not real good with linux but I think the script in S20-init.rsyncd is checking for an rsync entry in /etc/inetd.conf and if it doesn't exist it appends: rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon to it, and if I do: cat /etc/inetd.conf I can see that line at the end so you might check that and also: cat /etc/rsyncd.conf to make sure it has what you intend in it as well. One other thing I noticed in your original post, in some places you have "Custom" in the path and some places just "custom". Linux is case-sensitive so make sure you are using the same case everywhere. Thanks for check this over. I am going to go back through this tomorrow and try what you suggested. I think I have some "Custom" / "custom" errors Thanks Albin Quote Link to comment
Albin Posted January 30, 2013 Author Share Posted January 30, 2013 TRURL, Thanks for your help. After going through all your suggestions in your last post and working on the reply during each step, it now works. I figured I would still post the entire thing with my step by step replies, in hopes it will help someone else. My unRAID is named unSERVER. When I do: rsync rsync://unSERVER I get a listing of the stuff I configured in /etc/rsyncd.conf I get the following: Tower3 login: root Linux 3.4.11-unRAID. root@Tower3:~# rsync rsync://Tower3 rsync: failed to connect to Tower3: Connection refused (111) rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.7 I'm not real good with linux but I think the script in S20-init.rsyncd is checking for an rsync entry in /etc/inetd.conf and if it doesn't exist it appends: rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon Here is the code in my S20-init.rsyncd file: #!/bin/bash if ! grep ^rsync /etc/inetd.conf > /dev/null ; then cat <<-EOF >> /etc/inetd.conf rsync stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsync --daemon EOF read PID < /var/run/inetd.pid kill -1 ${PID} fi cp /boot/Custom/etc/rsyncd.conf /etc/rsyncd.conf Do you see anything I need to change? to it, and if I do: cat /etc/inetd.conf Here is the results of me doing: cat /etc/inetd.conf root@Tower3:~# cat /etc/inetd.conf # See "man 8 inetd" for more information. # # If you make changes to this file, either reboot your machine or send the # inetd a HUP signal: # Do a "ps x" as root and look up the pid of inetd. Then do a # "kill -HUP <pid of inetd>". # The inetd will re-read this file whenever it gets that signal. # # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> # # The first 4 services are really only used for debugging purposes, so # we comment them out since they can otherwise be used for some nasty # denial-of-service attacks. If you need them, uncomment them. # echo stream tcp nowait root internal # echo dgram udp wait root internal # discard stream tcp nowait root internal # discard dgram udp wait root internal # daytime stream tcp nowait root internal # daytime dgram udp wait root internal # chargen stream tcp nowait root internal # chargen dgram udp wait root internal time stream tcp nowait root internal time dgram udp wait root internal # # These are standard services: # # Very Secure File Transfer Protocol (FTP) server. ftp stream tcp nowait root /usr/sbin/tcpd vsftpd # # Professional File Transfer Protocol (FTP) server. #ftp stream tcp nowait root /usr/sbin/tcpd proftpd # # Telnet server: telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd # # The comsat daemon notifies the user of new mail when biff is set to y: #comsat dgram udp wait root /usr/sbin/tcpd in.comsat # # Shell, login, exec and talk are BSD protocols # #shell stream tcp nowait root /usr/sbin/tcpd in.rshd -L #login stream tcp nowait root /usr/sbin/tcpd in.rlogind # exec stream tcp nowait root /usr/sbin/tcpd in.rexecd # talk dgram udp wait root /usr/sbin/tcpd in.talkd #ntalk dgram udp wait root /usr/sbin/tcpd in.talkd # # To use the talk daemons from KDE, comment the talk and ntalk lines above # and uncomment the ones below: # talk dgram udp wait root /usr/sbin/tcpd /usr/bin/kotalkd # ntalk dgram udp wait root /usr/sbin/tcpd /usr/bin/ktalkd # # Kerberos authenticated services # # klogin stream tcp nowait root /usr/sbin/tcpd rlogind -k # eklogin stream tcp nowait root /usr/sbin/tcpd rlogind -k -x # kshell stream tcp nowait root /usr/sbin/tcpd rshd -k # # Services run ONLY on the Kerberos server # # krbupdate stream tcp nowait root /usr/sbin/tcpd registerd # kpasswd stream tcp nowait root /usr/sbin/tcpd kpasswdd # # POP and IMAP mail servers # # Post Office Protocol version 3 (POP3) server: #pop3 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/popa3d # Internet Message Access Protocol (IMAP) server: #imap2 stream tcp nowait root /usr/sbin/tcpd imapd # # The Internet Unix to Unix copy (UUCP) service: # uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico - l # # Tftp service is provided primarily for booting. Most sites # run this only on machines acting as "boot servers." # tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboo t -r blksize # # Internet Bootstrap Protocol (BOOTP) server: # bootps dgram udp wait root /usr/sbin/bootpd bootpd # # Finger, systat and netstat give out user information which may be # valuable to potential "system crackers." Many sites choose to disable # some or all of these services to improve security. # Try "telnet localhost systat" and "telnet localhost netstat" to see that # information yourself! #finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd -u # systat stream tcp nowait nobody /usr/sbin/tcpd /bin/ps -auwwx # netstat stream tcp nowait root /usr/sbin/tcpd /bin/netstat - a # # Ident service is used for net authentication #auth stream tcp wait root /usr/sbin/in.identd in.identd # # These are to start Samba, an smb server that can export filesystems to # Pathworks, Lanmanager for DOS, Windows for Workgroups, Windows95, Lanmanager # for Windows, Lanmanager for OS/2, Windows NT, etc. # If you're running smbd and nmbd as daemons in /etc/rc.d/rc.samba, then you # shouldn't uncomment these lines. #netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd #netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd # #Samba Web Administration Tool: #swat stream tcp nowait.400 root /usr/sbin/swat swat # # Sun-RPC based services. # <service name/version><sock_type><rpc/prot><flags><user><server><args> # rstatd/1-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rstatd # rusersd/2-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rusersd # walld/1 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rwalld # # End of inetd.conf. root@Tower3:~# I can see that line at the end so you might check that and also: cat /etc/rsyncd.conf to make sure it has what you intend in it as well. Here is what I got when doing: cat /etc/rsyncd.conf root@Tower3:~# cat /etc/rsyncd.conf cat: /etc/rsyncd.conf: No such file or directory OK I am sure that I copied the file using Midnight Commander http://lime-technology.com/wiki/index.php/UnRAID_Add_Ons#mc_.28Midnight_Commander_file_manager_-_version_2010-02-06_.29 I am not sure why after coping it over from /boot/Custom/etc/ that it was not there after a reboot. 7. Copied the rsyncd.conf from /boot/Custom/etc/rsyncd.conf to /etc/Custom/etc/rsyncd.conf To do this I Telnet http://lime-technology.com/wiki/index.php/Telnet in to the server via putty After entering my login credentials I typed MC for midnight commander and navigated to /etc in the left pane and /boot/Custom/etc in the right pane, then clicked on the rsyncd.conf file and hit copy. ... Is the path in step 7 above that I made bold really what you used or is that just a typo? The correct path should be the same as the cp command in the code in step 5: /etc/rsyncd.conf I did check this after you brought it to my attention, and I am sure I did not create a folder called Custom under /etc/, so there is no path called /etc/Custom/etc/ and no file seeing there is no path. I telneted back in through putty, and entered MC to get to Midnight Commander screen. Before copying the file over I went in (using the edit feature in MC) and check all the files I created or edited These files: /boot/Custom/etc/rc.d/S20-init.rsyncd /boot/Custom/etc/rsyncd.conf /boot/config/go When looking at them I saw the following at the end of every line ^M I removed the 2 spaces prior to the ^M and I removed the ^M for each line in each file. Only a few lines in my "go" file had this. one was a comment line so I am guessing that had no impact, but I think the other line was /usr/local/sbin/emhttp & which would right where I needed to do a carriage return to start the newly created line for /boot/Custom/etc/rc.d/S20-int.rsyncd So those " ^M " are all removed With the ^M remvoed from the files I copied rsyncd.conf from /boot/Custom/etc/ to /etc/ One other thing I noticed in your original post, in some places you have "Custom" in the path and some places just "custom". Linux is case-sensitive so make sure you are using the same case everywhere. I went through and fixed all these locations, so any place where I had "custom" I changed it to "Custom" You were very helpful. Thanks so much. I will have to say I fixed the upper / lower case issue for "custom" / "Custom" first, then I removed the ^M from the files, then copied the rsyncd.conf file to /etc/. I think I did a reboot in between step one and 2 but I am not sure. I know I did a reboot after all three. So what I do not know is if one of the above, a combination of the above, or all of the above were the problems. Needless to say you helped me check all the write areas, and I now I get the following when doing rsync rsync://tower3 root@Tower3:/boot/config# rsync rsync://tower3 backup Backup or doing rsync rsync://192.168.2.132 root@Tower3:/boot/config# rsync rsync://192.168.2.132 backup Backup DeltaCopy now fetches the virtual directory "backup" with either a server name tower3 or 192.168.2.132 Now I need to spend some time figuring out DeltaCopy's options, and start syncing files. I will go back and fix any other errors in my original post and mark it as solved Thanks again, Albin Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.