Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Rsync is hanging

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
NewToLinux
Posts: 71
Joined: 2017-09-17 11:30

Rsync is hanging

#1 Post by NewToLinux »

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 ?

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Rsync is hanging

#2 Post by arzgi »

I would check the file system of the USB drive.

User avatar
sunrat
Administrator
Administrator
Posts: 6479
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 118 times
Been thanked: 474 times

Re: Rsync is hanging

#3 Post by sunrat »

It could be the file. What is it and what are its permissions? Has the same file copied successfully previously?

FAT32 has no way of saving permissions so the -a option is irrelevant as it implies -p. Use -rtv instead. You don't need those dots in the command either. Try

Code: Select all

rsync -rtv --max-size=4GB --delete /home/users-name/ /media/memstick/
Run it with --dry-run first to make sure it's going to do what you want.

To properly save a Debian $HOME I highly recommend a Linux file system like ext4 (or ext2). And USB sticks can break, do an fsck on it as arzgi suggests.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

NewToLinux
Posts: 71
Joined: 2017-09-17 11:30

Re: Rsync is hanging

#4 Post by NewToLinux »

Thanks very much for the replies.

I would use ext4 but the files may need to be read on a Windows system.

Would using NTFS instead of FAT32 help ?

The USB stick is quite new, but maybe I should check the stick for problems.

User avatar
sunrat
Administrator
Administrator
Posts: 6479
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 118 times
Been thanked: 474 times

Re: Rsync is hanging

#5 Post by sunrat »

You didn't answer the questions in my first line which were the salient bit of my reply. I'm thinking that file name may have a character which is allowed in Linux but not in Windows. These characters are not allowed in Windows (may be others?):

Code: Select all

< (less than)
> (greater than)
: (colon - sometimes works, but is actually NTFS Alternate Data Streams)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
If you're just copying data files, permissions are unimportant and either NTFS or FAT32 would be acceptable. If you are backing up your config files from $HOME (mainly the hidden dot files) permissions may matter if you need to restore them.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

NewToLinux
Posts: 71
Joined: 2017-09-17 11:30

Re: Rsync is hanging

#6 Post by NewToLinux »

Rsync has been run okay on a new FAT32 stick, using the command i previously reported.


(a) I propose to put all the files on the current new stick
into a new directory (using mv *.* backup-dir) outside of my
home directory and then run rsync again on the stick.


Presumably the new run of rsync would delete backup-dir
(as this doesn't exist in my home directory) and then just
copy over all the home directory files again to the stick.


Would rsync run okay on the same stick using step (a) on a periodic basis ?

Post Reply