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?
/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 ;)
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.Example:
dd if=/dev/zero bs=1M count=150 >test
Oh and
cat
puts them back together.