Koozali.org: home of the SME Server

httpd broken after corrupt backup restore

Offline girkers

  • *
  • 296
  • +0/-0
    • gk computer services
httpd broken after corrupt backup restore
« on: April 12, 2015, 10:02:44 PM »
Hi All,

I was trying to restore a file from my backup and instead I did a full restore, but at the end of the restore it said that the backup is corrupt or not complete (can't remember exact wording). I then tried a do the reconfigure/reboot via the Server Manager but this failed. I did a reboot via the console and when the server restarted I was getting the message constantly http: bad user name www

If I create a www user and reboot the server this message no longer appears but I can't access any web pages. When I check the Primary ibay I can see that I am not using the correct guid:
Code: [Select]
drwxr-s--- 2  101  500 4096 Feb 15  2007 cgi-bin
drwxrws--- 2  101  500 4096 Oct  5  2014 files
drwxrws--- 7  101  500 4096 Feb 23 11:05 html
I have created the group www with guid 101 but this makes no difference.

Can anyone please help me get my server running again, as this has also broken Zarafa so I am not receiving emails. I will then later tackle the faulty backup issue.

Cheers

Girkers

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: httpd broken after corrupt backup restore
« Reply #1 on: April 13, 2015, 03:41:40 AM »
I have created the group www with guid 101 but this makes no difference.

You need the right uid and gid. But if your backup file is incomplete, you still have a broken system, even if you repair that small part of the passwd file.

Offline girkers

  • *
  • 296
  • +0/-0
    • gk computer services
Re: httpd broken after corrupt backup restore
« Reply #2 on: April 13, 2015, 05:08:14 AM »
Charlie,

I appreciate you taking the time to post, but could you please tell me how productive it is? Did you help get my server going again to the point where I can get to it and fix or at least get my data and email back so that I may do a proper backup and restore to new system?

NOPE. All you have pointed out to me is that my system is broke, yep already knew that. I equate it to taking your car that is having problems to your mechanic and he says, "yep it is broken".

For others that may wish to help so that I can at least get my data out of my system I attempted an upgrade from the ISO but that did not work, it seemed to go through extremely quickly and after rebooting I was left with the same problem.

I then installed a fresh install in a VM and was able to recreate the users and groups that were missing, i.e. was missing the admin & www user and was also missing the shared and www groups. I have fixed them and now I can access the Server Manager, but alas I can't access my ibays.

It is apparent that my /etc/passwd and /etc/group files are "corrupt" in other words, they are missing all of my users and groups. I have attempted to recreate my user so that I could at least more easily back up my data, but alas that ship has sailed.

I gave it a good crack and now I am moving on to rebuild, we have the power we have the technology.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: httpd broken after corrupt backup restore
« Reply #3 on: April 14, 2015, 03:26:15 PM »
I don't have any magic advice as to how you can restore your system if you don't have a complete/good backup file. Sorry.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: httpd broken after corrupt backup restore
« Reply #4 on: April 14, 2015, 09:38:38 PM »
girkers

Firstly there is no requirement on anybody here to give you extensive or exacting advice (for free) re how to repair your system, so please do not thrust your "bad attitude" on anyone who responds, irregardless of whether you felt their advice was useful to you or not.

Quote
For others that may wish to help so that I can at least get my data out of my system I attempted an upgrade from the ISO but that did not work......

I gave it a good crack and now I am moving on to rebuild, we have the power we have the technology.

Doing a full restore to an already configured system is a big NO NO, as you most likely end up with an inconsistent system that has many orphaned files & folders etc etc etc, & that applies even if your backup is good, & not faulty as yours was.

So, even though it was an inadvertant or accidental action on your part, it creates the situation where the only course of action you can legitimately take is to do a fresh install of SME server from the CD/DVD/USB, & then either Restore from a known good backup or manually set up your system (re-enter users, ibays, data etc).

Regarding recovering your old data etc, the only way to approach that when you have a system that is not fully functional (& assuming you have a 2 disk RAID1 array), is to remove the disks, recreate the server on new disks (or VM) by doing a fresh install from iso media, then attach & mount one of your old disks, then manually copy data & emails & so on from the mounted old disk to your new system.

You are in charge of your system, not us, so you are the one who needs to ensure your backups are good, & that you test & verify them, & even run a complete backup & restore sequence (to a test server) from time to time, to prove to yourself that all your procedures are good etc.

You are also the one who needs to take more care when restoring an individual file.

It is also a good idea to keep numerous independent historical backups (eg use rotating daily backups say 2 or 3 or 4 individual USB drives or whatever your backup system is) so that in the event a particular backup fails or is faulty, then you have an alternative backup to rely on under a worst case scenario.

So please instead of getting annoyed with Charlie & anyone who gives advice, get annoyed with yourself for failing to provide good technical support to yourself.

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.