Implement fn_find_backups to reduce code duplication.
Implement fn_expire_backups to reduce code duplication.