10-31-2001
tar to tape and back
Howdy,
I'm trying to tar some directories to tape and then extract them from tape on another machine. I was hoping someone could help me with the syntax of the tar commands. Both machines are running Solaris 8.
Need to get all files and directories under the following:
/opt/netscape/server4/docs
/opt/coldfusion
(some of the sub-directories are symbolic links, not sure if that matters)
Once I have that data on tape, how would I extract it to the second machine?
thanks
pmetal
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys and gir.. emm
hey guys! (only kidding girls)
I have been asked to provide a tutorial on how to perform an automatic back up (to tape) for 23 sun sparc workstations networked using an ethernet setup under the UNIX operating system.
Sounds easy enough to you... I've never ever seen... (4 Replies)
Discussion started by: maross
4 Replies
2. UNIX for Advanced & Expert Users
I tried to buckup some oracle archive logs (from a solaris machine) to a remote tape (in a HP-UX machine).
I added the solaris machine name and user to .rhosts, and i tried to use this commande :
tar cvf HPhost:/dev/rmt/0mn /u01/*
The probleme that it gives:
HPhost:/dev/rmt/0mn : No such... (1 Reply)
Discussion started by: lasgaa
1 Replies
3. SCO
i have an ibm machine with dds4 drive running sco. i bought new hp dds4 tape for my back-up. the new tapes are not being read by the system, it says tape error, no such device. i've already clean the drive several times but still the same error occur. i've tried to use the same tape on our windows... (3 Replies)
Discussion started by: yackim
3 Replies
4. UNIX for Advanced & Expert Users
Trying to answer a question about whether tar table-of-contents is a good tool for verifying tape data. (1 Reply)
Discussion started by: tjlst15
1 Replies
5. Filesystems, Disks and Memory
Can I back up all the files I work with each day using tar? (2 Replies)
Discussion started by: jo calamine
2 Replies
6. UNIX for Advanced & Expert Users
Hi,
I have tar: tape blocksize error when launching
# gunzip < TierDB.tar.gz |tar -xvf /data/ora/DREC
tar: tape blocksize error
Can you please help me ? It is urgent.
Many thanks. (1 Reply)
Discussion started by: big123456
1 Replies
7. UNIX for Advanced & Expert Users
Hello,
This might be a dumb question, but I havent been able to find the answer anywhere.
I currently have a backup script that uses 'tar' to backup some files to tape. I need to add a directory to the backup script, but I want to use 'vdump' to back it up to tape.
So my question is can I... (3 Replies)
Discussion started by: xadamz23
3 Replies
8. Solaris
Hi,
I am trying to determine if a tape is full because on 2 different tapes, im receiving 2 different kind of errors:
# uname
SunOS
# /bin/tar cvf /dev/rmt/0n /export/home
a /export/home/jerry/wlserver_10.0.tar.gz 28528 tape blocks
tar: write error: unexpected EOF
# mt -f /dev/rmt/0n... (5 Replies)
Discussion started by: mosies
5 Replies
9. Red Hat
Hi Folks,
Looking for some assistance here on a Dell server connected to a Dell tape robot with Redhat 5.4 and Netbackup 6.5.
Netbackup thinks the tapes are all present and working, but they are not - we lost the internal encryption keys earlier but think that they are reinstated as the... (0 Replies)
Discussion started by: gull04
0 Replies
10. Shell Programming and Scripting
Hi,
I need some help writing a perl script to tar all log file to a directory and then delete the log files. Can some one please help me on this? I m Not very good with perl scripting...
Thanks
KK (4 Replies)
Discussion started by: karthikk0508
4 Replies
tar(5) File Formats Manual tar(5)
Name
tar, mdtar - tape archive file format
Description
The tape archive command dumps several files, including special files, into one, in a medium suitable for transportation.
A tape or file is a series of blocks. Each block is of size TBLOCK. A file on the tape is represented by a header block, which describes
the file, followed by zero or more blocks, which give the contents of the file. At the end of the tape are two blocks filled with binary
zeros, as an end-of-file indicator.
The blocks are grouped for physical I/O operations. Each group of n blocks (where n is set by the option on the command line, and the
default is 20 blocks) is written with a single system call; on 9-track tapes, the result of this write is a single tape record. The last
group is always written at the full size, so blocks after the two zero blocks contain random data. On reading, the specified or default
group size is used for the first read, but if that read returns less than a full tape block, the reduced block size is used for further
reads.
The following is an example of a header block:
#define TBLOCK 512
#define NAMSIZ 100
union hblock {
char dummy[TBLOCK];
struct header {
char name[NAMSIZ];
char mode[8];
char uid[8];
char gid[8];
char size[12];
char mtime[12];
char chksum[8];
char linkflag;
char linkname[NAMSIZ];
char rdev[6]
} dbuf;
};
The name field is a null-terminated string. The other fields are 0-filled octal numbers in ASCII. Each field (of width w) contains w
minus 2 digits, a space, and a null, except size and mtime , which do not contain the trailing null. The name field specifies the name of
the file, as specified on the command line. Files dumped because they were in a directory that was named in the command line have the
directory name as prefix and /filename as suffix. The field specifies the file mode, with the top bit masked off. The uid and gid fields
specify the user and group numbers that own the file. The size field specifies the size of the file in bytes. Links and symbolic links
are dumped with this field specified as zero. The mtime field specifies the modification time of the file at the time it was dumped. The
chksum field is a decimal ASCII value, which represents the sum of all the bytes in the header block. When calculating the checksum, the
chksum field is treated as if it were all blanks. The linkflag field is ASCII 0 if the file is normal or a special file and ASCII 1 if it
is a hard link, and ASCII 2 if it is a symbolic link. The name to which it is linked, if any, is in linkname, with a trailing null.
Unused fields of the header are binary zeros and are included in the checksum. The rdev field encodes the ASCII representation of a device
special file's major and minor device numbers.
The first time a given i-node number is dumped, it is dumped as a regular file. The second and subsequent times, it is dumped as a link
instead. Upon retrieval, if a link entry is retrieved, but not the file it was linked to, an error message is printed and the tape must be
manually rescanned to retrieve the linked file.
The encoding of the header is designed to be portable across machines.
Restrictions
Names or link names longer than NAMSIZ produce error reports and cannot be dumped.
See Also
tar(1)
tar(5)