Koozali.org: home of the SME Server

Access denied after restore

Offline Stuart

  • *
  • 37
  • +0/-0
Access denied after restore
« on: April 04, 2008, 12:57:41 AM »
Hi,

I have been working on a simple backup solution for our server using code like the following ...

Code: [Select]
/bin/tar -z --directory / --create home/e-smith etc/e-smith/templates-custom etc/e-smith/templates-user-custom etc/passwd etc/shadow etc/group etc/gshadow etc/smbpasswd etc/ssh root/.ssh -f /home/e-smith/files/ibays/Primary/files/smeserver.tgz
The backup runs O.K., I have shares, schedules everything sorted out.  The problem is that once a restore is performed, I can access server-manager from a web browser, but I am unable to access the ibays.

I performed a clean install of SME 7.3, checked I could access the Primary ibay, changed nothing except to run the above command.  Then I performed another clean install of SME 7.3 and answered yes to restore, and I am unable to access the Primary ibay.

All email restores correctly and works fine, all files in ibays are restored, I can see no other problem except access to ibays.

When try to browse ie - \\mail the error is usually that the server can not be found, if I uses the ip - \\10.10.10.10 I get asked for a username and password, but they are not excepted.

What am I missing?

Stuart

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Access denied after restore
« Reply #1 on: April 04, 2008, 01:22:54 AM »
What am I missing?

...among others the samba password file. You only have the symbolic link /etc/smbpasswd in your backup but not the original file /etc/samba/smbpasswd where the link is pointing to.

Try:
Code: [Select]

signal-event pre-backup
cd /
tar czf smeserver.tgz `perl -e 'use esmith::Backup; $b=new esmith::Backup; print join("\n",$b->restore_list)'`
signal-event post-backup



« Last Edit: April 04, 2008, 01:32:51 AM by mweinber »

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Access denied after restore
« Reply #2 on: April 04, 2008, 08:07:50 AM »
...

Offline Stuart

  • *
  • 37
  • +0/-0
Re: Access denied after restore
« Reply #3 on: April 04, 2008, 08:15:53 AM »
Thanks guys,

The esmith backup list certainly makes this easier, it now works flawlessly.

Stuart

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Access denied after restore
« Reply #4 on: April 04, 2008, 08:56:24 AM »
Stuart

Quote
I can see no other problem.....
What am I missing?

If you are using this technique as a backup solution, then you are missing the mysql databases.
You need to do a dump of the mysql dbs and then include that file in your backup and restore.
The code posted by mweinber includes that functionality (in the pre backup event)
...

Offline Stuart

  • *
  • 37
  • +0/-0
Re: Access denied after restore
« Reply #5 on: April 04, 2008, 09:02:31 AM »
Stuart

If you are using this technique as a backup solution, then you are missing the mysql databases.
You need to do a dump of the mysql dbs and then include that file in your backup and restore.
The code posted by mweinber includes that functionality (in the pre backup event)

That was one thing I did actually already know!  I didn't make it very clear in my original post exactly how I was doing this.  So...

I have a script in cron.daily to run almost exactly what mweinber posted.  I just change file locations etc.  It is then collected by our backup server prior to the backup going to tape.

I wanted to keep this simpler than using AFFA or Dar or whatever as we don't need synchronized servers or anything fancy.

Thanks again for all the info.

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Access denied after restore
« Reply #6 on: April 04, 2008, 09:47:23 AM »
Stuart,

the code in your orignal post places the smeserver.tgz in a directory which is included in the tar. As a result smeserver.tgz will contain a part of itself. You should exclude it with --exclude='home/e-smith/files/ibays/Primary/files/smeserver.tgz'

Offline Stuart

  • *
  • 37
  • +0/-0
Re: Access denied after restore
« Reply #7 on: April 07, 2008, 12:36:12 AM »
Thanks mweinber, I was aware of that as well, I just really needed to work out the problem I had first.

Again thanks so much guys.