Results 1 to 2 of 2
I am about to mass copy files from one server to another with rsync. It will be about 100 user accounts (below is just an example). I suck at shell ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-29-2012 #1
- Join Date
- Jan 2010
input a password at each prompt
I am about to mass copy files from one server to another with rsync. It will be about 100 user accounts (below is just an example). I suck at shell code. But I am going to put this in a shell script to run. But the problem is after each line it will prompt for the server password. How can I automate this process? I know it would be insecure but it's just a one time thing to run.
rsync -trl --progress -e ssh /home/scott/Maildir/ scottm&172.16.0.58:/var/vmail/example.com/scott
rsync -trl --progress -e ssh /home/aaronp/Maildir/ scottm&172.16.0.58:/var/vmail/example.com/aaronp
rsync -trl --progress -e ssh /home/allen/Maildir/ scottm&172.16.0.58:/var/vmail/example.com/allen
- 12-03-2012 #2
- Join Date
- Dec 2011
I would probably rsync them all to a local directory and then rsync that directory over the net so I only have to enter the password once.
Another option would be to temporarily blank the password and restore it after the transfers. Not a good idea.
Couldn't you rsync /home/*/Maildir or something so you just call rsync once instead of multiple times?