Splitting Large Files to Span Multiple Disks using TAR
Splitting the File
The example below shows the syntax used. Lets say the largefile.tgz is 150 Meg and we need to fit the file on two 100 Meg Zip drives.
tar -c -M –tape-length=102400 –file=disk1.tar largefile.tgz
The value 102400 is 1024 x 100, which will create a 100 Meg file called disk1.tar and then Tar will prompt for volume 2 like below:
Prepare volume #2 for disk1.tar and hit return:
In the time of tape drives you would have taken the first tape out of the machine and inserted a new tape, and pressed returned to continue. As we want Tar to create the remaining 50 Meg in a separate file, we issue the following command:
n disk2.tar
This instructs Tar to continue writing the remaining 50 Meg of largefile.tgz to a file named disk2.tar. You will then be prompted with the line below, and you can now hit return to continue.
Prepare volume #2 for disk2.tar and hit return:
You would repeat this process until your large file has been completely processed, increasing the disk number in the file each time you are prompted.
Putting the File Back Together
tar -x -M --file=disk1.tar largefile.tgz Prepare volume #2 for disk1.tar and hit return: n disk2.tar Prepare volume #2 for disk2.tar and hit return:
Original tutorial (with more information):
http://www.cgi-interactive-uk.com/splitting_large_files.html
Leave a Reply
You must be logged in to post a comment.









