- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: TAR command
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
10-22-2002 08:14 AM
10-22-2002 08:14 AM
TAR command
I want to backup some files in a tar file, named day_of_month.tar and send to the tape. But I do not have free space to create this tar file in my hard disk and then send to tape. So, is there a way of creating this file on the tape without using a temp file in the hard disk ?
I??m doing this:
%tar cvf /home/temp.tar /opt /var /work
%tar cvf /dev/rmt/0mn /home/temp.tar
I want to avoid the creation of temp.tar.
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2002 08:18 AM
10-22-2002 08:18 AM
Re: TAR command
is all you require
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2002 08:22 AM
10-22-2002 08:22 AM
Re: TAR command
You can just tar them directly to the tape drive
tar cvf /dev/rmt/0mn /opt /var /work
They will not be in a tar file on the tape but just the actual files archived with absolute pathnames.
So if you think you may want to extract them to another location, you may wish to tar them up as relative pathnames as follows:
cd /
tar cvf /dev/rmt/0mn ./opt ./var ./work
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2002 08:24 AM
10-22-2002 08:24 AM
Re: TAR command
I don't know different sizes of directories, but perhaps you can try this:
%tar cvf /home/opt.tar /opt
compress /home/opt.tar
%tar cvf /home/var.tar /var
compress /home/var.tar
%tar cvf /home/work.tar /work
compress work.tar
%tar cvf /home/temp.tar /home/*.Z (files compressed)
Regards, Vicente.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2002 10:43 AM
10-22-2002 10:43 AM
Re: TAR command
I agree with all but these way I am going to have a lot files in the tape instead of just one. With just one file I could set the day of the backup, for example, I want to have in the tape a file called 10_22_2002.tar that contains all the files that I did backup. It helps me if I need to restore some file.
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2002 11:25 AM
10-22-2002 11:25 AM
Re: TAR command
To help identify the date the tar was written to the tape, you can do something like this:
cd /
DATEFILE=$(date +%m_%d_%Y)
touch $DATEFILE
tar cvf /dev/rmt/0m $DATEFILE ./opt ./var ./work
rm $DATEFILE
Whenever you want to see the date the tar was created, simply do:
tar tf /dev/rmt/0m | head -1
Running this today creates an empty file named 10_22_2002. It will be the first file on the tape and will be listed by the "tar tf /dev/rmt/0m | head -1" command.
This means your tar will contain an extra file (10_22_2002) but it's an empty file that shouldn't present a problem.
Darrell