Can /usr and /var be copied to another machine?

Hi
May I know whether I can a restore a backup of the following files and folders from one machine Sunfire V880 to another Sunfire V880 all running the same Solaris 9 without any problems to the 2nd machine?:

  1. /usr
    2. /var
    3. /etc/shadow
    4. /etc/group
    5. /etc/passwd
    6. /home

Hope somebody helps me. Thanks

Not sure offhand about config, but logs and licenses would be confused.

This is getting hard to follow because each question is a new post.

It all seems to derive from the same initial problem. It might be a good idea to make a consolidated post giving the full history (including commands typed) and mentioning the filesystem types and the contents of /etc/fstab .

Anyway, I cannot advise in detail (but those on the Solaris board or Sun Support can).

One idea.
When I was in a similar situation on an old Solaris server the Sun support guy talked me through the following:

1) Boot the broken server from release media DVD.
2) Mount relevant local filesystems on temporary mountpoints.
3) Set up NFS mounts from broken server to good server to make filesystems from the good system available to the broken system.
The generic kernel included NFS (this is the bit I'm not sure about for Solaris 9).
4) Copy enough from the good server to the bad server to get the broken system running. Pay particular attention to /etc/fstab and at all times know what the root password is.
Either copy from NFS map to the good server hard discs or from NFS map to backup device.
5) Boot the newly repaired server and restore remaining detail from backup.

The only rider was that my backup was a bog-standard unix backup (not tar).
If however your original restore error only overwrote those files which were on a tar backup I would not expect it to overwrite device special files. A tar backup is not suitable for backing up system partitions.

Note: I didn't overwrite /etc/passwd /etc/shadow or /etc/group but chose to repair them having restored the originals to temporary space. Use "vipw" to repair a password file, "vi" to repair /etc/shadow and "pwconv" to sync passwd and shadow. Use "vi" for /etc/group . Run "pwck" and "grpck" before trying to boot.

Ps: 99% of all Systems Administrators would do a cold build and then restore the custom bit from backup.

Maybe he's just shooting for a simpler setup?

@DGPickett : Please read the previous posts. O/P is in a delicate situation with system down following a trail of accidents.

For some of these directories, there is a very large set of potential problems.

/usr would be relatively safe assuming both servers have exactly the same set of packages installed and the same patch level.

/var files are server specific so copying them from one server to another might lead to unpredictable issues. Here again, the same package/patch level constraint is a pre-requirement.

/etc/passwd, /etc/shadow and /etc/group would be fine for the system accounts but any discrepancy between extra accounts might lead to issues although the fact the home directories are copied too would reduce that risk.

/home is by default handled by the automounter so cannot be written to. If it is a regular directory, there would be no OS specific issues with copying it.