1

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.

2
  • Looking at Cian and slovon's answers, your next question should be "What's the best place for 3rd party Solaris packages?" :) Sep 3, 2009 at 15:33
  • I currently use rsync to synchronize files between Mac OS X and Solaris, so it does exist and it's also easy to get.
    – Amok
    Sep 28, 2009 at 22:33

4 Answers 4

1

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.

1
  • Cian - Many thanks, best ssh instructions I've seen.
    – mrt
    Sep 8, 2009 at 8:26
0

Best would be to use rsync (copy, archive mode) or tar/star through ssh.

As for not having rsync, you can always pull the package from opencsw package system. It is worth reading about it! Install is extremely easy, just run as root the following:

# pkgadd -d http://www.opencsw.org/pkg_get.pkg

Then for adding rsync, you make:

# pkg-get -i rsync

and there you have it. You copy with rsync as follows (this copies all permissions and attributes):

# rsync -av /source/dir /dest/dir 

Here is a nice recipe for doing rsync over ssh with description on how to make ssh keys, etc.

1
  • Slovon, Just wanted to give some acknowledgement here as I used your instructions for downloading rsync. Thank you.
    – mrt
    Sep 8, 2009 at 8:28
0

Are you sharing the directories from server A with the root=server-B option? This will allow the root cronjob on server B access to the directories and its contents. As to a source for rsync, you could use the Solaris 10 Companion CD

0

Are you sharing the directories from server A with the root=server-B option? This will allow the root cronjob on server B access to the directories and its contents. As to an alternate source for rsync, you could use the Solaris 10 Companion CD

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .