Operating System - HP-UX
1748128 Members
4200 Online
108758 Solutions
New Discussion юеВ

file owner change after restore oracle files

 
Fauziah Mahdan
Super Advisor

file owner change after restore oracle files

HI all,
I have backup filesystem belongs to oracle.
At DR site I create this oracle user and then u01 folder.
After restore the u01 contents I found out the owner was sshd and group remain oinstall.
Can inform me why this happend?
I have manually change the owner but when bring up db, internal error appear.
12 REPLIES 12
R.O.
Esteemed Contributor

Re: file owner change after restore oracle files

Do you backuped the FS in a system and restored in another system?. If so, the oracle user in the destination system might have a different uid than the uid in the source system. The uid in source system might be the same than the sshd user in destination system.
Remember the system works with uid-gid, not with user-group names.

Regards,
"When you look into an abyss, the abyss also looks into you"
Fauziah Mahdan
Super Advisor

Re: file owner change after restore oracle files

Yes I backup using FS it is only oracle binary file I did cold backup to be save.
Ok yes the server is totally diff server that is why I have to create oracle id.
I will check the uid now.
But how to get the same uid? Can it be changed?
R.O.
Esteemed Contributor

Re: file owner change after restore oracle files

Hi,

Well, you can specify the uid when creating the new user with "useradd". If it is already crreated, you can modify it when "usermod". See "man usermod":

"Change otto's user ID to 333 and change the login name to bob.

usermod -u 333 -l bob otto"

In yor case, I think you have to change the uid for user "sshd" first, to release the uid you want for "oracle" user and then change the uid for "oracle" user.

Regards,
"When you look into an abyss, the abyss also looks into you"
Fauziah Mahdan
Super Advisor

Re: file owner change after restore oracle files

ok let me try first.
Thanks
R.O.
Esteemed Contributor

Re: file owner change after restore oracle files

Hi,

You can do it also with SAM. I think "usermod" change the files owned for the uid changed and SAM do it for sure. This is what it says when you change a user id:
------------------------------------------
You are changing the UID for user "userX" from "111" to "222". The
password file will be updated to reflect this change.

The UID is used to determine user file ownership. Would you like to
run a background task on this system to update all files owned by
this user to the new UID?
------------------------------------------

Regards,
"When you look into an abyss, the abyss also looks into you"
Fauziah Mahdan
Super Advisor

Re: file owner change after restore oracle files

I have check in DR oracle in prod and DR are same uid =106.

But why it chnage to sshd?
Confuse
Steven Schweda
Honored Contributor

Re: file owner change after restore oracle files

> I have backup filesystem belongs to oracle.

Backup HOW, exactly?

> After restore [...]

Restore HOW, exactly?


> Can inform me why this happend?

I don't even know _what_ happened yet.

> But why it chnage to sshd?

That might depend on what you did (which is
a mystery).
Bill Hassell
Honored Contributor

Re: file owner change after restore oracle files

The name oracle is nothing more than an alias to the user ID number and the only location where oracle and the UID are connected is in the /etc/passwd file. When you build a DR center, one of the first things to do is to duplicate user ID's so the names will match up. Your backup program (tar, cpio, fbackup...) save the files as they are stored on disk -- the user name is only shown when you use a translator such as ll which takes the UID number on disk and gives it a name from the passwd file.

You will find that your passwd file on production is quite different than the one at DR. That will have to be fixed before you restore additional files and directories.


Bill Hassell, sysadmin
Fauziah Mahdan
Super Advisor

Re: file owner change after restore oracle files

Ok the OS at DR not restore via make tape recovery from prod server.
It was installed using CD.
Then I create oracle user, install patch required, create lvol for oracle like u01, u02.
Restore FS from Data Protetor (backup also using DP).

Bill should I copy the etc/passwd from pord to DR?