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


 
Thread Tools Search this Thread
Operating Systems Solaris Can /usr and /var be copied to another machine?
# 1  
Old 06-15-2011
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
# 2  
Old 06-15-2011
Not sure offhand about config, but logs and licenses would be confused.
# 3  
Old 06-15-2011
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.

Last edited by methyl; 06-15-2011 at 05:28 PM..
# 4  
Old 06-15-2011
Maybe he's just shooting for a simpler setup?
# 5  
Old 06-15-2011
@DGPickett : Please read the previous posts. O/P is in a delicate situation with system down following a trail of accidents.
# 6  
Old 06-15-2011
Quote:
Originally Posted by rahmantanko
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 ?
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

OSX: ./Users/myname OR. /usr/myname ? 1) what is the truth on UNIX ./usr/ directory.

OSX uses its own directory strecture on the BSD core, for example /Users/Bob_Alice/. but legacy Unix structure /usr/... remains. Adding confustion, some Unix books say /usr/ was never intended for specific users. and others show it being used for Bor or Alice. I am not sure where to put my third... (5 Replies)
Discussion started by: michaelayres
5 Replies

2. Red Hat

Server shutdown- /var/log/messages copied over here

Hi, Please share your thought what could make the server shutdown: Dec 1 10:20:05 powellton syslog-ng: syslog-ng version 1.6.8 starting Dec 1 10:20:06 powellton kdump: Loaded kdump kernel: /sbin/kexec -p /boot/vmlinux-2.6.16.60-0.34-kdump --append="CRASH=1 root=/dev/rootvg/rootlv... (1 Reply)
Discussion started by: admin_db
1 Replies

3. BSD

FreeBSD: /usr/bin/ld not looking in /usr/local/lib

I'm not sure if this is the default behavior for the ld command, but it does not seem to be looking in /usr/local/lib for shared libraries. I was trying to compile the latest version of Kanatest from svn. The autorgen.sh script seems to exit without too much trouble: $ ./autogen.sh checking... (2 Replies)
Discussion started by: AntumDeluge
2 Replies

4. Shell Programming and Scripting

Csh , how to set var value into new var, in short string concatenation

i try to find way to make string concatenation in csh ( sorry this is what i have ) so i found out i can't do : set string_buff = "" foreach line("`cat $source_dir/$f`") $string_buff = string_buff $line end how can i do string concatenation? (1 Reply)
Discussion started by: umen
1 Replies

5. Red Hat

/usr/sbin/crond: can't lock /var/run/crond.pid,

please tell pre-requisite steps to activate cron. i activated the cron but it not executing the script which i set in crontab entry.through root user i passed the service crond start it get start.but when i go to etc/init.d and passed crond stop command.it gets crond: can't lock /var/run/crond.pid,... (2 Replies)
Discussion started by: umair
2 Replies

6. Solaris

How do I link ld in /usr/ucb/ to /usr/ccs/bin?

Hi all, below is the problem details: ora10g@CNORACLE1>which ld /usr/ucb/ld ora10g@CNORACLE1>cd /usr/ccs/bin ora10g@CNORACLE1>ln -s /usr/ucb/ld ld ln: cannot create ld: File exists ora10g@CNORACLE1> how to link it to /usr/ccs/bin? (6 Replies)
Discussion started by: SmartAntz
6 Replies

7. Solaris

diff b/w /var/log/syslog and /var/adm/messages

hi sirs can u tell the difference between /var/log/syslogs and /var/adm/messages in my working place i am having two servers. in one servers messages file is empty and syslog file is going on increasing.. and in another servers message file is going on increasing but syslog file is... (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

8. Solaris

Problem creating sol8 container using seperate / /usr and /var ufsdumps

Hello experts New to solaris 8 containers and zones in general and I'm having some problems creating a Solaris 8 container using ufsdumps of /, /usr and /var. I have created the zone which worked fine and a running the following command. zoneadm -z zone_s8 install -v -p -a /root.ufs ... (2 Replies)
Discussion started by: BrokeIt
2 Replies

9. UNIX for Dummies Questions & Answers

problem in /var/log/messages and /usr/bin/last

Unfortunately., i had remove the files /var/log/messages and /usr/bin/last in our server, we have to touch another one and change the permissions also but not working still now. help me yours thakshina (2 Replies)
Discussion started by: thakshina
2 Replies

10. Solaris

/var filesystem recovery from other machine

Hi Folks, I'm wordering if I can ufsdump the /var fs from a server1 and create a new /var fs in Server2, that is because some damage happened in the /var fs and we don't have backup of it, I've tried fsck and no sucess at all.. Any ideia how I can recovery that /var fs ? Thanks, ... (0 Replies)
Discussion started by: ramosbrazil
0 Replies
Login or Register to Ask a Question