- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Can't preserve file ownership using tar
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2000 12:13 PM
тАО08-07-2000 12:13 PM
Can't preserve file ownership using tar
Thanks for any help
Phill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2000 12:25 PM
тАО08-07-2000 12:25 PM
Re: Can't preserve file ownership using tar
I would expect the name & group to be "correctly" restored if in fact the uid & gid of the files are present on both system and map to the same names.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2000 12:28 PM
тАО08-07-2000 12:28 PM
Re: Can't preserve file ownership using tar
To do cpio from one FS area to another FS area:
cd
find ls . | cpio -pmuldv /
This will preserve all ownerships and permissions.
(Can also be done system to system across the network - but with the above listed syntax)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2000 02:17 PM
тАО08-07-2000 02:17 PM
Re: Can't preserve file ownership using tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2000 02:52 PM
тАО08-07-2000 02:52 PM
Re: Can't preserve file ownership using tar
First thing you should check is do you have same user on both the systems and same UID's. Tar takes the backup of UIDs and restores them in the similar manner. From your question it looks like you are using the root user for this and I do not see the problem with this.
The second thing you should also look for is the umask for user you are using for restore. Some times I have noticed, during file restore, the file permissions are based on umask.
good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2000 04:33 PM
тАО08-07-2000 04:33 PM
Re: Can't preserve file ownership using tar
man pax
That might help. It's unusual that tar doesn't work. You don't have any acl's
or it's an nfs filesystem?
Where are you try to extract to?
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2000 12:13 AM
тАО08-08-2000 12:13 AM
Re: Can't preserve file ownership using tar
I'm then extracting the archive, from /home on the target machine (again as root).
The usernames, uid's and gid's are identical on both machines and the uid/gid is recorded correctly in the archive (as seen by tar tvf).
When the archive is extracted, all directories seem to have the correct ownership but files within those directories are now owned by root. The permissions of the files (i.e rwx) are preserved correctly.
The permissions of the /home directory on the target machine is as follows...
drwxr-xr-x root root
Thank you all for your suggestions for alternative approaches - I'm looking into them now, but I would really like to get to the bottom of why tar won't work.
Cheers
Phill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2000 12:55 AM
тАО08-08-2000 12:55 AM
Re: Can't preserve file ownership using tar
I must confess that I've never seen this problem before. What versions of HP-UX are involved? Is anything special configured eg trusted systems etc?
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2000 05:31 AM
тАО08-08-2000 05:31 AM
Re: Can't preserve file ownership using tar
tar cannot cope with uid's greater than 60000 which, of course is exactly what we use here!
Thanks for all your suggestions
Phill