Advertisement

08.15.2007 at 06:01AM PDT, ID: 22763933
[x]
Attachment Details

How to copy from a server to another while preserving owner data, permissions AND timestamp?

Asked by tonikaram in HP-UX Unix, Unix Operating Systems

Tags: copy, server, from, another

When I copy using rcp -rp from one HP_UX server to another, the following happens:

- the timestamp on directories and files is maintained, which is good
- the permissions of files seems to remain in some cases.
- the ownership data (root, sybase, etc) is LOST and the user making the operation becomes the new owner on the destination server.

when I copy using tar cvf - and then untar xvf-, the following happens:

- the timestamp on directories (not files) is LOST, and the time of copy is written
- the permissions of files seems to remain in some cases.
- the ownership data seems to remain in some cases.

What is the definite way of copying directories/files from one server to another under HP_UX to maintain owner, permissions, and timestamp (of both files and directories)?

(something like rcp -rp server:/opt/admin/bin/* for example)

Thanks,
Kay


Start Free Trial
 
Loading Advertisement...
 
[+][-]08.15.2007 at 04:31PM PDT, ID: 19704383

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.15.2007 at 10:15PM PDT, ID: 19705624

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.15.2007 at 11:25PM PDT, ID: 19705823

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.16.2007 at 12:31AM PDT, ID: 19706062

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.16.2007 at 04:26PM PDT, ID: 19713555

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.16.2007 at 04:28PM PDT, ID: 19713562

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.17.2007 at 12:44AM PDT, ID: 19715168

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.17.2007 at 01:34AM PDT, ID: 19715326

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.17.2007 at 04:02AM PDT, ID: 19715797

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.10.2008 at 07:21AM PDT, ID: 21086562

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.14.2008 at 04:00PM PDT, ID: 21130373

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: HP-UX Unix, Unix Operating Systems
Tags: copy, server, from, another
Sign Up Now!
Solution Provided By: Computer101
Participating Experts: 5
Solution Grade: A
 
 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
08.15.2007 at 04:31PM PDT, ID: 19704383
Tar has flags for maintaining these properties. They require that the extracting user will be root, and no other user. Only root can preserve times, ownerships and permissions.
 
08.15.2007 at 10:15PM PDT, ID: 19705624
Hi,

Please note that the users on both servers must have the same uid and gid since tar will only record uid and gid.

 
08.15.2007 at 11:25PM PDT, ID: 19705823
Thanks for pointing that out. I should have mentioned it myself.
 
08.16.2007 at 12:31AM PDT, ID: 19706062
I will test the different settings of tar and let you know.

Kay
 
08.16.2007 at 04:26PM PDT, ID: 19713555
I suggest you to use scp instead of rcp. Make sure you have the same UIDs and GIDs for users (check passwd file). The best way is actualy combination: tar && (gzip || compress) && scp
 
08.16.2007 at 04:28PM PDT, ID: 19713562
There is also rsync for HP-UX which is a good solution if you need to synchronize files between machines, on the same machine and even plain copying ...
 
08.17.2007 at 12:44AM PDT, ID: 19715168
Scp is just a secure copy, does it maintain timestamp?
Regarding rsync, any help on syntax? do i need to install something additional?

I just found that tar/untar does NOT preserve the timestamp of new directories.

Thanks,
Kay
 
08.17.2007 at 01:34AM PDT, ID: 19715326
Unfortunately, I do not have an HP-UX available to me right now, however, I do have other *nix systems, and what you're saying is a surprise, as far as I know.

Tar does maintain all permissions, ownerships and timestamps, at least for me, where it is being used in various locations in backup scripts. You could try using GNU tar for this purpose yourself. Maybe HP's has some built-in limitations.
 
08.17.2007 at 04:02AM PDT, ID: 19715797
The trick is if you copy a directory, where this directory already exists on the destination server, then the timestamp is preserved. But if you create a new directory on server A at 11:00 and tar/untar it to server B at 11:30 it will have timestamp 11:30 on server B

Kay
 
03.10.2008 at 07:21AM PDT, ID: 21086562
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup Zone:
PAQ - Refund Points

Any objections should be posted here in the next 4 days. After that time, the question will be closed.
JustUNIX, Experts Exchange Cleanup Volunteer
 
03.14.2008 at 04:00PM PDT, ID: 21130373
PAQed with points refunded (500)

Computer101
EE Admin
Accepted Solution
 
 
20080716-EE-VQP-32 / EE_QW_2_20070628