Is it necessary to have Moodle in maintenance mode while taking backup of data and db?
Necessary, no...wise, yes! Putting in maintenance mode ensures there are no updates to the database while it is being backed up which will avoid the possibility of corruption due to changes being made as it is being backed up.
My thoughts too, I just wanted to be sure, it would be nice if it was not necessary to shut down the system regularly. Anyway, thanks for your answer.