CAN'T RESTORE USER!!

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

leigh
Posts: 109
Joined: Tue Feb 07, 2006 11:35 pm
Location: At my desk.
Contact:

CAN'T RESTORE USER!!

Postby leigh » Mon Jun 19, 2006 2:11 am

Hi All,
Well, I've just been asked for the first time to restore deleted items.
The boss has lost a whole month of calendar and wants it back.
Each night I backup /var/opt/scalix/ using omsuspend and rsync.
I have a second scalix server.
I have just replaced /var/opt/scalix/ on the spare with the backup of /var/opt/scalix from last night.
Now I can't get anything at all from the spare server.
I can log in to SAC, but it shows no names in the users list.
I can't log in to webmail.
I can't IMAP.
I can't connect using Outlook.
omshowu shows the user names etc. all OK, even the System Login is the same.
What have I done and how can I get the boss' calendar back?

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jun 19, 2006 8:51 am

Hi,

ok, let's start with the basics.

If SAC does not display users, the system directory might be empty. See what comes back when you omsearch -m @all-attr@ -s

If that comes up with just the sxadmin users, your backup was incomplete :-( Tell me more about how you back up.

- is the restore server identical to the productions server? If not, make it so. Set the same hostname, IP address, etc. To do this, you will of course need to take it off the network temporarily. This is the easiest way to get the server back up in the shortest amount of time.

- Going forward, you will need a restore-ready machine for the purpose of backup/restore. As the old saying goes, no backup is complete without a functioning restore ;-)

Cheers,

Sascha.

leigh
Posts: 109
Joined: Tue Feb 07, 2006 11:35 pm
Location: At my desk.
Contact:

Postby leigh » Mon Jun 19, 2006 9:15 am

omsearch -m @all-attr@ -s lists all users on the main system.

My backup is done like this:

Code: Select all

#!/bin/bash
/opt/scalix/bin/omsuspend -s 299 &
sleep 2
rsync -az --delete /var/opt/scalix/ /scalix_backup
/opt/scalix/bin/omsuspend -r

I have then copied the scalix_backup directory to /var/opt/scalix on the standby server.

The hostname and IP address are, naturally, different on the backup machine to the production machine.
I'm a little confused, though. If I take the spare off the network and use the same IP address, how am I going to get the data I want out of it? I need to connect via Outlook and get just one month's calendar entries. My plan was to export the calendar to a .PST and then re-import it through Outlook. Is there some other way? That's assuming I can get it running.

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jun 19, 2006 9:58 am

OK, that sounds much better than I thought.

On the backup server, run ommodfqdn -o old.server.name -n new.server.name. Then, restart the Scalix server and Tomcat. Before you do that, make sure /etc/hosts is correct.

After that, you should be able to login thru SAC and should see all users.

Sascha.

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jun 19, 2006 9:59 am

You said omsearch -m @all-attr@ -s lists on the main system, how about on the backup system?

Sascha.

leigh
Posts: 109
Joined: Tue Feb 07, 2006 11:35 pm
Location: At my desk.
Contact:

Postby leigh » Mon Jun 19, 2006 10:16 am

Oops:

Code: Select all

 ommodfqdn: command not found

Would this be sxmodfqdn?

You said omsearch -m @all-attr@ -s lists on the main system, how about on the backup system?

Sorry, what I meant was, that when I run that command on the backup server, it lists all of the users who are installed on the production server, indicating that they have been transferred properly.

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jun 19, 2006 10:22 am

Oops, yes - sxmodfqdn.

Sascha

leigh
Posts: 109
Joined: Tue Feb 07, 2006 11:35 pm
Location: At my desk.
Contact:

Postby leigh » Mon Jun 19, 2006 10:25 am

And then this:

Code: Select all

Status -- search directory for HOST-FQDN=oldhostname and modify ...
[OM 16954] Entry not in the Directory

Status -- modify user with authid sxqueryadmin@oldhostname...
ommodu : [OM 8040] The user can't be found, or has been deleted.

Failed -- Error in modifying user sxqueryadmin@oldhostname
Status -- /opt/scalix/bin/sxmodfqdn has completed with one or more error.

