[Borgbackup] Borg & Maildir
Sitaram Chamarty
sitaramc at gmail.com
Thu Dec 29 10:42:54 EST 2016
On Thu, Dec 29, 2016 at 02:45:21PM +0000, Iain Mac Donald wrote:
>
> I have been running Borg for a week for our home server & family
> laptops and everything is working just great.
>
> The one problem I foresee is restoring deleted emails. Emails are
> stored in Maildir format, filenames aren't seen by users, many
> folders have high daily activity and some folders contain 10s of
> thousands of files. Identifying which file to restore would be very
> difficult.
>
> The only way I can think of doing it is by restoring a whole folder to
> a temporary location accessible to the IMAP server and then using an
> IMAP client to identify the deleted message and copying it back to the
> desired folder. Another approach might be doing text string searches on
> the Borg backups, within date ranges, but I'm not sure how to do that.
>
> I realise this is a bit off-topic but I was hoping someone on the list
> might have a better solution to this problem.
Just use a mail client that can detect (and delete) duplicate
mails. Once you have that, do what you said above -- i.e.,
restore the whole folder to a temp location -- then copy all
mails from there to the main one. When that is done, delete
duplicates.
Thunderbird has an extension for this. In mutt just use the
pattern '~=' and delete all mails with that pattern. I'm sure
other mail clients have something.
The big downside to this is if you really only need a few mails,
but the maildir has tons of mails. You'd be processing all those
tons of mails just to grab one.
Playing around with 'formail' and message-IDs may also help.
regards
sitaram
More information about the Borgbackup
mailing list