Stacking rsync commands
Hi folks,
Not sure if this belongs in the newbie or the server section, so my apologies if this is the wrong place. I have a webserver that I backup using a handful of rsync scripts that I run under OSX. They're pretty basic, and just sync a few directories in various parts of the filesystem. Right now, I have to run them separately, since (for example) one backs up something under /home/user/website/stuff_to_be_backedup, while another backs up something under /home/someotheruser/someotherstuff Since the rsync script is authenticating to the server, is there a way to get it to backup multiple sections? Right now I just run four copies of the script and authenticate each time, but I assume there's probably a way (that my Google-fu fails to find) that I can have it log in, rsync the first bit, then the second, then so-on without having to log in/out each time. Any insight would be great. :) Cheers! |
If you have an ssh authentication agent running in your login session, you can run ssh-add to add identities to the agent and they will be available to rsync without further authentication. ssh-agent is generally started automatically in a X session. If you're logging in from a text terminal, you'd probably need to run
Code:
eval $(ssh-agent -s) |
You can also use key-based authentication, this way you don't have to give your password/username at all and can automate the backup with cron (or whatever MacOS X uses instead).
|
Thanks very much guys!
I was able to use this tutorial here: https://blogs.oracle.com/jkini/entry/how_to_scp_scp_and And it worked perfectly. Much appreciated! |
All times are GMT -5. The time now is 07:13 AM. |