Re: cyrus: delete previously deleted messages(after backup recovery)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/23/2014 08:45 AM, Y B wrote:
thanks for the answer.
I certainly still have the metadata since I have not lost any file, I
have just too many files (all the previously deleted emails, recovered
from my rsync backup)
I am not exactly sure where the metadata are situated, /var/imap does
not exist. In my case, all email files are situated at
/data/mail/imap/spool/*/user/username (the star being any letter of the
alphabet).
For a given username, I have for example the following files:

-rw-------  1 cyrus mail    21183 Apr 23 11:01 4846.
-rw-------  1 cyrus mail    26585 Apr 23 10:49 4845.
-rw-------  1 cyrus mail    15720 Apr 23 10:39 4844.
-rw------- 1 cyrus mail  4496548 Apr 23 13:36 cyrus.cache
-rw------- 1 cyrus mail      251 Mar 10 16:52 cyrus.header
-rw------- 1 cyrus mail   151816 Apr 23 13:36 cyrus.index
-rw------- 1 cyrus mail 10087920 Jan 22 02:28 cyrus.squat
drwx------  2 cyrus mail    69632 Apr 23 13:11 Sent
drwx------  2 cyrus mail     4096 Apr 23 09:38 Drafts
drwx------  4 cyrus mail    69632 Apr 22 20:45 Trash
drwx------  2 cyrus mail     4096 Apr 22 20:30 spam


Are the metadata in the cyrus.* files?

If yes, is there an easy way to delete the old emails using these metadata?

Thank you.

Yannick


Yes, metadata files are the cyrus.* files. What version of Cyrus are you running? You should be able to run reconstruct on the mailboxes with the -n option which should list the files that reconstruct would have added back to the index if the -n option was not used. Use this output to determine which files can be deleted.

For example I added some bogus files called 1. , 101. , and 255. to my mailbox.



reconstruct -n user.boutilpj
user.boutilpj uid 1 rediscovered - appending
user.boutilpj uid 101 rediscovered - appending
user.boutilpj uid 255 rediscovered - appending
user.boutilpj














2014-04-22 15:06 GMT+02:00 Patrick Boutilier <boutilpj@xxxxxxxxxxx
<mailto:boutilpj@xxxxxxxxxxx>>:

    On 04/22/2014 09:19 AM, Y B wrote:

        Hello,

        after a disk crash, I had to recover all the emails from a daily
        backup.
        Unfortunately, I noticed that this backup was made with the rsync
        command but WITHOUT the --delete options.
        That means that the mail backup was much larger than the
        original one
        since no message was ever deleted on the backup.
        Now I would like to clean the mailboxes and remove all those
        emails that
        were previously deleted but I cannot find how.
        Is there any easy way to do this?
        (I use cyrus+postfix on debian 6.0.4)

        Thank you for your help.


    Did you lose your metadata as well? Usually in /var/imap ?






        Yannick


        ----
        Cyrus Home Page: http://www.cyrusimap.org/
        List Archives/Info:
        http://lists.andrew.cmu.edu/__pipermail/info-cyrus/
        <http://lists.andrew.cmu.edu/pipermail/info-cyrus/>
        To Unsubscribe:
        https://lists.andrew.cmu.edu/__mailman/listinfo/info-cyrus
        <https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus>



    ----
    Cyrus Home Page: http://www.cyrusimap.org/
    List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
    To Unsubscribe:
    https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus



begin:vcard
fn:Patrick Boutilier
n:Boutilier;Patrick
org:;Nova Scotia Department of Education
adr:;;2021 Brunswick Street;Halifax;NS;B3K 2Y5;Canada
email;internet:boutilpj@xxxxxxxxxxx
title:WAN Communications Specialist
tel;work:902-424-6800
tel;fax:902-424-0874
version:2.1
end:vcard

----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux