- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: About Tar
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
05-02-2003 04:38 AM
05-02-2003 04:38 AM
# tar cvf /dev/rmt0 /tmp/file1
# tar rvf /dev/rmt0 /tmp/file2
# tar tvf /dev/rmt0
# -rw-r--r-- bin bin 102575 date time tmp/file1 ,
why the file file2 can't be tar ? thx.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2003 04:44 AM
05-02-2003 04:44 AM
Re: About Tar
you have to rewind the tape before using ' tar rvf'
otherwise
#tar cvf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2003 04:44 AM
05-02-2003 04:44 AM
SolutionMove all to tape at once
# tar cvf /dev/rmt/0m /tmp/file1 /tmp/file2
Use no-rewind tape
# tar cvf /dev/rmt/0mn /tmp/file1
# tar cvf /dev/rmt/0mn /tmp/file2
# mt -t /dev/rmt/0m rewind
Enjoy, have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2003 05:05 AM
05-02-2003 05:05 AM
Re: About Tar
# tar cvf /dev/rmt0 /tmp/file1
# mt -t /dev/rmt/0m rewind
# tar rvf /dev/rmt0 /tmp/file2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2003 05:15 AM
05-02-2003 05:15 AM
Re: About Tar
Again, two options
1. Put both files to tape in one go
# tar cvf /dev/rmt/0m /tmp/file1 /tmp/file2
(note that /dev/rmt/0m is auto-rewind)
a. retreive file1
# mt -t /dev/rmt/0m rewind
# tar xvf /dev/rmt/0m /tmp/file1
b. retreive file2
# mt -t /dev/rmt/0m rewind
# tar xvf /dev/rmt/0m /tmp/file2
c. retreive both files
# mt -t /dev/rmt/0m rewind
# tar xvf /dev/rmt/0m
2. put the files on seperate logical tape partitions
# tar cvf /dev/rmt/0mn /tmp/file1
# tar cvf /dev/rmt/0m /tmp/file2
Now the first (0mn is a NO-REWIND device) file is on the first logical parttition, and file2 is on the second
a. retrieve file1
# mt -t /dev/rmt/0m rewind
# tar xvf /dev/rmt/0m
b. retreive file2
# mt -t /dev/rmt/0m rewind
# mt -t /dev/rmt/0m fsf 1
# tar xvf /dev/rmt/0m
c. retreive both files
# mt -t /dev/rmt/0m rewind
# tar xvf /dev/rmt/0mn
# tar xvf /dev/rmt/0m
Enjoy, have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2003 05:58 AM
05-02-2003 05:58 AM
Re: About Tar
thx r reply, i perfer the solution 1 but still hv question , in my case , i can't run " tar cvf /dev/rmt/0m file1 file2" , cos there are some existing files in the tape ( it was backup previosly , ) , i don't want to overwrite the files with the new files so i need to append , how can I append files when the tape already have some data ? thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2003 06:01 AM
05-02-2003 06:01 AM
Re: About Tar
# mt -t /dev/rmt/0m eof
Which will put the tape at the end of the data
# man mt
will give you all the options
Enjoy, have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 01:40 AM
05-06-2003 01:40 AM
Re: About Tar
#tar -cvf /dev/rmt/0m /tmp/file1
#mt -t /dev/tape eof
# tar -r -vf /dev/rmt/0m /tmp/file2
# tar -tvf /dev/rmt/0m /tmp/file2
I still can't append the file to the tape , what can i do? thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 01:51 AM
05-06-2003 01:51 AM
Re: About Tar
Don't forget to use the 0mn (non-rewind) tape device.
Cheers
Keely
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 01:53 AM
05-06-2003 01:53 AM
Re: About Tar
#tar cvf /dev/rmt0mn /tmp/file1 (no rewind)
#tar cvf /dev/rmt0m /tmp/file2 (append 2nd file and tape will rewound and will be at the beginning)
#mt -f /dev/rmt0mn fsf 1
moves tape forward by 1 archieve.
#tar tvf /dev/rmt0mn /tmp/file2 (will list file2)
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 03:01 AM
05-06-2003 03:01 AM
Re: About Tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 03:35 AM
05-06-2003 03:35 AM
Re: About Tar
Enjoy, have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 09:32 PM
05-06-2003 09:32 PM
Re: About Tar
but how can i list file1 and file 2 ( not just file2) ? thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 09:52 PM
05-06-2003 09:52 PM
Re: About Tar
Mr Kumar's procedure highlights what must be done.