Author Topic: Backup/restore  (Read 3354 times)

ian

  • Community Council Member
  • Zen Samurai
  • *****
  • Posts: 296
  • Karma: +10/-1
    • View Profile
    • Familie site
Backup/restore
« on: October 22, 2009, 08:01:37 pm »
Hello,

Backup/restore problem wit release 1.2.2

I have restored a configuration backup file ( from an eBox server release 1.2.2 ) on a brand new server from scratch with eBox release 1.2.2 and all the configuration settings are correct restored but the acces controls on the shares are not restored the access control is empty.

In the previous release the restore works correct.

Is there a solution for this problem ?

Thanks ,
Ian

javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: Backup/restore
« Reply #1 on: October 23, 2009, 10:40:24 am »
Do you mean access control in File sharing -> shares -> access control?

darklink

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Backup/restore
« Reply #2 on: October 23, 2009, 12:38:44 pm »
I can confirm that this is a problem, we have the same one.
Once restored the config doesn't contain any information about share permissions.

This information seems to dissapear in the file /var/lib/ebox/conf/samba.bak as soon as /etc/init.d/ebox samba restart is run

javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: Backup/restore
« Reply #3 on: October 23, 2009, 01:30:33 pm »
I'm looking into it...

ian

  • Community Council Member
  • Zen Samurai
  • *****
  • Posts: 296
  • Karma: +10/-1
    • View Profile
    • Familie site
Re: Backup/restore
« Reply #4 on: October 23, 2009, 01:39:57 pm »
Hello Javi,


Yes it is in: File sharing -> shares -> access control.
This results that users connected by a windows Xp workstation does not have access to the shared files on the server, the client even does not see the share anymore in the file browser.

As i said problem does not exist in release 1.0, the configuration is correct afther a restore of a configuration file on a new installed server.

eBos is a fantastic application, the only problem is that the developpers must take more care of backup/restore utilities in the application and be sure that here is no problem with upgrading to new releases. This will be result in a real reliable system.



Best regards,
Ian  
 

javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: Backup/restore
« Reply #5 on: October 23, 2009, 02:56:32 pm »
Ok guys, bug confirmed. The error is that the restore process does not have into account that it has to restore the users module before the samba module.

Until we upload a new package fixing this, you can easily workaround this issue running:

Code: [Select]
sudo /usr/share/ebox/ebox-restore-backup  --module samba /var/lib/ebox/conf/backups/<your_back_up>.tar

The above command will restore the samba module from the backup file it takes as an argument. As users and groups haven been already restored you will get back your access control configuration.

Thanks for reporting this!

darklink

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Backup/restore
« Reply #6 on: October 23, 2009, 03:13:23 pm »
Nice one, thanks!

 :D

Better and quicker support than most commercial softwares!

ian

  • Community Council Member
  • Zen Samurai
  • *****
  • Posts: 296
  • Karma: +10/-1
    • View Profile
    • Familie site
Re: Backup/restore
« Reply #7 on: October 24, 2009, 10:14:51 am »
Thanks,

Ian

ian

  • Community Council Member
  • Zen Samurai
  • *****
  • Posts: 296
  • Karma: +10/-1
    • View Profile
    • Familie site
Re: Backup/restore
« Reply #8 on: October 24, 2009, 10:55:38 am »
hello Javi,

I have tried on my test server, but the problem is still there.

Afther executing your proposed command, the access control lists on the shares are still empty .

However the file smb.conf is ok now , the share definitions are now back in the smb.conf file and the users on the client workstations have access to there files.

So there is still the problem of seeing the access control lists in the eBox administrator screens.

Maybe this extra info helps to solve the problem.
Thans ,
Ian

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Backup/restore
« Reply #9 on: October 24, 2009, 03:00:41 pm »
Hi,
 we have a fix in the backup process, that I think it may solve your issue. This is not package yet, but if you need it right now you can patch your installation manually.

To do so:
1) Grab the new version of the Backup.pm file at -> http://trac.ebox-platform.com/export/15054/trunk/client/ebox/src/EBox/Backup.pm
2) Use it to replace the previous version at /usr/share/perl5/Ebox/Backup.pm 
  (For example: cp -bf /tmp/Backup.pm /usr/share/perl5/EBox/Backup.pm )
3) Restart ebox webserver with this command:
/etc/init.d/ebox restart

ian

  • Community Council Member
  • Zen Samurai
  • *****
  • Posts: 296
  • Karma: +10/-1
    • View Profile
    • Familie site
Re: Backup/restore
« Reply #10 on: October 25, 2009, 10:12:20 am »
Thanks,

Should i replace this file on the server where i will backup the configuration, and make a new backup of the configuration and then restore the backup file on the new server ?

Regards an thanks again,
Ian

