Zentyal Forum, Linux Small Business Server
Zentyal Server => Installation and Upgrades => Topic started by: ggowins on March 18, 2021, 12:54:00 am
-
As part of my testing, I do a backup of my live system, then try to restore to a standby system in case of a need for disaster recovery. I made a post-upgrade backup of my 7.0 live system, and installed 7.0 from the ISO on a standby system.
However, I'm getting an error when it gets to the Samba restore part. In the log it appears that there is an extra / being put into the path, but I can't figure out where that is coming from. Here is the output of the zentyal.log file for the error:
2021/03/17 18:44:50 ERROR> Sudo.pm:240 EBox::Sudo::_rootError - root command ln /var/lib/samba/private//sam.ldb.d/DC*FORESTDNSZONES* /var/lib/samba/bind-dns//dns/sam.ldb.d/ failed.
Error output: ln: target '/var/lib/samba/bind-dns//dns/sam.ldb.d/' is not a directory: No such file or directory
Command output: .
Exit value: 1 at root command ln /var/lib/samba/private//sam.ldb.d/DC*FORESTDNSZONES* /var/lib/samba/bind-dns//dns/sam.ldb.d/ failed.
Error output: ln: target '/var/lib/samba/bind-dns//dns/sam.ldb.d/' is not a directory: No such file or directory
Command output: .
Exit value: 1 at /usr/share/perl5/EBox/Sudo.pm line 240
EBox::Sudo::_rootError('/usr/bin/sudo -p sudo: /var/lib/zentyal/tmp/jwJ1aMsNvC.cmd 2> /var/lib/zentyal/tmp/stderr', 'ln /var/lib/samba/private//sam.ldb.d/DC*FORESTDNSZONES* /var/lib/samba/bind-dns//dns/sam.ldb.d/', 256, 'ARRAY(0x557b12d63088)', 'ARRAY(0x557b0de880a8)') called at /usr/share/perl5/EBox/Sudo.pm line 210
EBox::Sudo::_root(1, 'ln /var/lib/samba/private//sam.ldb.d/DC*FORESTDNSZONES* /var/lib/samba/bind-dns//dns/sam.ldb.d/') called at /usr/share/perl5/EBox/Sudo.pm line 153
EBox::Sudo::root('ln /var/lib/samba/private//sam.ldb.d/DC*FORESTDNSZONES* /var/lib/samba/bind-dns//dns/sam.ldb.d/') called at /usr/share/perl5/EBox/Samba.pm line 1954
EBox::Samba::restoreConfig('EBox::Samba=HASH(0x557b1179d9c8)', '/var/lib/zentyal/tmp//backup.bLiQqo/eboxbackup/samba.bak', 'installMissing', 0, 'progress', 'EBox::ProgressIndicator=HASH(0x557b10274448)', 'forceZentyalVersion', 0, 'continueOnModuleFail', 0, 'forceDependencies', 0, 'modsToExclude', 'ARRAY(0x557b0c978cb8)', 'dataRestore', 1, 'revokeAllOnModuleFail', 1, 'deleteBackup', 0) called at /usr/share/perl5/EBox/Module/Config.pm line 108
EBox::Module::Config::aroundRestoreConfig('EBox::Samba=HASH(0x557b1179d9c8)', '/var/lib/zentyal/tmp//backup.bLiQqo/eboxbackup/samba.bak', 'installMissing', 0, 'progress', 'EBox::ProgressIndicator=HASH(0x557b10274448)', 'forceZentyalVersion', 0, 'continueOnModuleFail', 0, 'forceDependencies', 0, 'modsToExclude', 'ARRAY(0x557b0c978cb8)', 'dataRestore', 1, 'revokeAllOnModuleFail', 1, 'deleteBackup', 0) called at /usr/share/perl5/EBox/Module/Base.pm line 420
EBox::Module::Base::restoreBackup('EBox::Samba=HASH(0x557b1179d9c8)', '/var/lib/zentyal/tmp//backup.bLiQqo/eboxbackup', 'forceZentyalVersion', 0, 'installMissing', 0, 'progress', 'EBox::ProgressIndicator=HASH(0x557b10274448)', 'modsToExclude', 'ARRAY(0x557b0c978cb8)', 'continueOnModuleFail', 0, 'forceDependencies', 0, 'dataRestore', 1, 'revokeAllOnModuleFail', 1, 'deleteBackup', 0) called at /usr/share/perl5/EBox/Backup.pm line 1338
EBox::Backup::_restoreModule('EBox::Backup', 'EBox::Samba=HASH(0x557b1179d9c8)', '/var/lib/zentyal/tmp//backup.bLiQqo', 'HASH(0x557b100fcd88)') called at /usr/share/perl5/EBox/Backup.pm line 1190
eval {...} at /usr/share/perl5/EBox/Backup.pm line 1189
eval {...} at /usr/share/perl5/EBox/Backup.pm line 1186
eval {...} at /usr/share/perl5/EBox/Backup.pm line 1164
EBox::Backup::restoreBackup('EBox::Backup', '/var/lib/zentyal/tmp/path', 'dataRestore', 1, 'revokeAllOnModuleFail', 1, 'installMissing', 0, 'forceZentyalVersion', 0, 'progress', 'EBox::ProgressIndicator=HASH(0x557b10274448)', 'forceDependencies', 0, 'continueOnModuleFail', 0, 'deleteBackup', 0) called at /usr/share/zentyal/restore-backup line 105
eval {...} at /usr/share/zentyal/restore-backup line 104
2021/03/17 18:44:50 ERROR> Backup.pm:1210 EBox::Backup::restoreBackup - Error while restoring: root command ln /var/lib/samba/private//sam.ldb.d/DC*FORESTDNSZONES* /var/lib/samba/bind-dns//dns/sam.ldb.d/ failed.
Error output: ln: target '/var/lib/samba/bind-dns//dns/sam.ldb.d/' is not a directory: No such file or directory
Command output: .
Exit value: 1
-
Hi ggowins,
Are you using the latest version (7.0.1) of the Domain Controller module? This issue was fixed in that version, below you have the link to the commit:
- https://github.com/zentyal/zentyal/commit/8b0828d5e98a218726ba5a92d72e374e65a07dcb
-
Just tried it again. Both running system and backup are on 7.0.1 for Domain Controller. Made a new backup, went to restore, and got the same message as I posted.
-
So in the commit you linked, I removed the trailing slash from the URLs in lines 84 and 85 in Samba.pm. That got rid of the double slash in the path in the error. But I'm continuing to get the error of no such file or directory. There isn't a bind-dns subdir in /var/lib/samba. I tried to manually create the whole path of bind-dns/dns/sam.ldb.d there, but it gets erased at some point of the restore process. When I get the error in the restore, those subdirs do not exist anymore.
-
Hi,
Did you upgrade your Zentyal 7.0 server from Zentyal 6.2?
As soon as I can, I will try to reproduce this behaviour.
-
Hi Daniel,
Yes, this was an upgrade from 6.2.
-
Hi Daniel,
Yes, this was an upgrade from 6.2.
Hi,
The issue that you are getting is caused by the new change of the DNS directory in Samba. Below you have a link to the upgrade script from Zentyal 6.2 where the issue and the workaround are reported and the commands to run (lines 279-286).
* https://github.com/zentyal/zentyal/blob/support/6.2/main/core/src/scripts/release-upgrade#L274
-
Hi Daniel,
Thanks for the information. Just to be clear, I run the specified commands from the upgrade script on my main system, do a backup, then also run the scripts on the disaster recovery machine, then do the restore? I'll give this a try over the weekend.
-
Hi,
Thanks for the information. Just to be clear, I run the specified commands from the upgrade script on my main system, do a backup, then also run the scripts on the disaster recovery machine, then do the restore? I'll give this a try over the weekend.
Yes, you have to run those commands in the Zentyal server 7.0 which was upgraded from 6.2 in order to be able to restore a configuration backup.
-
Sorry for the delay. I got sidetracked and wasn't able to come back to this until today. I ran the commands on the upgraded server, created a new backup, and it successfully restored onto the DR system. Thanks!