<div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>Thanks for the fast answer!</div><div><br></div><div>Let me clear the situation:</div><div>1. I want to import from a read-only filesystem where the mdbox files are</div><div>2. The indexes are necessary because of the mdbox file layout, but the import process cannot open them</div><div>3. If I specify random writable dir for indexes the import does not do anything, no message will be imported as obviously the indexes are necessary for mdbox</div><div>4. The CONTROL parameter is only usable for maildir format</div><div><br></div><div>To make it more specific, I'm using the following command to restore the messages right now:</div><div>doveadm -o mail_location=mdbox:/backup/restore/XXX -o mail_attachment_dir=/mnt/_attachments backup -u XXX doveadm dsync-server -u XXX<br></div><div><br></div><div>For this to work, I have to copy the full mdbox data to the writeable /backup/restore/XXX. If I only change the INDEX location, the process still tries to open the log files and fails with open() error on them.</div></div></div><br><div class="gmail_quote"><div dir="ltr">Sami Ketola <<a href="mailto:sami.ketola@dovecot.fi">sami.ketola@dovecot.fi</a>> ezt írta (időpont: 2019. jan. 14., H, 10:46):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hi,<br><br>you can use INDEX=/writable/path/%u in your mail_location setting to define location for the required index data when importing.<br>Also possibly you would need to define writable location for CONTROL and VOLATILEDIR. <br><br>see <a href="https://wiki.dovecot.org/MailLocation" target="_blank">https://wiki.dovecot.org/MailLocation</a><br><br>Sami<br><div><br><blockquote type="cite"><div>On 14 Jan 2019, at 11.23, hby <<a href="mailto:hby@hby.hu" target="_blank">hby@hby.hu</a>> wrote:</div><br class="gmail-m_-8382908064748005504Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr">Dovecot version: 2.2.34</div><div dir="ltr"><br></div><div>doveadm import tries to call open() on the source indexes/logs of mdbox data, but even if it should work as it is just a read-related call, it fails on read-only filesystems.</div><div><br></div><div>The main use case for read-only filesystem is restoring from backup: the massive deduplicated backup data is exposed using FUSE. For deduplication to work efficiently, we have to backup the whole mail storage and thus the only way to handle the restore to mount the whole data.</div><div><br></div><div>I would like to ask for some proper solution for this problem.</div><div><br></div><div>Suggestions: first, the doveadm import should never modify the indexes, and second: the open() calls should respect the read-only filesystem and should fall back to "r" flag when using open.</div><div>The problem goes further when using SIS (which goes beyond multiple terrabytes).<br></div><div><br></div><div>The only workaround currently is to export the whole mdbox data to a writeable storage, and parametrize the import command to use that and the mounted SIS data separately for import...which is just problematic, ugly and error prune.</div><div><br></div><div>Thank you for the continous work on dovecot, I hope you get this feedback in a good way.</div></div>
</div></blockquote></div><br></div></blockquote></div>