ian

  • Community Council Member
  • Zen Samurai
  • *****
  • Posts: 296
  • Karma: +10/-1
    • View Profile
    • Familie site
Re: Backup/restore
« Reply #11 on: October 25, 2009, 11:13:52 am »
Hello,

I have copy the file " Backup.pm " as explained on the server where i will backup the configuration, so i can restore the configuration backup file on a brand new eBox server.
Afther the copy i have restarted the server, but samba wont start again and give the following errors:

A really nasty bug has occurred
Exception
root command /etc/init.d/samba start failed. Error output: Command output: * Starting Samba daemons  [fail] . Exit value: 1
Trace
root command /etc/init.d/samba start failed.
Error output:
Command output: * Starting Samba daemons  [fail]
.
Exit value: 1 at /usr/share/perl5/Error.pm line 182
Error::throw('EBox::Exceptions::Sudo::Command', 'cmd', '/etc/init.d/samba start', 'output', 'ARRAY(0xaafb408)', 'error', 'ARRAY(0xaa7adb8)', 'exitValue', 1, ...) called at /usr/share/perl5/EBox/Sudo.pm line 190
EBox::Sudo::_rootError('/usr/bin/sudo -p sudo: /var/lib/ebox/tmp/TiVAq5aBTt.cmd 2> /v...', '/etc/init.d/samba start', 256, 'ARRAY(0xaafb408)', 'ARRAY(0xaa7adb8)') called at /usr/share/perl5/EBox/Sudo.pm line 157
EBox::Sudo::root('/etc/init.d/samba start') called at /usr/share/perl5/EBox/Module/Service.pm line 484
EBox::Module::Service::_startDaemon('EBox::Samba=HASH(0xa93428c)', 'HASH(0xb22a638)') called at /usr/share/perl5/EBox/Module/Service.pm line 523
EBox::Module::Service::_manageService('EBox::Samba=HASH(0xa93428c)', 'start') called at /usr/share/perl5/EBox/Module/Service.pm line 539
EBox::Module::Service::_startService('EBox::Samba=HASH(0xa93428c)') called at /usr/share/perl5/EBox/Module/Service.pm line 650
EBox::Module::Service::_enforceServiceState('EBox::Samba=HASH(0xa93428c)', 'restart', 1) called at /usr/share/perl5/EBox/Module/Service.pm line 596
EBox::Module::Service::_regenConfig('EBox::Samba=HASH(0xa93428c)', 'restart', 1) called at /usr/share/perl5/EBox/Module/Service.pm line 621
EBox::Module::Service::restartService('EBox::Samba=HASH(0xa93428c)') called at /usr/share/perl5/EBox/CGI/EBox/RestartService.pm line 51
EBox::CGI::EBox::RestartService::_process('EBox::CGI::EBox::RestartService=HASH(0xaa50b3c)') called at /usr/share/perl5/EBox/CGI/Base.pm line 261
EBox::CGI::Base::run('EBox::CGI::EBox::RestartService=HASH(0xaa50b3c)') called at /usr/share/perl5/EBox/CGI/Run.pm line 120
EBox::CGI::Run::run('EBox::CGI::Run', 'EBox/RestartService', 'EBox') called at /usr/share/ebox/cgi/ebox.cgi line 19
ModPerl::ROOT::ModPerl::Registry::usr_share_ebox_cgi_ebox_2ecgi::handler('Apache2::RequestRec=SCALAR(0xa9eedc0)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
eval {...} called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0xaa50938)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 170
ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0xaa50938)') called at /usr/lib/perl5/ModPerl/Registry.pm line 31
ModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0xa9eedc0)') called at -e line 0
eval {...} called at -e line 0

Best regards
Ian

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Backup/restore
« Reply #12 on: October 26, 2009, 09:04:17 am »
Ian, this seems another different bug. You get this when you click in 'Save changes' after the restore?.

ian

  • Community Council Member
  • Zen Samurai
  • *****
  • Posts: 296
  • Karma: +10/-1
    • View Profile
    • Familie site
Re: Backup/restore
« Reply #13 on: October 26, 2009, 10:58:50 am »
Javi,


This error appears afther i have copyed the File on the eBox server and reboot the server, Samba wont start again and give the error.

P.s. i have copyed the file to the eBox server, where i will made a new backup of the configuration so that this configuration can be restored on a new eBox server build from scratch.

I did not tryed to copy the backup.pm file on the new installed server buid from scratch, and then restore the configuration.

So the problem is, afther copy the new backup.pm on the server and perform a reboot of the server Samba is not restarted, and give the errors.

Best regards,
Ian

javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: Backup/restore
« Reply #14 on: October 26, 2009, 11:07:07 am »
Can you please do this?

Code: [Select]
sudo /etc/init.d/ebox samba stop
sudo testparm
sudo /etc/init.d/samba  start

And check the logs in /var/log/samba/*