I am using mdbox storage format.
As far as I know, “doveadm purge” does a complete purge. The time and disk activity would be proportional to the number mdbox files on the storage. The purge time could be huge.
I wonder if there is some way of doing a kind of incremental purge, stopping/restarting purging, etc. Purging by file range would be nice too.
Advice?
Thanks
Enviado desde mi iPhone
Hi,
I think you can achieve file range approach using a small piece of shell script.
First, extract user list using doveadm users '*'. Then process this list to fit your needs (seven parts for a week and a part processed by week day for example). Finally, use -u option of doveadm purge into a loop.
That is just a trivial first idea. You can notice that it will trigger a doveadm process per user, that seems to be less than optimum approach.
According do the documentation (https://wiki.dovecot.org/Tools/Doveadm/Purge), doveadm purge allow using a user *mask* as -u option. This feature can be usefull if you have a strict nameplan of your mailboxes : you can then calculate parts with a touchy mask.
Regards.
Fabien
Le 23/08/2020 à 20:10, Jesus Cea a écrit :
I am using mdbox storage format.
As far as I know, “doveadm purge” does a complete purge. The time and disk activity would be proportional to the number mdbox files on the storage. The purge time could be huge.
I wonder if there is some way of doing a kind of incremental purge, stopping/restarting purging, etc. Purging by file range would be nice too.
Advice?
Thanks
Enviado desde mi iPhone
On 24/8/20 7:12, Fabien KOCIK wrote:
First, extract user list using doveadm users '*'. Then process this list to fit your needs (seven parts for a week and a part processed by week day for example). Finally, use -u option of doveadm purge into a loop.
This is a good idea for installations with tons of users. Good point.
I would be personally interested in incremental purge per user. My personal IMAP account, for instance, has at this moment about 40GB of mdbox files. I keep most of my email for decades, but sure I could free some space doing a purge, but I am scared of trying with 200.000 mdbox files without knowing how long it would take.
-- Jesús Cea Avión _/_/ _/_/_/ _/_/_/ jcea@jcea.es - https://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ Twitter: @jcea _/_/ _/_/ _/_/_/_/_/ jabber / xmpp:jcea@jabber.org _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz
On 24/08/2020 08:30 Jesus Cea jcea@jcea.es wrote:
On 24/8/20 7:12, Fabien KOCIK wrote:
First, extract user list using doveadm users '*'. Then process this list to fit your needs (seven parts for a week and a part processed by week day for example). Finally, use -u option of doveadm purge into a loop.
This is a good idea for installations with tons of users. Good point.
I would be personally interested in incremental purge per user. My personal IMAP account, for instance, has at this moment about 40GB of mdbox files. I keep most of my email for decades, but sure I could free some space doing a purge, but I am scared of trying with 200.000 mdbox files without knowing how long it would take.
-- Jesús Cea Avión
This is why it's a good idea to run purge periodically, like once a month or even week.
Aki
On 24/08/2020 08:30 Jesus Cea jcea@jcea.es wrote:
I would be personally interested in incremental purge per user. My personal IMAP account, for instance, has at this moment about 40GB of mdbox files. I keep most of my email for decades, but sure I could free some space doing a purge, but I am scared of trying with 200.000 mdbox files without knowing how long it would take.
I believe you can try to dsync your mdbox account to a new one and then replace it with purged.
On 02/09/2020 13:51 Vitalii vnagara@yandex.com wrote:
On 24/08/2020 08:30 Jesus Cea jcea@jcea.es wrote:
I would be personally interested in incremental purge per user. My personal IMAP account, for instance, has at this moment about 40GB of mdbox files. I keep most of my email for decades, but sure I could free some space doing a purge, but I am scared of trying with 200.000 mdbox files without knowing how long it would take.
I believe you can try to dsync your mdbox account to a new one and then replace it with purged.
You can already do incremental purge per user. Just call the purge command with one user at a time, or user list.
Aki
Jesus Cea skrev den 2020-08-24 07:30:
I would be personally interested in incremental purge per user. My personal IMAP account, for instance, has at this moment about 40GB of mdbox files. I keep most of my email for decades, but sure I could free some space doing a purge, but I am scared of trying with 200.000 mdbox files without knowing how long it would take.
why not maildir+ ?
mdbox imho keep used space until purged, where maildir+ does not
On Mon, 24 Aug 2020 10:28:39 +0200 Benny Pedersen me@junc.eu wrote:
why not maildir+ ? mdbox imho keep used space until purged, where maildir+ does not
That's the point and good advantage as you can restore accidentally deleted email later. Also it's speed up deleting and as a result overall dovecot speed.
participants (5)
-
Aki Tuomi
-
Benny Pedersen
-
Fabien KOCIK
-
Jesus Cea
-
Vitalii