Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

owner of files in /dev changed to root after bootable backup

Status
Not open for further replies.

grahgrah

Programmer
Jul 3, 2003
1
0
0
NL
We use aix 4.3.3 for 1 of our systems. We made a bootable backup with mksysb. We booted from this tape to restore our rootvolume. However after restoring from this tape the owner of some the devicefiles in /dev were changed to root instead of sybase. Some of the files in /dev need to have the owner user sybase. The resulted in a system which didn't work at all!! Can anyone explain why this happens after a restore? and not after a normal reboot?
 
This was an issue at my former company (Fortune 500) where the files had to be owned by sybase. AIX has root own the /dev files, so the workaround was to create a script and call it from /etc/inittab to chown the owner:group of the files in /dev before the app needing those files came up.
 
Hi,
the problem is, that restore from an mksysb only restores the default and found devices. To get the custom devices back, you need to restore all files from the /dev of the mksysb. Just Google for:

aix restore files mksysb

Else here is an AIX newsletter we use, if we have to do it:

Restoring individual files from a mksysb tape
To restore individual files or directories from a mksysb tape, find out the blocksize of the fourth image. To obtain this information, run the following commands:
cd /tmp
tctl -f /dev/rmt# rewind (# to be replaced by a number)
chdev -l rmt# -a block_size=512
restore -s2 -xqdvf /dev/rmt#.1 ./tapeblksz
cat ./tapeblksz
The output that is given is the blocksize to which the tape drive was set when the mksysb was made.

Next, set the blocksize of the tape drive accordingly by running the following command:
chdev -l rmt# -a block_size=[number in the
./tapeblksz file]
Restore the files or directories by running the following commands:
cd / (if the file is to be restored to its original place)
tctl -f /dev/rmt# rewind
restore -s4 -xqdvf /dev/rmt#.1 ./dir/filename (for one file)
OR

restore -s4 -xqdvf /dev/rmt#.1 ./dir (for all files in dir)


laters
zaxxon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top