Question about backup

Started by johnny, November 29, 2018, 09:25:44 AM

Previous topic - Next topic

johnny

Hello guys,
I have a cronjob evey night for backing up everything, mysql and configuration files. The mysqldump takes some time though, around 6 minutes +
netxms reports a critical event after 3 minutes of the start of dump: Thread "Syncer Thread" is not responding
I assume that this is because of the mysqldump.
Is there another approach of doing daily backups?
should you stop/pause netxms service and then backup?
or is there a way to disable that check?

Alex Kirhenshtein

Yes, mysqldump lock tables, that's normal.
There are two solutions:
1) use mysql replication for backup
2) block SYS_THREAD_HANG for backup timeframe (I use this option in most setups).

Add new EPP rule at the top of the policy:

Event: SYS_THREAD_HANG
Script:
  now = localtime();
  return (now->hour == 3 && (now->min >= 10 && now->min =< 20));
Action: Stop processing

(I assume that backup is between 3:10 and 3:20 - adjust script as needed)

johnny

#2
ok I see, great thanks for the info.
I've just inserted in the existing rule in event processing Policy "Generate an alarm when one of the system threads hangs or stops unexpectedly"
I've added in the filtering script the following:
now = localtime();
return (now->hour == 1 && (now->min >= 00 && now->min =< 10));
if ( $node->name ="NODE_NAME" ){
Action: Stop processing}

I just want to stop only for the netxms server so replacing the NODE_NAME with netxms name would it work?

edit:
it didn't work I've understand why, it's because we say to the whole event to stop process

In order to do a specific for that node I should create a new rule and add as a source object that node right?

Victor Kirhenshtein

Hi,

if you need rule to work only for specific node it is easier to put that node into "Source" list and not attempt to filter it in the script.

Best regards,
Victor