Koozali.org: home of the SME Server

Recovering data

fireballer44

Recovering data
« on: November 14, 2006, 04:34:26 PM »
I was just forced to speed up my upgrade to SME7.0.  I had already begun the setup on new hardware.  Well, the old server (which was really just a computer) crashed on me.  It was running 6.0.1 and is now giving a kernel panic error very early in the boot process.
 
Question is, what is the best way to get my data off of there.  I have a ton of e-mail accounts that use the webmail whose information will need to be moved to the new server.  

When I boot the SME7.0 CD on that hardware (as in to do an upgrade) it doesn't detect the 6.0.1 OS at all.  Booting by entering SMEServer-up single (I may have the 1st part wrong, but I know I am doing it right when I actually type it in) gives me the same kernel panic.

Where to go from here? It is VERY important I retreive this data if at all possible.

Thanks!

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Recovering data
« Reply #1 on: November 14, 2006, 07:16:06 PM »
Quote from: "fireballer44"
It was running 6.0.1 and is now giving a kernel panic error very early in the boot process.


What is the actual message? for example I had a kernel panic on my SUSE box and that was because my HD went down in a bad way, so depending on what has happend then I would suggest (if harddrive is ok) using knoppix to recover the data.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

fireballer44

Recovering data
« Reply #2 on: November 18, 2006, 05:33:35 PM »
Ok, I have some more info.  I will be working on this today, need to get the data off.

First question, I booted knoppix and in QTParted the partition is there but it is listed of unknown type.  Anyway I can get data from this partition??

Second question, once I get to the data, how would I proceed to copy the mail and address books (from the webmail) to the 7.0 server?

Thanks, I hope someone can reply soon....I will be researching this as well

fireballer44

Recovering data
« Reply #3 on: November 18, 2006, 10:26:23 PM »
Ok, I got all my files off the old server and am QUITE relieved.  Here is what I don't yet know how to do:

I need to copy all the mail folders onto the new server.  All the data is on the server,  but it is just sitting in an ibay and needs to be moved to its home.... But, I don't know where in belongs in 7.0

Any help??

Thanks

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Recovering data
« Reply #4 on: November 19, 2006, 12:03:02 AM »
Regards,
William

IF I give advise.. It's only if it was me....

fireballer44

Recovering data
« Reply #5 on: November 19, 2006, 02:47:08 AM »
I have about 60 users.....probably 20 of these have a lot of folders, the rest should be fairly simple.

Thanks for that link, hopefully that will work better.  I found another one that had a script (was thrilled) but I couldn't modify that script to make it work.  It would't work at all on my version.

fireballer44

Recovering data
« Reply #6 on: November 20, 2006, 06:04:02 PM »
Thanks for your help, I am getting my folder data copied fine now.  There were just a few discrepancies that bash didn't like.  Now, can anyone help with the address book (turba)?

BTW, if someone can tell me how to make a contrib, I made a shell script that is easy to use.  It could be modified very easily to fit any similar situation.  I would be glad to post it and help everyone out.

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Recovering data
« Reply #7 on: November 24, 2006, 01:13:35 AM »
Quote from: "fireballer44"
I made a shell script that is easy to use.  It could be modified very easily to fit any similar situation.  I would be glad to post it and help everyone out.


Post it.

Information wants to be free.
Regards,
William

IF I give advise.. It's only if it was me....

fireballer44

Recovering data
« Reply #8 on: November 27, 2006, 06:18:23 PM »
Here is the script.  Set the source and destination and then just run it.  It will ask for username and copy all the folders from that name.


Code: [Select]

# Script to copy mail files from SME 6 to SME 7

# Get username from console
echo "Enter User Name:"
read uname

# Location Variables:
# --Set the source to the users directory of your SME 6 data
#
# --The destination is already set to the SME 7 default
# --you may change it if you would like to move to different directory
#
# Source and destination directories must be in the form username/Maildir/
sourceloc=/home/e-smith/files/ibays/Primary/files/users
destloc=/home/e-smith/files/users

cd $sourceloc/$uname/Maildir
ls -d1 ';'* | (
while read DIR
do
        newpath=$(echo $DIR | awk '{gsub(/;/,"."); print $0}')
        mv "$sourceloc/$uname/Maildir/$DIR" "$destloc/$uname/Maildir/$newpath"
done
)

chown -R $uname:$uname $destloc/$uname

# All is done, your folders are copied
[/code]

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Recovering data
« Reply #9 on: November 28, 2006, 04:50:35 AM »
Thank You.
Regards,
William

IF I give advise.. It's only if it was me....

Offline tariqf

  • ****
  • 179
  • +0/-0
Recovering data
« Reply #10 on: February 11, 2007, 10:59:27 PM »
did you find out how to copy your addressbooks? I have the same problem and have copied the horde db from my old server but addressbooks are still showing empty even though I can see them in mysql.

Offline Mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Recovering data
« Reply #11 on: May 16, 2007, 08:33:50 PM »
tariqf,

There is an export/import feature in the webmail application. Perhaps you might find a way to automate this using code snippets in the webmail app.

I didn't want to deal with that. In my case, while there are a large number of users, only a very few use the address books in webmail to any great extent. I asked the users to export their address books by a specific date and import them into the new system after another date.

Not a very nice approach, but it does clear out the cruft. So far, no one has complained.
- Mark