- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar or not to tar that is the question
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
01-05-2007 03:55 AM
01-05-2007 03:55 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2007 04:01 AM
01-05-2007 04:01 AM
Re: tar or not to tar that is the question
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2007 04:17 AM
01-05-2007 04:17 AM
Re: tar or not to tar that is the question
temporarily change the permisssions on the subdirectory so tar can not back it up.
Then run your tar.
Then reset the permissions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2007 04:34 AM
01-05-2007 04:34 AM
Re: tar or not to tar that is the question
Alternatively you could use HP's fbackup which has the -e option,
or you could do it the die-hard way with find and -prune (which involves some quoted bracketing) and pipe into cpio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2007 04:59 AM
01-05-2007 04:59 AM
Re: tar or not to tar that is the question
cd /home (whatever your home dir is)
tar cvf tarfile.tar `ls | grep -v exclude-dir-name`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2007 08:32 PM
01-07-2007 08:32 PM
SolutionCoolmar's solution works only for toplevel dirs to exclude. A find/cpio solution can exclude directories at lower levels as well.
The following example excludes directories 'tmp' and 'debug':
cd
find . \( -name tmp -o -name debug \) -prune -o type f -print | cpio -pdv /backup/home.cpio
mfG Peter