I am using Ubuntu 14.04 and I do regular backups of important directories on a 64 GB USB drive using rsync for each directory:

rsync -ia --no-links --size-only /home/alexander/Directory1 /media/alexander/LINUXBACKUP/Backup/
rsync -ia --no-links --size-only /home/alexander/Directory2 /media/alexander/LINUXBACKUP/Backup/

The filesystem of the USB drive is as follows:

>sudo fdisk -l
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            8064   121995263    60993600    c  W95 FAT32 (LBA)

In some cases, the backup works fine without any problems. In other cases, the backup seems to hang at some random file (not the same file when I repeat the backup/rsync).

I also did a check of the USB drive using the following command:

sudo dosfsck -w -r -l -a -v  /dev/sdc1

but the backup did again halt at some different file when trying it again.

Additional information:

  • Also sometimes it happens that the backup works fine at the start, but then the filesystem changes to read-only, resulting in a failure of the backup.
  • When the rysnc hangs, I might not be able to kill it with kill -9.

What can I do to resolve this problem?

  • Maybe it helps to use an ext filesystem-format instead of FAT32?
  • Maybe the verbose information of the rsync command is showing me incorrect information (the backup does not stop, but just the information displayed on the shell)?
  • Maybe there is a better command to check the USB drive? (I tried sudo fsck -y /dev/sdc1 as well, but this command seemed to hang as well. But maybe it just takes a very long time?)
  • Maybe buy another stick, as the rsync process not killable hints to faulty hardware?

It could be a problem with permissions, which cannot be preserved if different from the preset value, when the FAT32 partition was mounted. There is also a 4 GiB maximum file size in FAT32.

So I think that it helps to use an ext filesystem-format instead of FAT32, and I suggest that you use the ext4 file system.

If you use this drive only for backup and maybe an occasional restore, fine.

If you intend to run it a lot, for example boot from it, your should consider the wear aspect and use the mount option noatime and to remove the journaling. This is good to reduce wear, but makes it harder to recover from errors, so I think that you should think twice before doing these tweaks.

If there are still problems, you might consider using tar (with sudo), which might be more reliable if there are synchronizing errors with rsync. Tar writes to one single file.

  • Thanks a lot for your suggestions. I will first try to reformat the drive to an ext format and see how it works. Tar is of course an option as well... – Alex Dec 3 '16 at 9:37
  • 1
    Good luck! Please come back if there are still problems :-) – sudodus Dec 3 '16 at 9:55

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.