Ticket #2441 (closed defect: worksforme)
Backup impossible because of sliced backup code in EBox/EBackup.pm -- tentative solution attached
| Reported by: | fulvio@… | Owned by: | javier.amor.garcia@… |
|---|---|---|---|
| Milestone: | Component: | ebackup | |
| Severity: | blocker | Keywords: | backup ebackup slicedbackup |
| Cc: |
Description
The merge of revision 19033 appears to have introduced a bug which makes impossible to perform scheduled backups. Here is the quiet error:
Undefined subroutine &EBox::Logs::SlicedBackup::archiveDir called at /usr/share/perl5/EBox/EBackup.pm line 336, <GEN1> line 1205.
And here the stacktrace:
Undefined subroutine &EBox::Logs::SlicedBackup::archiveDir called at /usr/share/perl5/EBox/EBackup.pm line 328.
at /usr/share/perl5/EBox/EBackup.pm line 328
EBox::EBackup::_autoExcludesArguments('EBox::EBackup=HASH(0x962bbd0)') called at /usr/share/perl5/EBox/EBackup.pm line 292
EBox::EBackup::remoteFileSelectionArguments('EBox::EBackup=HASH(0x962bbd0)') called at /usr/share/perl5/EBox/EBackup.pm line 228
EBox::EBackup::remoteArguments('EBox::EBackup=HASH(0x962bbd0)', 'full') called at /usr/share/ebox-ebackup/ebox-remote-ebackup line 131
both the result of invoking /usr/share/ebox-ebackup/ebox-remote-ebackup --full .
Line 328 of EBox/EBackup.pm contains the following text:
my $slicesDir = EBox::Logs::SlicedBackup::archiveDir();
The subroutine doesn't appear to exist, so I cobbled together some code to access that configuration value mirroring the code in EBox/Logs/SlicedBackup.pm
--- EBox-original/Ebackup.pm 2010-10-18 11:33:32.000000000 +0200
+++ EBox/EBackup.pm 2010-10-18 11:33:39.000000000 +0200
@@ -42,6 +42,7 @@
use EBox::Exceptions::MissingArgument;
+use constant SLICED_CONF_FILE => EBox::Config::etc() . '90eboxpglogger.conf';
use constant EBACKUP_CONF_FILE => EBox::Config::etc() . '82ebackup.conf';
use constant EBACKUP_MENU_ENTRY => 'ebackup_menu_enabled';
use constant DUPLICITY_WRAPPER => EBox::Config::share() . '/ebox-ebackup/ebox-duplicity-wrapper';
@@ -325,7 +326,7 @@
$args .= "--exclude=/proc --exclude=/sys ";
# exclude sliced backups directory
- my $slicesDir = EBox::Logs::SlicedBackup::archiveDir();
+ my $slicesDir = EBox::Config::configkeyFromFile('eboxlogs_sliced_backup_archive', SLICED_CONF_FILE);
if ($slicesDir) {
$args .= "--exclude $slicesDir ";
}
I believe a correction to the code in question to be necessary and quite urgent, as it breaks completely the current backup functionality.
Regards, Fulvio Scapin
Attachments
Change History
comment:1 Changed 3 years ago by javier.amor.garcia@…
- Owner changed from jsalamero@… to javier.amor.garcia@…
- Status changed from new to assigned
Hi fulvio,
the missing subroutine is present in the last version of the ubuntu package 'ebox'. To avoid this problem a dependency in the correct version of 'ebox' was added to the ebox-ebackup modulem so surely with a update your problem will be fixed. So tou know the drill:
$ apt-get update $ apt-get install ebox ebox-ebackup
If after the update you have the same problem, please attach your ebox & ebox-ebackup ubuntu version numbers and we will look into it.
comment:2 Changed 3 years ago by fulvio@…
My bad. I looked at the current code base looking for that sort of change but obviously I missed it. I'll update the ebox package ASAP and report back.
Thanks again for the celerity of the answer.
Regards, Fulvio Scapin
comment:3 Changed 3 years ago by Koti
After updating
$ apt-get update $ apt-get install ebox ebox-ebackup
/usr/share/ebox-ebackup/ebox-remote-ebackup --full is giving below error:
Reconnecting to redis server... at /usr/share/perl5/EBox/Config/Redis.pm line 541, <GEN4> line 1. -bash: GEN4: No such file or directory
Regards Koti.I.S