leigh
Posts: 109
Joined: Tue Feb 07, 2006 11:35 pm
Location: At my desk.
Contact:

Postby leigh » Mon Jun 19, 2006 10:38 am

omshowu -n sxqueryadmin
shows the username (complete with hostname) of the production server (ie newhostname).

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jun 19, 2006 1:26 pm

Two things you should do. First, run omcheck (see the man page for details). Then if need be, run the resulting script to correct any permissions problems. Now, to make things easier, let's give example names for your production server and backup server as prodserv and backserv respectively. So, the sxmodfqdn command should be:

sxmodfqdn -o prodserv -n backserv

Thanks,
Rachel

leigh
Posts: 109
Joined: Tue Feb 07, 2006 11:35 pm
Location: At my desk.
Contact:

Postby leigh » Tue Jun 20, 2006 7:49 am

OK, now we might be getting somewhere.
omscan -i -s found a few permissions errors. The script it created has fixed them.
sxmodfqdn has successfully changed the fqdn.
Now when I log into SAC, I can see all of my users, and it reports the correct mailbox size for everybody.
However, I can't log into webmail. I have changed the user's password to one that I know. I can log into SAC with their username and password, but not webmail. I can also log into SAC with my username and password, but not webmail.
Any attempts to log in to webmail simply tells me the user name and password are incorrect.
Same applies when attempting to log in via Outlook connector.
Where to now?

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Tue Jun 20, 2006 8:02 am

to rule out authentication issues, please use either pop3 access or the Outlook client to connect to the server.

Using POP, telnet to server on port 110, then type in

USER yourusername
PASS yourpassword

If that works, fine. If not, we need to see logfiles.

Also, search for swa.properties on your host and make sure they have the new servername.

Sascha.

leigh
Posts: 109
Joined: Tue Feb 07, 2006 11:35 pm
Location: At my desk.
Contact:

Postby leigh » Tue Jun 20, 2006 8:23 am

POP3 login is OK.
I found 3 files called swa.properties. The only one which has the old hostname in it is /etc/opt/scalix/webmail/swa.properties
I have changed all occurences of the old hostname to the new one and restarted both scalix and scalix-tomcat.
Still no login to either webmail or Outlook.

leigh
Posts: 109
Joined: Tue Feb 07, 2006 11:35 pm
Location: At my desk.
Contact:

Postby leigh » Tue Jun 20, 2006 9:01 pm

Some more info that could be useful:
Attempting to log in to webmail generates these errors in /var/opt/scalix/logs/fatal

Code: Select all

ERROR                   IMAP Server Da(IMAP Server Pr) Wed Jun 21 10:57:35 2006
[OM 24070] Debug message for Lab use :
imapCreateAdminSocket: Could not bind to socket /var/opt/scalix/temp/imap-admin.5906 Error was: Permission denied
User Name: Leigh M. Sharpe / mail, pacificwireless/CN=Leigh Sharpe
Pid of logging process: 5906


SERIOUS ERROR           IMAP Server Da(IMAP Server Pr) Wed Jun 21 10:57:35 2006
[OM 24070] Debug message for Lab use :
imapCoreServer:Failed to create admin socket:
User Name: Leigh M. Sharpe / mail, pacificwireless/CN=Leigh Sharpe
Pid of logging process: 5906


ERROR                   IMAP Server Da(IMAP Server Pr) Wed Jun 21 10:57:35 2006
[OM 24070] Debug message for Lab use :
imapSatServer: Connect to Core socket FAILED: Connection refused
 Satellite aborting ...
User Name: Leigh M. Sharpe / mail, pacificwireless/CN=Leigh Sharpe
Pid of logging process: 5905


ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Tue Jun 20, 2006 9:56 pm

With the permissions errors and the fact that these files were restored from backup I'm wondering if the are file permission problems. I'll ask you to run:

omcheck -s -d >/tmp/omcheck.out

Read through the file. If there are indications that chmod's need to be performed please make omcheck.out executable and run it. That will set file permissions properly.

Thanks,
Don


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 3 guests