https://github.com/meskyanichi/backup/pull/547

Backport of https://github.com/meskyanichi/backup/pull/547 for 3.x backup gem.

(to be honest, it was developed on the v3 branch - since we haven't upgraded to 4.x yet, then forward-ported into that PR)

(also closes #450)