- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Why tar Can Not Back Up All
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
06-06-2001 11:46 AM
06-06-2001 11:46 AM
I have a script to get tar to backup 3 directories, but only the last directory files are backed up. I wonder why and would like to have some comment.
The codes are like:
--------------------------
#!/bin/sh
cd /disk7/aaa
tar cvf /dev/rmt/c2t0d0BEST /disk7/aaa
#
cd /disk8/bbb
tar cvf /dev/rmt/c2t0d0BEST /disk8/bbb
#
cd /disk3/ccc
tar cvf /dev/rmt/c2t0d0BEST /disk3/ccc
#
#eof
---------------------------------------
So only /disk3/ccc files being backed up. That measn only last line of codes is executed.
Is it strange?
Thanks,
Steven
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 11:51 AM
06-06-2001 11:51 AM
SolutionWithout the no-rewind device file the tape is getting rewound after each tar session, thus each backup overwrites the previous and you are only left with the last backup.
Do the step above and it will work for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 11:53 AM
06-06-2001 11:53 AM
Re: Why tar Can Not Back Up All
This is is easy. Actually all 3 are being backed up but since you are using a rewind device the first two are overwritten each time.
If you will switch to /dev/rmt/c2t0d0BESTn, things will be better.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 11:56 AM
06-06-2001 11:56 AM
Re: Why tar Can Not Back Up All
In addition to the above, you could do :
tar -cvf /dev/rmt/.... -C /disk7/aaa -C /disk8/bbb -C /disk9/ccc etc.
check:
man tar
good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 12:03 PM
06-06-2001 12:03 PM
Re: Why tar Can Not Back Up All
BTW, can someone explain what c2t0b0BESTb and nb means?
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 12:09 PM
06-06-2001 12:09 PM
Re: Why tar Can Not Back Up All
The c?t?d?BESTb are Berkely best density
You add the 'n' c?t?d?BESTn or c?t?d?BESTnb and that makes them no-rewind device files.
As to the difference between AT&T and Berkeley, I'm not sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 01:20 PM
06-06-2001 01:20 PM
Re: Why tar Can Not Back Up All
You can man mt for a very explanation of the berkeley and AT&T tape behavior.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 03:33 PM
06-06-2001 03:33 PM
Re: Why tar Can Not Back Up All
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 06:31 PM
06-06-2001 06:31 PM
Re: Why tar Can Not Back Up All
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2001 05:36 AM
06-07-2001 05:36 AM
Re: Why tar Can Not Back Up All
However, I don't get it is it is still in absolute path that is not what I desire. Otherwise I simply use tar with all directories.
While I cd to proper directory, and have tar to backup, how come I still get absolute path with slash?
Anyway to get a relative path in this case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2001 06:09 AM
06-07-2001 06:09 AM
Re: Why tar Can Not Back Up All
In order to backup with tar directories with relative path, once in the directory use . in your tar:
cd /home; tar -cvf {tapedevice} .
It will archive from this directory as ./files...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2001 08:10 AM
06-07-2001 08:10 AM
Re: Why tar Can Not Back Up All
One more option.
Continue to use the same devicefile you have always used before. Instead, use tar with the
'-r' option. This will append a new file to the end of the archive without regard to its current position. This is most helpful if you rewind or eject the tape and then need to add more to it later.
For example:
tar -rvf /dev/rmt/c4d0t0BEST yourfile
Good Luck,
Curt