Implemented automatic planning of backup sessions.

+ some speed measurments