I am trying to back up ("copy") my home directory to an external hard drive so that I can send the computer in for repairs. Naturally, the family external HD is FAT32, which means I have a max filesize of 2G.

I have a few files which are greater than 2G - some tarballs, VM images, etc. I figure the easiest thing to do is to use split to split up these files into FAT32-friendly chunks.

My question is: I don't have enough space on my HD to split each file and store the component parts. I want to do something like split bigfile.tar -o /mnt/external_drive, but the man page doesn't seem to indicate such an option.

What would be the best way to manage this?

Alternately, I could just tar-up /home/rascher, but that has the same problem - I don't have enough local disk space to retain a copy of the tarball, and if I try tar -cvzf /mnt/external_drive/backup.tar ./ then I will run into the same 2G boundary.

What should I do?

link|improve this question

Did you ask the vendor if you can send the computer without the disk? – Posipiet Dec 26 '09 at 23:01
feedback

2 Answers

up vote 3 down vote accepted

the backup:

tar cf - /home/rascher | split -b 2000m - /mnt/external_drive/backup/rascher_home

and the restore:

cat /mnt/external_drive/backup/rascher_home* | ( cd / && tar xf - )

This way you don't use up twice the disk space (no need to create bigfile.tar.)

link|improve this answer
It hadn't occurred to me to place a path in split's "PREFIX" option. This worked beautifully, thanks so much. – rascher Dec 29 '09 at 3:44
for my own reference: cat myarchive* | ( cd /home/rascher/testuntar/2 && tar --extract home/rascher/testtar/.e ) extracts a specific item. – rascher May 14 '10 at 3:27
feedback

Perhaps this:

$ cd /mnt/external_drive && split /path/to/original/bigfile.tar
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.