- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Selective TAR Backup
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
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
08-25-2004 07:50 AM
08-25-2004 07:50 AM
Any way to accomplish this with tar?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2004 07:57 AM
08-25-2004 07:57 AM
Re: Selective TAR Backup
You can use the -X option of tar to exclude files.
At the moment I am using Linux at home, so can't check if this is also in HP-UX.
HTH,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2004 07:59 AM
08-25-2004 07:59 AM
SolutionDo the following.
cd /opt/sai
ls > file_list
vi file_list
(remove the directory you want to remove)
go to the last of first line and press
Go to the begning of first line and type tar command like, tar cvf /dev/rmt/0m .
Save the file
Run it. #sh ./file_list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2004 08:04 AM
08-25-2004 08:04 AM
Re: Selective TAR Backup
From the directory you want to backup (minus the .snapshot directory)
tar -cvf yourname.tar `ls | grep -v .snapshot`
Notice the backticks, not single quotes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2004 08:44 AM
08-25-2004 08:44 AM
Re: Selective TAR Backup
The solutions mentioned already give you relative backup of the directory and will only eliminate .snapshot in that particular directory, not in any subdirectories that might exist.
Not as simple as it looks for a general case situation. Would be easier with fbackup. Any reason you need to use tar (i.e. portability to other UNIX variants or between older and newer revisions of HP-UX)?
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2004 08:57 AM
08-25-2004 08:57 AM
Re: Selective TAR Backup
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2004 09:00 AM
08-25-2004 09:00 AM
Re: Selective TAR Backup
# cd /opt/sai
# tar -cvf SAI.tar $(find . | egrep -v "^./.snapshot|^\.$")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2004 09:10 AM
08-25-2004 09:10 AM
Re: Selective TAR Backup
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 12:58 AM
08-26-2004 12:58 AM