Score:1

rsync gets stuck in backing up thunderbird emails

de flag

I do my backups with rsync. Now rsync gets stuck transferring my email folders.

I use 20.04 and thunderbird 78.13.0 (64-Bit). I start my backup with this:

#!/bin/bash

rm -Rf /home/anja/.cache/*

for GERAET in /media/anja/* ; do
 if [[ "$GERAET" == /media/anja/INTENSO ]]; then 
    echo $GERAET
       rsync -va --delete --exclude={**/trash*,**/Cache*,**/cache*} /home/anja/.thunderbird $GERAET/anja/.thunderbird
    exit            
  fi
done

the backup is running and then gets stuck at a different file everytime I try this. I already tried repairing the thunderbird email folders, but I have loads of email accounts and loads of folders there so I doubt I caught all of them.

Adding the option --info=progess2 gives me the output:

    168,997,741   3%   28.99MB/s    0:00:05 (xfr#818, ir-chk=3506/4923)
.thunderbird/lunzq248.default/Mail/.inbox.directory/konsum.mdir/cur/1290027311.2286.qAc64:2,S

And there it just stops and waits until infinity or until I kill it with Ctrl + C

$ ll ~/.thunderbird/lunzq248.default/Mail/.inbox.directory/konsum.mdir/cur/1290027311.2286.qAc64:2,S
-rwxrwxr-x 1 anja anja 167069 Jul 18 16:49 /home/anja/.thunderbird/lunzq248.default/Mail/.inbox.directory/konsum.mdir/cur/1290027311.2286.qAc64:2,S*

It looks like the file contains an email with a part of an pdf attachement and ends on:

DQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDAwMDAgNjU1MzUgZg0KMDAwMDAwMDAwMCA2NTUz
NSBmDQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDAwMDAgNjU1MzUgZg0KMDAwMDAwMDAwMCA2
NTUzNSBmDQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDAwMDAgNjU1MzUgZg0KMDAwMDAwMDAw
MCA2NTUzNSBmDQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDAwMDAgNjU1MzUgZg0KMDAwMDAw
MDAwMCA2NTUzNSBmDQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDAwMDAgNjU1MzUgZg0KMDAw
MDAwMDAwMCA2NTUzNSBmDQowMDAwMDAwMDAwIDY1NTM1IGYNCnRyYWlsZXINCjw8L1NpemUgOTcx
Pj4NCnN0YXJ0eHJlZg0KMTE2DQolJUVPRg0K
------=_Part_1306_1154394907.1290028505681--
lucki1000 avatar
us flag
Maybe you should try first this option `--info=progress2`
Calamity Jane avatar
de flag
Did that and added the result.
sudodus avatar
jp flag
You are running rsync without elevated permissions. It is possible that your user ID lacks permissions to manage some of the data. Try with `sudo rsync ...` . You should also put `$GERAET` within double quotes: `"$GERAET"` everywhere.
Calamity Jane avatar
de flag
I will try it but I doubt permissions are the reason for it. I am using the script since several years. Of course an update in some other software might cause rights problems. But still it is not probable that this is the reason since it has no problems backing up other files in the same directory so my suspicion is rather a damaged file.
Calamity Jane avatar
de flag
I tried running it as sudo, but it get's stuck at the same file. So no change.
lucki1000 avatar
us flag
can you try it manually, I mean the copying only of this file?
Calamity Jane avatar
de flag
It claims not to be able to create this file. My OS in in German so my translation is: "This regular file can not be created: argument is not valid `cp -v ~/.thunderbird/lunzq248.default/Mail/.inbox.directory/konsum.mdir/cur/1290027311.2286.qAc6* /media/anja/INTENSO/anja/.thunderbird/.thunderbird/lunzq248.default/Mail/.inbox.directory/konsum.mdir/cur/`
sudodus avatar
jp flag
What about this file (ownership, permissions, size, content)? Can you read it manually? Is there already a target file (that should be updated? Could the source file *or* the target file be sitting in a damaged sector? Try to find out why the copy process fails. - Maybe try to repair the file systems, and after that check again, maybe remove the target file, if it is damaged.
Calamity Jane avatar
de flag
if I delete the file the rsync get stuck on the next similar file. Looks like it contains an email with the first part of an attached pdf file. I added it to the post.
Calamity Jane avatar
de flag
If I delete the whole target folder it still gets stuck.
Calamity Jane avatar
de flag
Waht I did now in my desperation is to delete all *.msf files and let thunderbird re-index my mailboxes. Regrettably the result is the same: rsync gets stuck with a certain file, if I remove it it gets stuck with another file.
Score:0
de flag

I finally found the reason for this mess: My hard disk was getting broken.... yes gradual process luckily.

So I tried to get as much as possible saved of my thunderbird data ( which was obviously in the critical reason of the hard disk) changed the dis, installed anew and I guess that was it.

So not a rsync problem, but a hardware problem.

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.