basebackup-validation.sh refactoring