Introduction
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.
Warning
Objects that are deleted via APIs or the Databricks CLI do not move to theTrash. They are permanently deleted. TheTrashfolder is a UI-only feature.
Recover deleted notebooks
- Log into Databricks.
- SelectWorkspacefrom the sidebar.
- SelectUsers.
- Select your user folder.
- SelectTrash.
- Select the notebook you want to restore and drag it from theTrashfolder to your user folder.
Info
A normal user can only recover items from their ownTrash. Admin users can recover deleted items from any user'sTrashfolder.
Prevention
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)