Broken pipes can indicate that a client or server is down.
Not knowing much about whatever
I guess you're running a backup at midnight that brings something down. And one of your processes is communicating with that 'something'.
So if you bring process A down (and process B assumes connectivity with process A), you also have to stop process B (and actually before you stop process A).
It's just a thought triggered by the fact that it starts at midnight, so checking your cron might be a place to look for the problem.