[backport-1.7]: Allow client-side encryption of the backups

A solution for issue #2328 (closed) needs to be backported to 1.7.x