python: Extract backup_files and support backup_test