Make the backup script more generic