Multi-file archive with Tar

Wednesday, December 1, 2010

Recently, I needed to copy 40GB of home videos out of my ReadyNAS duo and immediately thought about using a USB hard disk. The problem was that the maximum possible size for a file on a FAT32 volume is 4 GB and reformatting my hard disk to NTFS was not an option. So I thought about creating a multi-file archive with Tar, primarily because Tar is the only compression program available on the ReadyNAS out of the box. Here is the recipe for creating multi-file archive with Tar.

Creating the archive

The command line I used is:
$tar -c -M --tape-length=4096000 --file=HomeVideos.tar /media/Videos/HomeVideos
After some time, Tar prompted for volume 2 like this:
Prepare volume #2 for disk1.tar and hit return
I entered the following command line to specify the new filename and pressed RETURN:
n disk2.tar
Tar prompted again, but this time it showed the new filename "disk2.tar" and I pressed RETURN to continue. I repeated the operation about 10 times and was able to copy all these files on my USB drive and then onto my latop.

Putting the videos back together

The process is quite similar to extract the videos (I'm using Cygwin):
$tar -x -M --file=/cygdrive/e/disk1.tar
After some time you'll need to specify the name of the next volume, like this:
Prepare volume #2 for disk1.tar and hit return:
n /cygdrive/e/disk2.tar
I repeated the process until everything was extracted.

0 Comments so far - Add one:

Post a Comment