[CentOS] rsync question

Fri Sep 11 15:46:58 UTC 2015
Robert Moskowitz <rgm at htt-consult.com>


On 09/11/2015 11:06 AM, Bowie Bailey wrote:
> On 9/11/2015 10:34 AM, Robert Moskowitz wrote:
>>
>>
>> On 09/11/2015 10:21 AM, C Linus Hicks wrote:
>>>   On 09/10/15, Robert Moskowitz wrote:
>>>
>>> --------------- Quoted text ------------------
>>> SSh is not parsing the port the way http does, it seems:
>>>
>>> $ rsync -ah --stats root at 192.168.129.2:613:/etc/dhcp/
>>> /home/rgm/data/htt/httnet/homebase/new/dhcp
>>> ssh: connect to host 192.168.129.2 port 22: No route to host
>>> rsync: connection unexpectedly closed (0 bytes received so far) 
>>> [Receiver]
>>> rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.1]
>>>
>>> The reason why I change my SSH port is a simple way to keep port 
>>> knocker
>>> robots away. Different hosts use different ports...
>>>
>>> ------------------ End quote --------------------
>>>
>>> Oh, right, so you either need to put that in your .ssh/config file 
>>> or use -e 'ssh -p 613' on the rsync command.
>>>
>>> The config file should look like this:
>>> Host 192.168.129.2
>>>       Port 613
>>
>> So we end up back needing the -e option or modifying the config file.
>>
>> thanks for your time.  Really.
>
> It's fairly common on technical lists like this for people to become 
> fixated on minor problems or inefficiencies in a command or 
> configuration when the actual issue is more complicated.  Try not to 
> let it bother you too much.
>
> As for your original question, I'm not sure why the files weren't 
> copied as expected.  I ran your exact command with only the server 
> names, port, and destination directory changed and all the files were 
> copied.  You can try running the command without a destination and it 
> should return a list of files found in the source directories.  If it 
> doesn't list everything, there is some problem with how the source 
> files are being specified or something preventing them from being 
> read.  Selinux is always suspected in cases of strange permission 
> problems.
>
There is really something going on, perhaps with Selinux.  The files DID 
get copied, but I cannot get any tool to list them on my F22 target!  I 
copy back to someplace else on the C7 system, and there they all are.  
If I copy into a nonexistant folder on my F22 notebook, they all show in 
the new directory.  Freaky.  Same thing when I backed up my /etc/dhcpd/ 
directory.  Only dhcpd.conf shows in the file listing.  The others came 
across, but don't show.