---
title: Version History for Notebooks
description: >-
  View, restore, and clone previous versions of notebooks and individual
  widgets, with 30-90 day retention.
breadcrumbs: Docs > Notebooks > Notebooks Guides > Version History for Notebooks
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Version History for Notebooks

## Overview{% #overview %}

Version History automatically tracks changes to your notebooks and saves previous versions so you can see what changed and who made each change. Preview, restore, or clone a previous notebook version, or use widget version history to work with an individual widget.

## Prerequisites{% #prerequisites %}

Notebooks retain version history for 30 days by default. To view previous versions, the notebook must have edits within the retention period.

With [Audit Trail](https://docs.datadoghq.com/account_management/audit_trail.md) enabled, version history extends to 90 days, including edits made before Audit Trail was enabled.

## View versions{% #view-versions %}

From a notebook, click the Version History button (
{% icon name="icon-clock-historical-wui" /%}
) on the right side of the notebook. Alternatively, open the three-dot ellipsis menu in the upper right and select Version History.

{% image
   source="https://docs.dd-static.net/images/notebooks/guide/version_history/open_version_history.33031e447c9e88426a2f6ed26843499a.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/notebooks/guide/version_history/open_version_history.33031e447c9e88426a2f6ed26843499a.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Notebook menu with Version History selected." /%}

In the Version History side panel, for each version you can see:

- Which Datadog user made the change
- The date and time of the change
- A summary of the change and a detailed change description of the version to its predecessor

## Preview a version{% #preview-a-version %}

Select a version in the Version History side panel to preview the notebook at that point. The preview highlights changed widgets and cells.

**Note**: Previewing a version does not save changes or affect other users. Changes take effect only after you restore a version.

## Restore a version{% #restore-a-version %}

To restore a previous version, you need edit access to the notebook.

1. Open version history and select the version to restore.
1. Open the three-dot ellipsis menu for that version and select Restore this version.
1. Confirm the restore in the dialog.

You can also select a version and click Restore this version at the top of the notebook.

{% image
   source="https://docs.dd-static.net/images/notebooks/guide/version_history/notebook_version_history.1158eb926b7fa71dba7623be27eed125.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/notebooks/guide/version_history/notebook_version_history.1158eb926b7fa71dba7623be27eed125.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Notebook version history showing a selected version and the Restore this version and Clone notebook actions." /%}

Restoring a notebook replaces its contents for all users. To restore one widget, use widget version history.

A restore adds an entry to version history and preserves previous versions within the retention period.

## Clone a version{% #clone-a-version %}

To create a separate notebook from a previous version, open the three-dot ellipsis menu for that version and select Clone notebook. Cloning does not change the original notebook.

## Widget version history{% #widget-version-history %}

View changes to an individual widget without browsing the full notebook history:

1. Hover over a widget and open its three-dot ellipsis menu.
1. Select Widget history.
1. Review the saved versions, including who made each change and when. Click Load older history to view additional versions when available. Click Full notebook version history to open the notebook's history.

{% image
   source="https://docs.dd-static.net/images/notebooks/guide/version_history/widget_history_menu.38160a2a43e3fb9790b136b886173c03.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/notebooks/guide/version_history/widget_history_menu.38160a2a43e3fb9790b136b886173c03.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Widget menu with Widget history selected." /%}

To work with a saved widget version, open the three-dot ellipsis menu for that version:

- Restore version replaces the widget with the selected version. Other notebook content stays unchanged.
- Clone widget inserts a copy of the selected version below the widget.

{% image
   source="https://docs.dd-static.net/images/notebooks/guide/version_history/widget_version_history.ffd7ebfed2599c75125e0dfc040429b0.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/notebooks/guide/version_history/widget_version_history.ffd7ebfed2599c75125e0dfc040429b0.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Widget version history showing the Restore version and Clone widget actions." /%}

You need edit access to restore or clone a widget. You can't restore or clone a widget while previewing a notebook version. Widget history is not available for rich text.

Widget version history includes only changes made on or after October 14, 2026. It follows the notebook's retention period.

## Version history retention{% #version-history-retention %}

| Retention Period         |
| ------------------------ |
| Audit Trail **Disabled** | 30 days |
| Audit Trail **Enabled**  | 90 days |

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Notebooks Overview](https://docs.datadoghq.com/notebooks.md)
- [Audit Trail Overview](https://docs.datadoghq.com/account_management/audit_trail.md)
- [Track changes to Datadog dashboards and notebooks with version history](https://www.datadoghq.com/blog/dashboards-notebooks-version-history/)
