- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Backup and restore with tar and mt
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
09-16-2002 10:26 AM
09-16-2002 10:26 AM
Everyday I do a backup with tar cvf current_date.tar ./ in the current directory, where current_date is the time backup runs. So each day I have one tar file. I want to know how can I access the tape to display the files ? Supose today is friday and I want to restore the backup of last tuesday, how can I return three days and then restore ? I know it should be something like this :
mt -t /dev/rmt/0mn bsf 3 and then tar tvf ... Am I right ?
Can I backup files using fbackup and tar in the same tape ?
Thanks all,
Mauro
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 10:32 AM
09-16-2002 10:32 AM
Solutiontar -cvf /dev/rmt/
the default device for tar is /dev/rmt/0m.... if you run an ioscan -funC tape, it will report the tape drives that are available... if the one you want to use is not the default, then you will need to specify the device:
tar -cvf /dev/rmt/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 10:40 AM
09-16-2002 10:40 AM
Re: Backup and restore with tar and mt
tar cvf will overwrite , you need to use tar rvf to append to the tape , and then you cando the mt fsf and resoter , the better way would be to use fbackup or omni back
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 10:40 AM
09-16-2002 10:40 AM
Re: Backup and restore with tar and mt
Thanks,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 10:47 AM
09-16-2002 10:47 AM
Re: Backup and restore with tar and mt
If your data is not being overwritten, then you may use the following to verify your data in the tape.
tar -tvf /dev/rmt/0mn
then, restore by
tar -xvf /dev/rmt/0mn bsf 3
Regards,
Anil (hope this helps)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 10:49 AM
09-16-2002 10:49 AM
Re: Backup and restore with tar and mt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 11:00 AM
09-16-2002 11:00 AM
Re: Backup and restore with tar and mt
# to create the original tape tar
tar -cvf /dev/rmt/
# to append to it
tar -rvf /dev/rmt/
# to view
tar -tvf /dev/rmt/0m
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 11:17 AM
09-16-2002 11:17 AM
Re: Backup and restore with tar and mt
1) tar cvf /dev/rmt/0mn test.tar
2) mt -t /dev/rmt/0mn bsf 1
3) tar tvf /dev/rmt/0mn
and received the message:
Tar: blocksize = 0; broken pipe?
What is it ?
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 11:19 AM
09-16-2002 11:19 AM
Re: Backup and restore with tar and mt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 11:23 AM
09-16-2002 11:23 AM
Re: Backup and restore with tar and mt
you want to backup the contents of /home on tape at default device /dev/rmt/0m
tar -cvf /dev/rmt/0m /home
that will create the tar image on the tape at device /dev/rmt/0m... and since this is the default tape device, the following will do the exact thing
tar -cv /home (drop the f and device since we use defaults)
to review what is now on tape:
tar -rv or tar -rvf /dev/rmt/0m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 11:25 AM
09-16-2002 11:25 AM
Re: Backup and restore with tar and mt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 12:19 PM
09-16-2002 12:19 PM
Re: Backup and restore with tar and mt
It is as simple as this .
When you use /dev/rmt/?mn where ? stands for instance number of your tape. The media does not rewind after backup. but beware when u eject the tape physically out of the drive ,it goes to the begining. Let's forget abt that part , ie. assume u are not taking the tape out of the drive.... the backup happens goes this.... Scenario where i am trying to backup "kaps.txt" file in to the tape everyday.
Monday .... tar cvf /dev/rmt/0mn ./kaps.txt
Tuesday .... tar cvf /dev/rmt/0mn ./kaps.txt
Wednesday .... tar cvf /dev/rmt/0mn ./kaps.txt
Now on wednesday if u wanna restore Monday's kaps.txt, u need to do the following
mt -t /dev/rmt/0mn bsf 3
tar tvf /dev/rmt/0mn (for listing )
tar xvf /dev/rmt/0mn (for extracting)
Now, if u wanna read tuesday's content , u need to perform the following,
mt -t /dev/rmt/0mn fsf 1
tar tvf /dev/rmt/0mn (for listing )
tar xvf /dev/rmt/0mn (for extracting)
Hope it's pretty clear now
kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 12:49 PM
09-16-2002 12:49 PM
Re: Backup and restore with tar and mt
while reading from tape, you will be better of by starting at starting point (bot).
#mt -t /dev/rmt/0mn rew
#mt -t /dev/rmt/0mn fsf 1
#tar tvf /dev/rmt/0mn
Thanks.
Prashant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2002 03:17 PM
09-16-2002 03:17 PM
Re: Backup and restore with tar and mt
tar tf /dev/rmt/0m > tuesday_table.list
Good Luck.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 04:18 AM
09-17-2002 04:18 AM
Re: Backup and restore with tar and mt
I??m still having problems...
I did this,
1) tar cvf /dev/rmt/0mn test.tar
appears the message:
a test.tar 20 blocks
2) mt -t /dev/rmt/0mn bsf 1
return 1 file, in the start point of test.tar, I hope.
3) tar tvf /dev/rmt/0mn
Tar: blocksize = 0; broken pipe?
Unfornately it goes wrong. I was expecting to see test.tar
Any ideas ?
Regards,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 01:03 PM
09-17-2002 01:03 PM
Re: Backup and restore with tar and mt
One thought would be to put down a larger file on tape, suppressing the rewind, and physically pull the tape out to see that it is truly NOT rewound, just to convince yourself that the device driver is leaving the tape at the end point.
Just a thought.
- Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 01:10 PM
09-17-2002 01:10 PM
Re: Backup and restore with tar and mt
tar -cvf /dev/rmt/0m /etc/hosts .... this will create a tar archive of the hosts file on the default device (/dev/rmt/0m)... don't mess with no-rewind option (/dev/rmt/0mn), you don't need it.
to check it...
tar -tv
-or-
tar -tvf /dev/rmt/0m
don't try and get too creative with bsf, etc... it will be really hard to keep straight when you get a bunch of files on one tape anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 01:16 PM
09-17-2002 01:16 PM
Re: Backup and restore with tar and mt
I think Mauro's point is he is putting multiple days of archives on the same tape, but if he wants to see the archive from 3 days earlier, he rewinds the tape 3 files back to retreive it. That's why he's leaving the tape at the end point.
My gut tells me his tape drive is rewinding.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 01:32 PM
09-17-2002 01:32 PM
Re: Backup and restore with tar and mt
I'll hold off on any more comments here until our suthor comes back with more