[BlueOnyx:01281] Re: CMU BQ to BX Mail files empty

Roman Bürkle buerkle at stimme.net
Fri May 22 10:01:26 -05 2009


Hi Nikolas, 

i just stated this problem two days ago in the BQ-mailinglist and got
the following solution:

-----snipp-------

----- Original Message -----
From: "Roman Bürkle" <buerkle at stimme.net>
To: <coba-e at bluequartz.org>
Sent: Wednesday, May 20, 2009 6:57 AM
Subject: [coba-e:15585] Re: Migration from BQ to BO ...problem
withmailbox
file - zerosize


> Ok, here's what i've done (it was maybe hidden in my wall of text):
>
> - exported site on the BQ via cmuExport:
>  BQ: cmuExport -n mail.xxx.de
>
> - scp'ed the files to the BX in /home/restore:
>  BQ: scp /home/cmu/bq1/* root at bo1:/home/restore
>
> - imported the site on the BX using cmuImport:
>  BX: cmuImport -d /home/restore/ -n mail.xxx.de -i xx.xx.xx.xx
>
> Thats all :) And it would be nice if it works :))
>
> RoB
>
>
>
> On Wed, 2009-05-20 at 15:36 +0200, Paul wrote:
>> Roman,
>>
>> If you could document the proceedure that would be good. The BO site
>> states
>> that it's "indevelopment" or similar - i'm contemplating the move
>> myself...
>>
>> Thanks
>> Paul
>>
>>
>> ---------- Original Message -----------
>> From: Roman Bürkle <buerkle at stimme.net>
>> To: "coba-e at bluequartz.org" <coba-e at bluequartz.org>
>> Sent: Wed, 20 May 2009 15:27:38 +0200
>> Subject: [coba-e:15583] Migration from BQ to BO ...problem with
mailbox
>> file -
>> zerosize
>>
>> > Hi BQs,
>> >
>> > i just do some dry runs for a BQ to BO migration. I encoutered the
>> > following problem with a mbox-file:
>> >
>> > BQ:
>> > [root at bq1 aozadmin]# ls -la
>> > total 19080
>> > drwxrws--x  7 aozadmin site61     4096 May 20 13:48 .
>> > drwxr-sr-x  3 root     site61     4096 Apr 24  2008 ..
>> > -rw-r--r--  1 aozadmin site61       24 Apr 24  2008 .bash_logout
>> > -rw-r--r--  1 aozadmin site61      191 Apr 24  2008 .bash_profile
>> > -rw-r--r--  1 aozadmin site61      124 Apr 24  2008 .bashrc
>> > -rw-r--r--  1 aozadmin users       110 Apr 24  2008 .forward
>> > drwx--S---  2 aozadmin site61     4096 Jul 17  2006 mail
>> > -rw-------  1 aozadmin site61 19464027 May 20 13:21 mbox
>> > drwxr-s--x  2 aozadmin site61     4096 Jun 30  2006 Network Trash
>> > Folder
>> > ...
>> > *mbox-file has nearly 20M
>> >
>> > [root at xblue1 tmp]# tar tvfz users-aozadmin-private.tar.gz
>> > -rw-r--r-- aozadmin/site61  24 2008-04-24 12:44:58 .bash_logout
>> > -rw------- aozadmin/mail     0 2008-04-27 00:53:41 cmu-mailspool
>> > drwx--S--- aozadmin/site61 4096 2006-06-30 09:27:33 Private
>> > -rw-r--r-- aozadmin/site61  124 2008-04-24 12:44:58 .bashrc
>> > -rw------- aozadmin/site61 19464027 2009-05-20 13:21:27 mbox
>> > -rw-r--r-- aozadmin/site61      191 2008-04-24
12:44:58 .bash_profile
>> > ...
>> > *mbox-file in export-file (used cmuExport) has same size
>> >
>> > [root at bx1 restore]#  cmuImport -d /home/restore/ -n mail.xxxx.de -i
>> > xx.xx.xx.xx
>> > Reading config file: /etc/cmu/cmuConfig.xml
>> > LogFile location is /home/cmu/cmu.log
>> > Enter admin's password:
>> > Password ok.
>> > We exported 0 vsites, 0 users, 0 lists
>> > ===> Checking Virtual Sites <===
>> > ===> Checking Users <===
>> > Creating virtual site: mail.xxx.de
>> > Creating user: ramme
>> > restoring archive for ramme
>> > Creating user: aozadmin
>> > restoring archive for aozadmin
>> > Creating user: aoz-opplan
>> > restoring archive for aoz-opplan
>> > ...
>> > *Import works fine, but
>> >
>> > [root at bx1 aozadmin]# ls -la
>> > insgesamt 48
>> > drwxrws--x 7 aozadmin site1 4096 20. Mai 15:03 .
>> > drwxr-sr-x 3 root     site1 4096 20. Mai 15:03 ..
>> > -rw-r--r-- 1 aozadmin site1   24 24. Apr 2008  .bash_logout
>> > -rw-r--r-- 1 aozadmin site1  191 24. Apr 2008  .bash_profile
>> > -rw-r--r-- 1 aozadmin site1  124 24. Apr 2008  .bashrc
>> > -rw-r--r-- 1 aozadmin site1  110 20. Mai 15:03 .forward
>> > drwx--S--- 2 aozadmin site1 4096 17. Jul 2006  mail
>> > -rw------- 1 aozadmin site1    0 27. Apr 2008  mbox
>> > drwxr-s--x 2 aozadmin site1 4096 30. Jun 2006  Network Trash Folder
>> > drwx--S--- 8 aozadmin site1 4096 17. Jul 2006  .openwebmail
>> > drwx--S--- 2 aozadmin site1 4096 30. Jun 2006  Private
>> > -rw------- 1 aozadmin site1  262 17. Jul 2006  .vacation.msg
>> > drwxrwsr-x 2 aozadmin site1 4096 20. Mai 15:03 web
>> >
>> > *my mbox-file is empty :(
>> >
>> > Any clues, hints ?
>> >
>> > Greetings
>> > Roman
>> ------- End of Original Message -------
>>
>>


Roman

Here is the script  that I used to restore the mbox files after a
migration:

#!/usr/bin/perl
##################################################################
# This script should restore the mbox for all users
# it assumes you have the backup fiels in   /home/restore

@ls =`ls -1 /home/restore  | grep users | grep private.tar.gz `;
$als = "@ls";


foreach $userfile  (@ls){
   chomp ($userfile);
   print "Doing  $userfile  \n";

   $user = $userfile;
   $user =~ s/-private.tar.gz//;
   $user =~ s/users-//;
   $user =~ s/^1.//;
   $user =~ s/^2.//;

   $tarfile = "/home/restore/$userfile";


    $groupls = `ls -la ~$user`;
    @site = split(/\s/,$groupls );
    foreach $group  (@site){
      if  ( $group  =~ /site/ ) {
        $thegroup = $group;
      }
    }

   system ("tar xzvpf $tarfile mbox");
   if ( -e "mbox" ) {
     system ("mv  mbox ~$user/mbox");
     print "mv  mbox ~$user/mbox";


    print "\n chgrp  $thegroup ~$user/mbox  \n";
    system ("chgrp  $thegroup ~$user/mbox");
  }
}





----
Ken Marcus
Ecommerce Web Hosting by
Precision Web Hosting, Inc.
http://www.precisionweb.net



-----snipp-------




On Fri, 2009-05-22 at 15:31 +0200, Outer-Net Support (Nikolas
Dafopoulos) wrote:
> When I CMU Export a site from BQ and CMU Import it to BX the users
> mbox mail files are always empty.
>  
> I have read other posts here with similar problems.
>  
> Has anyone found a solution to this
> Regards,
> Nikolas Dafopoulos
> 
> 
> 




More information about the Blueonyx mailing list