One option to migrate to a new server and still retain the old messages,
but with a delay, is to start your new database with an auto_increment
number for the dbmail_messages table that is greater than the
max(message_idnr) on your existing dbmail_messages table. Then you can
import a dump (use dbmail-util -d -p -y twice to avoid coping deleted
messages) with out the table drop/create for the tables Paul mentioned
that could be skipped. Once you have imported all of the old data, even
after new messages have been delivered, simply do an update of
dbmail_messages to change the message_idnr to start an increment from a
number higher than the current max(message_idnr) on the new database.
Finally run a dbmail-util -ay twice to make sure all the cache tables
are golden. IMAP clients should see all new headers for downloading
(even messages that were seen during the data move process). Pop3
clients using leave a copy on the server may or may not have issues with
exiting messages that were already downloaded. If nothing else, all the
messages would be seen as new and needed to be downloaded.
The update process for dbmail_messages
mysql dbmail #connect to db
mysql> SELECT MAX(message_idnr) FROM dbmail_messages;
+-------------------+
| MAX(message_idnr) |
+-------------------+
| 31252 |
+-------------------+
1 row in set (0.00 sec)
mysql> set @x:=100000;
Query OK, 0 rows affected (0.00 sec)
mysql> UPDATE dbmail_messages SET [EMAIL PROTECTED]:[EMAIL PROTECTED];
Query OK, 11252 rows affected (3.33 sec)
Rows matched: 11252 Changed: 11252 Warnings: 0
mysql> SELECT MAX(message_idnr) FROM dbmail_messages;
+-------------------+
| MAX(message_idnr) |
+-------------------+
| 111252 |
+-------------------+
1 row in set (0.00 sec)
-Jon
Paul J Stevens wrote:
Curtis Maurand wrote:
I'm trying to move user accounts and mailbox structure without moving
the messages.
understood. Users will suddenly start seeing empty folders.
very tricky.
If you carefully setup all tables and dump/reload all tables *except*
dbmail_messageblks you will avoid transferring the bulk of your data
while retaining user experience.
After setting up the new host users will start getting errors if the try
to retrieve an /old/ message until you transfer the messageblks table as
well.
You must take special care to setup the auto-increment values correctly
for the empty messageblks table. So use 'mysqldump -h oldhost -d
dbmail|mysql -h newhost dbmail' if you ever mean to transfer the old
email later on.
I've never actually done this myself, but these migration scenarios are
perfectly valid and deserve some exploratory experimentation, so please
keep us informed :-)
Of course if you don't mind if users suddenly start seeing empty folders
you can also skip:
| dbmail_ccfield |
| dbmail_datefield |
| dbmail_envelope |
| dbmail_fromfield |
| dbmail_headername |
| dbmail_headervalue |
| dbmail_mailboxes |
| dbmail_messages |
| dbmail_physmessage |
| dbmail_referencesfield |
| dbmail_replytofield |
| dbmail_subjectfield |
| dbmail_tofield |
I have bandwidth limits not the least of which is that
the current system is residing on a T1, is several GB in size (which
means hours to transfer) and I have bandwidth and diskspace limits on
the new host.
Thanks,
Curtis
Paul J Stevens wrote:
Curtis Maurand wrote:
Hello all,
I find this list to be incredibly helpful. Thank you all in advance of
my question.
I need to move my installation from the current server to another. That
could be accomplished by simply doing a mysqldump -u <user> -p<pass>
--database dbmail |mysql -u<user> -p<pass> -h <new server> dmail
That's known and been done and that's great, but I don't want to move
several GB of mail. I only want to transfer the user accounts, mailbox
structure and sieve scripts. Which tables do I need to copy to the new
server? I'm running 2.2.9 on the older machine and 2.2.10 on the newer
unit.
Why? It's not obvious what you're trying to achieve here.
------------------------------------------------------------------------
_______________________________________________
DBmail mailing list
DBmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
DBmail mailing list
DBmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail