- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: scp and preserving uid
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
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
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
тАО07-02-2007 07:36 AM
тАО07-02-2007 07:36 AM
scp and preserving uid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 07:42 AM
тАО07-02-2007 07:42 AM
Re: scp and preserving uid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 07:43 AM
тАО07-02-2007 07:43 AM
Re: scp and preserving uid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 08:19 AM
тАО07-02-2007 08:19 AM
Re: scp and preserving uid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 08:31 AM
тАО07-02-2007 08:31 AM
Re: scp and preserving uid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 01:19 PM
тАО07-02-2007 01:19 PM
Re: scp and preserving uid
Of course one way to do this is with NFS if you don't want to use tar/cpio/pax.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2007 03:40 AM
тАО07-03-2007 03:40 AM
Re: scp and preserving uid
# cd source_dir; tar -cf - .|ssh user@targethost "cd target_dir; tar -xvf -)
If done as root, all permissions are preserved... even if the users don't exist on
the target host.
My 2 cents,
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2007 03:42 AM
тАО07-03-2007 03:42 AM
Re: scp and preserving uid
# cd source_dir; tar -cf - .|ssh user@targethost "cd target_dir; tar -xvf -"
My 2 cents,
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2008 12:38 AM
тАО11-28-2008 12:38 AM
Re: scp and preserving uid
# cd source_dir; tar -cf - .|ssh user@targethost "cd target_dir; tar -xvf -"
Its such a wonderful single line command. I didnt quite understand on whats the "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2008 01:16 AM
тАО11-28-2008 01:16 AM
Re: scp and preserving uid
>I didn't quite understand what's the "
The purpose of the double quote is to pass that whole string to ssh to execute. (Single quotes would work too.) Otherwise the semicolon separates the ssh command from the final tar.
You shouldn't be using the archaic ``, replace them by $().