Koozali.org: home of the SME Server

Proper restore procedure 6.0.1 -> 7.0 [SOLVED]

kirkf

Proper restore procedure 6.0.1 -> 7.0 [SOLVED]
« on: September 23, 2006, 07:11:40 PM »
I'm trying to restore a backup from a 6.0.1 server to a fresh 7.0 install.  I've used variation of the script developed here:

http://forums.contribs.org/index.php?topic=31159.0

The users and data seem to be copied cleanly, but the pre-restore event seems not do what I expected.  The old and new passwd files are not correctly merged (some system users are missing afterwards).

When the post-upgrade runs, the S05imap-relocate-maildirs script returns:

esmith::event[27946]: Couldn't chdir User::pwent=ARRAY(0x9614ae4)->dir:No such file or directory

I've also observed that the mysql databases are not migrated properly.  

Can anyone suggest a procedure to try?  I'm not sure how to start troubleshooting this.

Kirk

Offline byte

  • *
  • 2,183
  • +2/-0
Proper restore procedure 6.0.1 -> 7.0 [SOLVED]
« Reply #1 on: September 23, 2006, 09:09:59 PM »
Please report any problems to the Bug Tracker, and give a full account of what you attempted and any steps you followed.
--[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!

kirkf

Proper restore procedure 6.0.1 -> 7.0 [SOLVED]
« Reply #2 on: September 23, 2006, 09:19:02 PM »
Yes, I usually do open a bug in such a case, but I think the problems here are out of the ordinary as the 6.0.1 system had several contribs, which I didn't have the opportunity to remove as hardware failure crashed the server.

I do have the full contents of /etc, /home, and a dump of the databases created with mysqldump, so I'm trying to patch it back together.

Kirk

kirkf

Proper restore procedure 6.0.1 -> 7.0 [SOLVED]
« Reply #3 on: September 24, 2006, 06:25:44 PM »
Turned out that nothing was wrong with the procedure.  The server that failed turned out to have had a user that was listed in the db as user-deleted, and for some reason the pre-restore event failed, so the new server's passwd file was missing key users.  In addition the imap-relocate-maildirs event during post-upgrade failed while attempting to process this user.  Once I removed that entry from the db, the post-upgrade completed properly, and the maildirs were in the correct format.  I had to fix the missing user entries by hand (useradd), copying the parameters from another SME7 box.

The missing users included:

haldaemon
nut
spamd
qpsmtpd

clamav existed, but had wrong uid, gid, home, and shell.

I suppose that the backup script should either ask the user to run (and verify) pre-backup manually or should check that it completes succesfully before continuing.

Kirk

Offline raem

  • *
  • 3,972
  • +4/-0
Proper restore procedure 6.0.1 -> 7.0 [SOLVED]
« Reply #4 on: September 25, 2006, 04:32:47 AM »
kirkf

I think you were just probably missing a lot of user and password info.
See this thread
http://forums.contribs.org/index.php?topic=30745.0

re the need to do:

On the old sme6 server prior to shutting down do:
/sbin/e-smith/signal-event pre-backup
...

kirkf

Proper restore procedure 6.0.1 -> 7.0 [SOLVED]
« Reply #5 on: September 25, 2006, 05:41:21 AM »
Yes, I wish I could have done a pre-backup.  Unfortunately the server had already failed before I started the recovery, and I only had the /etc and /home files and a mysql dump of all the databases...

All seems well now, though.  Based on what I've learned here, I'll have to refine the backup procedures to include the pre-backup step.

Thanks,

Kirk