Question restoring messages from backup, courierimapuiddb

View: New views
4 Messages — Rating Filter:   Alert me  

Question restoring messages from backup, courierimapuiddb

by Richard Rasker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I set up a courier-imap mailserver with a Maildir structure, with rsync
for creating regular backups on a remote machine. But I'm running into a
problem testing this backup method; here's what I did:
- I cc'd a hundred or so messages to the Inbox of a test account
- I created a backup of this test account
- I deleted half the messages in this Inbox (using MUA)
- I created another backup
- I restored all backed-up messages to ~/Maildir/cur/
- I renamed ("safe removed") ~/Maildir/courierimapuiddb, expecting
courier-imap to rebuild the correct list from the restored files found
in ~/Maildir/cur.

This is where things go wrong. When I connect using a mail client, I get
error messages "NO Cannot open message" (Squirrelmail) for all deleted
messages, and only the ones I didn't delete originally are still shown
correctly. Evolution doesn't show messages at all, and just says "Error
while refreshing folder".

AFAICS, the number of lines in courierimapuiddb matches the number of
files in ~/Maildir/cur, so that part of restoring the Maildir structure
seems to have worked. Yet obviously I have to do something else to
restore the deleted messages -- and I can't use a backup of
courierimapuiddb of course, since this backup doesn't reflect all the
files backed up over time with rsync.

So what am I doing wrong? Is there a special command to restore the
Maildir structure with courimapuiddb and other files from a bunch of
message files?

Thanks in advance, best regards,

Richard Rasker


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Re: Question restoring messages from backup, courierimapuiddb

by Sam Varshavchik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Richard Rasker writes:

> This is where things go wrong. When I connect using a mail client, I get
> error messages "NO Cannot open message" (Squirrelmail) for all deleted
> messages, and only the ones I didn't delete originally are still shown
> correctly. Evolution doesn't show messages at all, and just says "Error
> while refreshing folder".
>
> AFAICS, the number of lines in courierimapuiddb matches the number of
> files in ~/Maildir/cur, so that part of restoring the Maildir structure
> seems to have worked. Yet obviously I have to do something else to
> restore the deleted messages -- and I can't use a backup of
> courierimapuiddb of course, since this backup doesn't reflect all the
> files backed up over time with rsync.
>
> So what am I doing wrong? Is there a special command to restore the
> Maildir structure with courimapuiddb and other files from a bunch of
> message files?
No, there is no special command. However, merely paraphrasing what you think
happened, without showing the actual data, isn't really much to go on. At
the bare minimum, you'll need to show the actual contents of your maildir,
the list of files, and the contents of courierimapuiddb; as well as an IMAP
session log. Merely running some mail client and describing what it shows is
insufficient, you need to show the actual IMAP commands and the resulting
replies, after telneting to port 143 and logging in, in order to demonstrate
your problem.




------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

attachment0 (204 bytes) Download Attachment

Re: Question restoring messages from backup, courierimapuiddb

by Carlos Lopez-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Did you check correct dirs ownership?

you can just create a script and add for example:

tar -zcvf myemails.tar.gz /somedir/ and then sync the tarred file to your backup disk.

regards,

Carlos.

--- El sáb 31-oct-09, Richard Rasker <rasker@...> escribió:

> De: Richard Rasker <rasker@...>
> Asunto: [courier-users] Question restoring messages from backup, courierimapuiddb
> A: courier-users@...
> Fecha: sábado, 31 octubre, 2009, 5:27 am
> Hello,
>
> I set up a courier-imap mailserver with a Maildir
> structure, with rsync
> for creating regular backups on a remote machine. But I'm
> running into a
> problem testing this backup method; here's what I did:
> - I cc'd a hundred or so messages to the Inbox of a test
> account
> - I created a backup of this test account
> - I deleted half the messages in this Inbox (using MUA)
> - I created another backup
> - I restored all backed-up messages to ~/Maildir/cur/
> - I renamed ("safe removed") ~/Maildir/courierimapuiddb,
> expecting
> courier-imap to rebuild the correct list from the restored
> files found
> in ~/Maildir/cur.
>
> This is where things go wrong. When I connect using a mail
> client, I get
> error messages "NO Cannot open message" (Squirrelmail) for
> all deleted
> messages, and only the ones I didn't delete originally are
> still shown
> correctly. Evolution doesn't show messages at all, and just
> says "Error
> while refreshing folder".
>
> AFAICS, the number of lines in courierimapuiddb matches the
> number of
> files in ~/Maildir/cur, so that part of restoring the
> Maildir structure
> seems to have worked. Yet obviously I have to do something
> else to
> restore the deleted messages -- and I can't use a backup
> of
> courierimapuiddb of course, since this backup doesn't
> reflect all the
> files backed up over time with rsync.
>
> So what am I doing wrong? Is there a special command to
> restore the
> Maildir structure with courimapuiddb and other files from a
> bunch of
> message files?
>
> Thanks in advance, best regards,
>
> Richard Rasker
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference
> in SF, CA
> is the only developer event you need to attend this year.
> Jumpstart your
> developing skills, take BlackBerry mobile applications to
> market and stay
> ahead of the curve. Join us from November 9 - 12, 2009.
> Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> courier-users mailing list
> courier-users@...
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
>


      ____________________________________________________________________________________
¡Obtén la mejor experiencia en la web!
Descarga gratis el nuevo Internet Explorer 8.
http://downloads.yahoo.com/ieak8/?l=e1

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Re: Question restoring messages from backup, courierimapuiddb

by Richard Rasker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[snip problem restoring messages]

> Hi,
>
> Did you check correct dirs ownership?

Ah yes, that was the problem -- I performed the restore test as root, so
the files got rw------- root permissions. After correcting this, all is
fine.

Thanks for the heads-up!

> you can just create a script and add for example:
>
> tar -zcvf myemails.tar.gz /somedir/ and then sync the tarred file to your
> backup disk.

The cause of the error was my manual restore test with root rights -- the
actual backup and restore scripts use rsync -a, which preserves correct
permissions and ownership.

Thanks again, best regards,

Richard Rasker


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users