Please help! backup.pl failed ./var/log/Daemon: file changed as we read it

Moderator: crythias

Post Reply
ritacc
Znuny newbie
Posts: 6
Joined: 05 Feb 2021, 00:47
Znuny Version: 6.0.30
Real Name: Rita Chen

Please help! backup.pl failed ./var/log/Daemon: file changed as we read it

Post by ritacc »

Hi,
I wanted to shutdown my services and daemon, and do a backup, but it has error that "./var/log/Daemon: file changed as we read it"
The /opt/otrs/var/log/Daemon generate new error logs multiple times every minutes, though I stop all the services and cron job. This error didn't happen before. Please advise how to fix it!

systemctl stop crond
systemctl stop postfix
systemctl stop httpd
sudo su -m otrs
cd /opt/otrs
bin/Cron.sh stop
bin/otrs.Daemon.pl stop

su
[root@ticket home]# /opt/otrs/scripts/backup.pl -d /home/otrs_backups
Backup /home/otrs_backups/2021-03-14_19-22/Config.tar.gz ... done
Backup /home/otrs_backups/2021-03-14_19-22/Application.tar.gz ... tar: ./var/log/Daemon: file changed as we read it
failed
Deleting incomplete backup /home/otrs_backups/2021-03-14_19-22 ... done

example error log in /opt/otrs/var/log/Daemon:
cat SchedulerCronTaskManagerERR-1615768972.log
ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SchedulerCronTaskManager-10 Perl: 5.16.3 OS: linux Time: Sun Mar 14 19:42:53 2021

Message: Error creating DateTime object.

Traceback (15894):
Module: Kernel::System::DateTime::new Line: 154
Module: Kernel::System::ObjectManager::_ObjectBuild Line: 306
Module: Kernel::System::ObjectManager::Create Line: 241
Module: Kernel::System::CronEvent::PreviousEventGet Line: 226
Module: Kernel::System::Daemon::SchedulerDB::CronTaskToExecute Line: 1435
Module: Kernel::System::Daemon::DaemonModules::SchedulerCronTaskManager::Run Line: 100
Module: (eval) Line: 316
Module: main::Start Line: 316
Module: bin/otrs.Daemon.pl Line: 137


Thanks!
ritacc
Znuny newbie
Posts: 6
Joined: 05 Feb 2021, 00:47
Znuny Version: 6.0.30
Real Name: Rita Chen

Re: Please help! backup.pl failed ./var/log/Daemon: file changed as we read it

Post by ritacc »

OK, I fixed it by adding one exclusion to backup.pl
my $Excludes = "--exclude=var/tmp --exclude=js-cache --exclude=css-cache --exclude=.git --exclude=/opt/otrs/var/log/Daemon";
Post Reply