Author Topic: Rsync  (Read 419 times)

0 Members and 1 Guest are viewing this topic.

Offline freelancehelp

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Rsync
« on: July 07, 2021, 02:15:13 pm »
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/.
/media/memstick/.

where users-name is the name of the user.

Can anyone help to solve this problem, please ?

Offline Keith

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1456
  • Karma: 20
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Rsync
« Reply #1 on: July 07, 2021, 03:33:43 pm »
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?
Try:
Code: [Select]
du -sh .
and post the output.

Keith
« Last Edit: July 07, 2021, 03:35:33 pm by Keith »

The Linux Community Forum

Re: Rsync
« Reply #1 on: July 07, 2021, 03:33:43 pm »

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1495
  • Karma: 10024
  • Gender: Male
    • View Profile
    • Awards
Re: Rsync
« Reply #2 on: July 15, 2021, 09:48:36 am »
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.

Offline Keith

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1456
  • Karma: 20
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Rsync
« Reply #3 on: July 21, 2021, 01:14:00 pm »
With regard to suspect device;  I found this useful web page for checking the block integrity of USB sticks:  https://superuser.com/questions/376274/how-to-check-the-physical-health-of-a-usb-stick-in-linux#376278

A test with a very old 1GB USB stick gave this:
[email protected]:~$ umount /dev/sdb1
[email protected]:~$ 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)
[email protected]:~$

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

Keith

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal