Deleted notebooks are moved to the user's Trash folder and stored there for 30 days. After 30 days have passed, the deleted notebooks are permanently removed and cannot be recovered. You can permanently delete the items in the Trash sooner by selecting Empty Trash.
If you accidentally delete a notebook it is not permanently deleted. It is just moved to the Trash. As long as you have not manually emptied the Trash, you can restore the notebook by moving it from the Trash folder to another folder.
Objects that are deleted via APIs or the Databricks CLI do not move to the Trash. They are permanently deleted. The Trash folder is a UI-only feature.
Recover deleted notebooks
- Log into Databricks.
- Select Workspace from the sidebar.
- Select Users.
- Select your user folder.
- Select Trash.
- Select the notebook you want to restore and drag it from the Trash folder to your user folder.
A normal user can only recover items from their own Trash. Admin users can recover deleted items from any user's Trash folder.
You can mitigate accidental deletions by backing up your notebooks frequently.
Options to backup notebooks include:
- Git integration with Databricks Repos (AWS | Azure | GCP)
- Azure DevOps Services version control (Azure)
- Bitbucket Cloud and Bitbucket Server version control (Azure)