Q: Rsync, Batch: How to avoid the "password" ask ?
John Taylor
john at fcs.uga.edu
Thu Jul 1 21:31:06 GMT 2004
On Thu, Jul 01, 2004 at 01:19:42PM -0600, Tim Conway wrote:
>
> SET BSERVER=192.168.0.102
> SET RSYNC_PASSWORD=bart2
> rsync -av --delete "/cygdrive/c/Doc/backup/Desktop/MesFavories.rar"
> bart2@%BSERVER%::backup_pa/current/bz/favories
>
> This tells rsync to connect with its internal transport to the rsyncd
> running on 192.168.0.102 (on the default port, 873), and place
> /cygdrive/c/Doc/backup/Desktop/MesFavories.rar in the subdirectory
> current/bz/favories in the module "backup_pa", i.e.,
> /mnt/hdc1/backup/current/bz/favories. It connects with the rsync username
> (no relation to any unix username - you made it point to "nobody", as does
> "root") bart2, using the password "bart2" from the RSYNC_PASSWORD
> environmental variable. I am surprised it works using a mix of unix path
> declarations and dos environmental declarations. Since you're already in
> cygwin, I'd just use pure sh, or if you must run it from the dos
> environment, i.e. a bat file, I'd specify the windows side path in dos
> style.
This is a nice tip about the password. I always did it this way:
echo my_password| rsync ...
which is different than
echo my_password | rsync ...
Notice the space before the pipe. Windows sends the space as part of
the password, and thus sends an invalid password to rsync.
-John
More information about the rsync
mailing list