I have now just one vfat USB stick in travelling but I still need to take backups. I get gzip: stdout: File too large
because vfat's limiting files bigger than 4.3 Gb. My backup command
sudo tar czf /media/masi/KINGSTON/backup_home_9.7.2016.tar.gz $HOME/
I need to split the backup to parts. Merge it later if possible.
I could start to do --exclude=/home/masi/books/
etc to limit things but it would be great to get many .jar files for the whole thing.
I do empty the trash of vfat USB stick because GUI does not work for it
rm -rf /media/masi/KINGSTON/.Trash-1000/ \
/media/masi/KINGSTON/.Trashes/ \
/media/masi/KINGSTON/.Spotlight-V100/
I check the filesystem after emptying trash
df -T | grep KINGSTON
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 7553040 412240 7140800 6% /media/masi/KINGSTON
I try Law29's proposal. I do
With 4000MB filesizes, since 4200MB not working TODO with bigger USB stick
# http://unix.stackexchange.com/a/61776/16920 sudo tar czf - $HOME | split / --bytes=4000MB - /media/masi/KINGSTON/backup_home_9.7.2016.tar.gz
I do
ls -l /media/masi/KINGSTON/backup_home_9.7.2016.tar.gzaa
-rw-r--r-- 1 masi masi 0 Jul 9 19:49 /media/masi/KINGSTON/backup_home_9.7.2016.tar.gzaa
I do
df -i /media/masi/KINGSTON/
after getting an error TODO
But problem now: too big backup size for USB stick. How can you estimate the size of the tar command?
System: Linux Ubuntu 16.04 64 bit
Hardware: Macbook Air 2013-mid
USB stick: 8GB, vfat
split
shouldn't need any extra space on the disk, so double-check that you have enough space on the drive. (Thatdf
command still shows only ~2 GB). Also, if you mean you need to split the files to multiple drives, the other question has an answer with an example of that, too – ilkkachu Jul 09 '16 at 12:35--bytes=4000M
? Can you add the output ofls -l /media/masi/KINGSTON/backup_home_9.7.2016.tar.gzaa
and ofdf /media/masi/KINGSTON/
anddf -i /media/masi/KINGSTON/
after you get the error? – Law29 Jul 09 '16 at 15:08df /media/masi/KINGSTON/
after emptying the trash. You may want to do adu /media/masi/KINGSTON/ | sort -g
, that will show you where you have files. Also, how big is/media/masi/KINGSTON/backup_home_9.7.2016.tar.gz
? – Law29 Jul 09 '16 at 17:33