Rsync has been successfully run for quite a few years on a Debian system. The home directory has been
regularly transferred to a FAT32 USB drive.

Recently, rsync has been hanging.

Rsync just hangs at a particular small file that it gets to and doesn’t move on - no
error message, so it doesn’t crash, it just hangs.

The command is of the form :-

rsync -v -a --max-size=4GB --delete /home/users-name/.

where users-name is the name of the user.

Can anyone help to solve this problem, please ?

What kind of file is it (system, binary, *.odt, *.mp4 etc.) and its size?
Can you access and use the file in a normal manner?
Your command: rsync -v -a --max-size=4GB --delete /home/users-name/. /media/memstick/ indicates you may be copying the whole of your system - which will be a lot. How big is your USB drive?

du -sh .

and post the output.


You could try adding “–progress” to see how far it gets, however it would seem possible that your memory stick / flash drive is worn (or full). Have you tried backing it up to an alternate location? Flash storage devices historically employ lots of different mechanisms to handle the limited write cycles feature of flash, i.e. that you can only write to each location up to (n) times" where (n) can be as low as 1000. Ultimately, despite lots of space showing as free on the device, it can effectively have run out of available writable blocks … and drivers can be pretty “bad” at handling this edge-case - infinite retries are not unknown.

With regard to suspect device; I found this useful web page for checking the block integrity of USB sticks: usb flash drive - How to check the physical health of a USB stick in Linux? - Super User.

A test with a very old 1GB USB stick gave this:
keith@T500:~$ umount /dev/sdb1
keith@T500:~$ sudo badblocks -nvs /dev/sdb1
Checking for bad blocks in non-destructive read-write mode
From block 0 to 1004527
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: done
Pass completed, 0 bad blocks found. (0/0/0 errors)

During the test, which took 1hr, progress is reported continuously: %done, minutes, error numbers.