scripts: Fixed some errors in backup_data script after testing