- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- Copy multiple Folders, subfolders, and keep permis...
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
Copy multiple Folders, subfolders, and keep permissions
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-31-2012 07:17 AM
10-31-2012 07:17 AM
Copy multiple Folders, subfolders, and keep permissions
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-31-2012 07:49 AM
10-31-2012 07:49 AM
Re: Copy multiple Folders, subfolders, and keep permissions
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).
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-31-2012 08:39 AM
10-31-2012 08:39 AM
Re: Copy multiple Folders, subfolders, and keep permissions
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
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
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP