[Users] Recover mail from a backup --- got it!!!

Rolf Turner r.turner at auckland.ac.nz
Thu Apr 21 03:12:22 UTC 2022


On Thu, 21 Apr 2022 13:42:15 +1200
Rolf Turner <r.turner at auckland.ac.nz> wrote:

> 
> I found a partial solution to my problem:
> 
> * quit claws-mail
> * move .claws-mail to (e.g.) Save.claws-mail (so that it
>   can be recovered later, when all the dust has settled)
> * copy the back-up .claws-mail to /home/rolf/.claws-mail
>   (I used cp -r; I believe rsync would be better/faster but
>    I'm unsure of/nervous about the syntax of rsync)
> * DISCONNECT from the internet!!!  This is vital, otherwise
>   the INBOX gets immediately updated and the message whose
>   recovery is desired goes away)
> * start claws-mail.
> 
> Bingo!  The deleted message is present in INBOX.
> 
> My problem now is, how do I save it in my claws-mail folders?
> I cannot do any copying or moving since I am not connected to the
> internet!  (Catch-22!)
> 
> I tried "Save email as" and got a saved file.  But there seemed to be
> little that I could do with this file.  What I wanted to do was to
> reconnect to the internet and then somehow input this saved file into
> claws-mail.  If I right-click on the file (in my "Desktop") the first
> option displayed is "Open with claws-mail".  But when I click on that,
> nothing happens.
> 
> Can anyone give me any ideas?  Ta.

I found that

    File -> Export selected to mbox file

can be used to produce an "mbox" (whatever that means) file in with a
specified location (e.g. my "Desktop") and file name. I can then:

* close claws-mail
* replace the back-up .claws-mail directory with Save.claws-mail
* reconnect to the internet
* restart claws-mail
* use "File -> Import mbox file" and specify (using "Browse") the file
  that I previously exported

Bingo again!  The stupidly deleted file is recovered!!!  Whew.

All really quite simple once you know what to do.  As is so often the
case.

I suspect there is an easier way to go, instead of copying over
the entire back-up version of .claws-mail from the external drive.  I.e.
there is probably a way of getting the "lost" email from the backup as
(perhaps?) an mbox file, and then importing that.  But I would have to
understand the structure of .claws-mail in order to find that way.

I would be interested to hear from someone knowledgeable (Paul?) how
this might be done.

Anyhow, what I did may be kludgy, but it worked.

cheers,

Rolf Turner

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the Users mailing list