Create tar archive files of no larger than 31 GBytes:
tar -cv -M -L 32505856 -f backup.tar ~jfroebe
-c create tar archive
-v verbose output
-M enable multi-volume handling (multple tapes or files)
-L size of file in kilobytes
-f name of first tar archive file
~jfroebe directory that I wish to backup
when 31 GBytes is reached, it will ask you to insert the next file
n backup.tar2 <ENTER>Y<ENTER>
n next ‘word’ is the name of the new file (or tape drive)
Y<ENTER> tar will ask you to change the file ‘backup.tar2′ and confirm tar is to proceed. Since it is a new file, go right ahead and tell it to proceed
Restore the contents of a multi-volume tar file:
tar -xv -M -f backup.tar -f backup.tar2
tar recognizes multiple files in the restore with the only criteria being that they are in order. Meaning, tar won’t be able to restore all of the data if you do:
tar -xv -M -f backup.tar2 -f backup.tar
You can also do this with compression:
tar -cv -z -M -L 32505856 -f backup.tar.gz ~jfroebe
tar -xv -z -M -f backup.tar.gz -f backup.tar2.gz
There are three methods of compressing with the GNU tar, each requires that the programs are installed
bzip2 software package (bzip2)
gzip software package (gzip/gunzip)
ncompress software package (compress/uncompress)
While bzip2 typically provides the best compression, gzip is far more common in corporate environments.
‘compress’ provides the worst compression and is the slowest but is guaranteed to be on all commercial unix boxes
GNU Tar for windows can be obtained GNU Tar and work just the same as the unix versions. Using tar is a great way for tranferring a large file or a whole bunch of files to/from windows while not having to worry about changes in the file names that can sometimes happen with filenames having unicode and/or extended characters.
This blog is protected by Dave's Spam Karma 2: 35137 Spams eaten and counting...
The opinions expressed within are the sole rantings of a raving lunatic and in no way reflect the rantings, fits, tantrums, errors, corrections, allocutions, or aimless thoughts of Sybase or its employees or of TeamSybase or ISUG. Any resemblance to reasonable thought, or any official or published opinion of Sybase, TeamSybase or ISUG is merely coincidental, and should be totally ignored.