RE: rsync question -- thanks but ;)

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Carruth, Rusty
Date:  
To: Main PLUG discussion list
Subject: RE: rsync question -- thanks but ;)
From rsync man page:

    For  remote  transfers,  a  modern
       rsync  uses  ssh  for its communications, but it may have been configured to use a different remote
       shell by default, such as rsh or remsh.
.....


    From  the  user’s perspective, a daemon transfer via a remote-shell connection uses nearly the same
       command-line syntax as a normal rsync-daemon transfer, with the only exception being that you  must
       explicitly  set  the remote shell program on the command-line with the --rsh=COMMAND option.  (Set‐
       ting the RSYNC_RSH in the environment will not turn on this functionality.)  For example:


           rsync -av --rsh=ssh host::module /dest
....


       I mirror a directory between my "old" and "new" ftp sites with the command:


       rsync -az -e ssh --delete ‾ftp/pub/samba nimbus:"‾ftp/pub/tridge"


       This is launched from cron every few hours.



End of rsync man page extract :-)

To make it so you don't need to enter the password, all you have to do is set it up so that (from the machine you want to initiate the rsync command), you can type 'ssh ' and not have to enter the password. This involves .ssh/authorized_hosts, if I remember right. Just google for something like 'no password login ssh' or something like that. (That's what I did 2 weeks ago when I had to do the same thing, so I know the answer is out there, but I don't remember the exact query I used...)

Rusty

-----Original Message-----
From: [mailto:plug-discuss-bounces@lists.phxlinux.org] On Behalf Of
Sent: Tuesday, January 28, 2014 9:35 AM
To: Main PLUG discussion list
Subject: Re: rsync question -- thanks but ;)

Thanks Brian ...

but I don't know how to do either of those things ???


---------
> That's rsync over ssh so you can use pub key auth.
> Or do it over tcp/873 and use $RSYNC_PASSWORD


---------
>> On Jan 27, 2014 joe wrote:
>>
>> rsync question:
>>
>> I have a shell script similar to the following (but longer) that I
>> use to copy/sync/backup selected directories and files from my main
>> computer to a backup computer and also to copy/sync/backup those
>> selected directories and files to my web-hosted space.
>>
>> This all works fine, except I have to enter the password for each
>> segment.
>> Is there some way that I could embed the password in this shell
>> script so I do not have to manually type the password each time?
>>
>> echo "starting files copy/sync/backup"
>>
>> rsync -avH --delete --progress /home/joe/dir1/
>> joe@192.168.0.64:/home/joe/dir1/ rsync -avH --delete --progress
>> /home/joe/dir2/ joe@192.168.0.64:/home/joe/dir2/ rsync -avH --delete
>> --progress /home/joe/dir3/ joe@192.168.0.64:/home/joe/dir3/
>>
>> rsync -avHp --progress /home/joe/dir1/
>> :www/dir1/
>> rsync -avHp --progress /home/joe/dir2/
>> :www/dir2/
>> rsync -avHp --progress /home/joe/dir3/
>> :www/dir3/
>>
>> echo "FINISHED"




---------------------------------------------------
PLUG-discuss mailing list - To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss