How to perform scheduled directory copies on Solaris 10

copysolaris

I need to have a set of directories on server A copied to server B each night.
At present:

I have a share on server A which is mounted on server B

a job run by cron on server B copies each directory and its contents from A to B, preserving permissions.

After the first run, some files fail to copy because of the permissions.

rsync would be good, but it doesn't exist in Solaris 10.

Note: If SSH/SCP is part of the answer, please could you include or link to info on how to configure it (beginner level please!) SSHD is running on both servers, but SCP either reports 'Permission Denied' if I specify batch mode, or else it simply prompts 'Password' and rejects every password I try.

Best Answer

You can do it with scp if you first setup ssh keys (instructions here) so you don't need password authentication. The other thing you could do is install rsync, it's available in both sunfreeware and blastwave, or could be compiled from source for your system. In any case though if you do use rsync, I'd probably advise on using the ssh transport.

None of these will deal with permissions though. If the user the commands are running as don't have permission to read/write to the relevant directory, this will still fail.