Score:1

Create tar backup on USB fails

pw flag

A question please: when I use a Data Taveler 100G3 USB stick, capacaity 128 GB to make a backup of my home directory I get an error:

tar -czvf /media/dick/linux-bck/home-usb.gz /home/dick gzip: stdout: File too large tar: /media/dick/linux-bck/home-usb.gz: Slechts 8192 van 10240 bytes geschreven tar: Child returned status 1 tar: Error is not recoverable: exiting now

On the USB the file home-usb.gz is created, 4.3 GB in size.

The largest file in home/dick is about 150 MB in size.

If I use a 1 TB external harddrive instead, no error, and a 19 GB tar file is created.

Any idea what this might be ?

File system USB: FAT, file system external harddrive 'msdos'. If I check the external harddrive on a Windows PC it tells me filesystem is NTFS.

Distro: Ubuntu 16.04 Bionic Beaver

cc flag
What filesystem is on the USB stick? FAT has a 4.3G max size limit for common setups.
Tilman avatar
cn flag
@ubfan1 It looks like your comment is actually the answer. I suggest you make it one.
Score:2
cc flag

Your USB stick probably uses the FAT filesystem, which has a maximum filesize of 4,294,967,295 bytes (4 GB – 1). To store bigger files, you either need to break them up (using something like split), or reformat the USB with another filesystem, like ext4, which can have larger files. A clean repartition might be best, tagging the recreated partition with the "linux file type 83, then format that with mke2fs or the tool of your choice.

Dirk avatar
pw flag
I have formatted the USB-stick in NTFS format. Now tar creates a proper backup on the USB-stick. Thanks to all for their help !
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.