src/vs/workbench/api/common/extHostNotebook.ts/ExtHostNotebookController/$backupNotebook
class ExtHostNotebookController:	async $backupNotebook(viewType: string, uri: UriComponents, cancellation: CancellationToken): Promise<string> {
		const document = this.getNotebookDocument(URI.revive(uri));
		const provider = this._getProviderData(viewType);

		const storagePath = this._extensionStoragePaths.workspaceValue(provider.extension) ?? this._extensionStoragePaths.globalValue(provider.extension);
		const fileName = String(hash([document.uri.toString(), this._backupIdPool++]));
		const backupUri = URI.joinPath(storagePath, fileName);

		const backup = await provider.provider.backupNotebook(document.apiNotebook, { destination: backupUri }, cancellation);
		document.updateBackup(backup);
		return backup.id;
	}