- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 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
Forums
Discussions
Discussions
Discussions
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
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 $().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2008 01:37 AM
11-28-2008 01:37 AM
Re: scp and preserving uid
You shouldn't be using the archaic ``, replace them by $().
-----------
Thanks for the reply. Ok got it. Just need to test first using the $() thing.
I'm a bit confused on which protocol that the command do. It looks like it doesnt use any ftp, sftp, scp command; just sending a tar archive over the SSH tunnel. Am i wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2008 01:46 AM
11-28-2008 01:46 AM
Re: scp and preserving uid
(If you are going to be asking more questions, you should create your own thread so you can assign points.)
>Just need to test first using the $() thing.
This example doesn't use $().
>just sending a tar archive over the SSH tunnel.
Yes, it sends it to the stdin of ssh, then to tar(1).