def bootstrap(self, to_version: str, existing_index_settings: Optional[List[MarqoIndex]]) -> None:
        """
        Bootstrap the Vespa application package to match the Marqo version. This will
        1. Migrate the existing index settings (once-off for the first time)
        2. Configure query profiles
        3. Configure custom components and copy component jar files
        4. Update the MarqoConfig version to match Marqo version
        5. Create a backup zip file containing old version of changed files for rollback
        6. Deploy the application pacakge
        """
        logger.info(f'Bootstrapping the vector store to {to_version}')

        if not self._store.file_exists(self._MARQO_INDEX_SETTINGS_FILE):
            # Migrate existing index settings from previous version of Marqo. This migration is a once-off operation.
            # It will be skipped if the index setting json files exists after the first bootstrapping.
            if existing_index_settings:
                logger.debug(f'Migrating existing index settings {[index.json for index in existing_index_settings]}')
                for index in existing_index_settings:
                    self._index_setting_store.save_index_setting(index)

            logger.debug(f'Persisting index settings: {self._index_setting_store.to_json()}')
            # please note that the index settings are not saved in backup since rolling back index settings might
            # cause corruption of an index.
            self._persist_index_settings()

        # A backup is created and passed to all the places a config file is updated or added, so that the older
        # version of the config can be backed up, or marked as need-to-remove when rolling back.
        backup = VespaAppBackup()
        self._configure_query_profiles(backup)
        self._copy_components_jar()  # we do not back up jar file
        self._service_xml.config_components()
        self._marqo_config_store.update_version(to_version)

        logger.debug(f'Persisting services.xml file: {self._service_xml}')
        self._store.save_file(self._service_xml.to_xml(), self._SERVICES_XML_FILE, backup=backup)

        logger.debug(f'Persisting marqo config: {self._marqo_config_store.get().json()}')
        self._store.save_file(self._marqo_config_store.get().json(), self._MARQO_CONFIG_FILE, backup=backup)

        logger.debug(f'Generating backup file {self._BACKUP_FILE} from {backup}')
        self._store.save_file(backup.to_zip_stream().read(), self._BACKUP_FILE)
        self._deploy()

        Bootstrap the Vespa application package to match the Marqo version. This will
        1. Migrate the existing index settings (once-off for the first time)
        2. Configure query profiles
        3. Configure custom components and copy component jar files
        4. Update the MarqoConfig version to match Marqo version
        5. Create a backup zip file containing old version of changed files for rollback
        6. Deploy the application pacakge
        
src/marqo/core/index_management/vespa_application_package.py