I'm trying to backup my VirtualBox, but when I try to copy the .VirtualBox directory to my external hard drive I get an "File too large" error:

[130 amanda@luna ~]$ cp -r .VirtualBox /media/LACIE/Luna/Jun012011/VirtualBox
cp: writing `/media/LACIE/Luna/Jun012011/VirtualBox/Machines/Astro/Snapshots/{9fe69a30-d308-4754-b4e4-928eb90f93d2}.vdi': File too large
cp: writing `/media/LACIE/Luna/Jun012011/VirtualBox/HardDisks/Astro.vdi': File too large

[1 amanda@luna ~]$ ls -alh .VirtualBox/HardDisks/Astro.vdi 
-rw------- 1 amanda amanda 5.0G 2010-04-30 17:41 .VirtualBox/HardDisks/Astro.vdi

What should I be looking for here?


2 Answers 2


/media/LACIE sounds like you're handling a pre-formatted drive, most likely with the FAT32 filesystem. According to Wikipedia, the maximum file size for FAT32 is about 4GB.

I suggest to reformat the drive to either ext4 (for supporting Linux file permissions) or NTFS (if you need to share the drive with windows users).

How funny, but you've now to backup your backup first before reformatting ;)

  • Get a load of that. Sure enough, 'tis FAT. I actually added an ext3 partition at some point (probably b/c I was having the same problem last time I backed anything up, which was a very long time ago) so I can work around the FAT drive.
    – Amanda
    Jun 1, 2011 at 18:08
  • ext2 is also an option for Windows interop, but NTFS is the easiest since most modern Linux/BSD distros and Mac OS include the ability to at least read NTFS partitions out of the box. You can leave read/write drivers on the hard drive to install on other systems. Using ext2, ExFAT, HFS, or any other FS requires getting drivers onto other systems via some other method just to read the drive.
    – afrazier
    Jun 1, 2011 at 18:12

If you need to keep the fat32 filesytem there is a way around the limit.

There is a command called split that will let you split an archive into smaller parts.

 -b, --bytes=SIZE
              put SIZE bytes per output file


dd if=/dev/zero bs=1M count=150 >test

150+0 records in
150+0 records out
157286400 bytes (157 MB) copied, 0.439344 s, 358 MB/s

split test -b 10000000
ls -l 157286400 2011-06-01 21:18 test 10000000 2011-06-01 21:20 xaa 10000000 2011-06-01 21:20 xab 10000000 2011-06-01 21:20 xac 10000000 2011-06-01 21:20 xad 10000000 2011-06-01 21:20 xae 10000000 2011-06-01 21:20 xaf 10000000 2011-06-01 21:20 xag 10000000 2011-06-01 21:20 xah 10000000 2011-06-01 21:20 xai 10000000 2011-06-01 21:20 xaj 10000000 2011-06-01 21:20 xak 10000000 2011-06-01 21:20 xal 10000000 2011-06-01 21:20 xam 10000000 2011-06-01 21:20 xan 10000000 2011-06-01 21:20 xao 7286400 2011-06-01 21:20 xap

Oh and cat puts them back together.

  • join has another use, you mean cat?
    – enzotib
    Jun 1, 2011 at 19:41
  • @enzotib indeed :-D
    – Rinzwind
    Jun 1, 2011 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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