Ticket #4053, manually merge improvements on rrd backup handling.
Ticket #4053, manually merge improvements on rrd restore handling.