And then… it died.
Erstellt von Sascha am Mittwoch 7. Oktober 2009
We had a mail-server running some (I dont remember the name) commercial product around cyrus and postfix on a box with 2 SATA disks conected to a 3ware 8006-2LP. The motherboard died 2 weeks ago.
Since we have another mailserver running, I just recreated the accounts on the other box and added the domains of the broken box. No deal. But of course the users wanted their old mailboxes back.
Since the system was backed up daily to a tape drive which died a year ago my only chance was in the two disks.
Ok, I plugged the controller with both disks connected into a running Linux-Box to check the array which didn’t work. 3ware support told me to remove one drive or the other which gave me a degraded array but 4 accessable out of 6 partitions. One was swap which was ok, but the other one with 180GB was the meat I was looking for.
Sniffing around in /etc in one of the smaller partitions revealed a LVM config backup.
After installing the LVM2 package
- pvscan
- lvscan
- vgchange datavolume -a y
- mount /dev/datavolume blabla…
did first the trick.
Now I could access the former /var/spool/imap/user were cyrus kept the user mailboxes.
On the “new” server I created a /var/spool/imap/user/username/OLD directory for every user of the old server. Then I transferred all data to the new server.
- rsync -ruve ssh /var/spool/imap/user/username/* new.box.tld:/var/spool/imap/user/username/OLD/
45GB later (on the new box)…
- su -l cyrus
- bin/reconstruct -rf user[.|/]username #depends which delimiter you are using.
- cyradm
- sam user[.|/]username/* username all
… recovered the mailboxes from filedata and gave all rights to use them to the users.






