Koozali.org: home of the SME Server
		Obsolete Releases => SME Server 7.x => Topic started by: kirkf 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
			 
			
			- 
				Please report any problems to the Bug Tracker, and give a full account of what you attempted and any steps you followed.
			
 
			
			- 
				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
			 
			
			- 
				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
			 
			
			- 
				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
			 
			
			- 
				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