The exchange would know because their server is monitoring the block chain. Whether the block was generated after they restarted or hours before, they are monitoring each block as it arrives at their server and they know how far they have tracked.
So, server restarts. It sees that it has tracked all the transactions in the block chain up to block X. Block X+1 arrives from peers, process that block just as if we'd been connected all the time - after all, it could have JUST been mined or mined hours ago, it doesn't matter. Block X+2 arrives do the same. Block X+3 arrives, etc.
Whether they get blocks X+1, X+2, X+3 in 10 seconds or 60 minutes doesn't matter, they are doing the same thing: processing blocks as they arrive.
So scenario is, if some of exchange's user deposit coin to his address given by the exchange, but at that time that exchange's coin daemon server was down,
then how exchange know later those missing transactions and record all of them to own record DB?
manually type [ coind listtransactions ] and compare manually?
Aren't there more automatic handling way of this sort of problem?