- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Copy multiple Folders, subfolders, and keep pe...
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
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
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
10-31-2012 07:17 AM
10-31-2012 07:17 AM
Copy multiple Folders, subfolders, and keep permissions
Is there a way to copy multiple folders and sub folders and keep permissions? I have mulitple folders and each one has subfolders in them, I need to keep owners , groups, permission, etc. This is for a go-live on a new server.
Thanks
i know scp and rcp doesnt keep permissions, and i cant tar this stuff up due to size..
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2012 07:49 AM
10-31-2012 07:49 AM
Re: Copy multiple Folders, subfolders, and keep permissions
> [...] i cant tar this stuff up due to size..
That might depend on exactly what "tar this stuff up" means to you.
> [...] a new server [...]
Not a very detailed description of anything.
uname -a
A common method is a "tar" pipeline, which does not require saving a
giant "tar" archive anywhere. For example:
( cd src ; tar cf - dir ) | ( cd dst ; tar xf - )
This simple example depends on transparent access to the source and
destination file systems. NFS can help for a remote system, or
rsh/remsh or ssh can be used on one side or the other. Compression
(typically bzip2 or gzip) can be added (to both sides), if the CPUs are
faster than the interconnection. GNU "tar" or pax may be needed if the
native "tar" program has troubling file-size or name-length limits.
More complex examples abound on the Web (or even on this forum, although
older ones may have been lost in the Great Forum Upgrade).
- Tags:
- pax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2012 08:39 AM
10-31-2012 08:39 AM
Re: Copy multiple Folders, subfolders, and keep permissions
Hi Marvin
you although could use rsync, if you don't want to nfs-mount one server to the other.
Check the manual page.
Bye
Ralf
- Tags:
- rsync
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2012 10:00 AM - edited 10-31-2012 10:00 AM
10-31-2012 10:00 AM - edited 10-31-2012 10:00 AM
Re: Copy multiple Folders, subfolders, and keep permissions
Shalom,
Even after years of complaining openssh(secure shell) scp -rp command does not preserve ownership and permissions.
What might is doing a read-write NFS mount of the destimation file system and doing a cp -rp command. That command seems to do abetter job.
Or using tar to do the job in smaller chunks, though that is clunky.
Regards,
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com