Knowledge Drop

How can I recover a deleted Look or Dashboard if the trash is emptied?

  • 5 April 2021
  • 0 replies
  • 966 views

Userlevel 5
Badge
  • New Member
  • 163 replies

Last tested: March 2021

 

 

As of 4.8+, all deleted content goes to the Trash Folder. It stays there indefinitely until deleted by an admin. Any content can be restored from the Trash Folder by an admin.

This card talks about how to find and restore a deleted Look or dashboard with i__looker, in the case where the deleted content has also been deleted from the Trash.

If you accidentally deleted a Look or dashboard AND deleted the trash, it's possible to recover this Look or dashboard using Looker's internal model, i__looker. i__looker is the model underlying the Usage Panel in the Admin section.

Recovering a deleted Look that is no longer in the trash

  1. Go to the history explore of the i__looker model. You can get there by navigating to a URL of the form:

 https://company.looker.com/explore/i__looker/history

Replace company.looker.com with your Looker instance's specific URL.

  1. If you know a specific time that the Look was queried, filter on History - Created Time for as specific a range as possible for when it was queried.

  2. Filter on History - Source = Saved Look or History - Source = Dashboard, and filter on Look - ID is null and Dashboard - ID is null (looks and dashboards that have been hard-deleted will no longer have their IDs show up in the internal db).

  3. Add fields from the Query view that will help identify the query that the look was using, such as Query - Model, Query - Explore, Query - Fields Used, or Query - Filters Used.

  4. Once you've identified the query you want, add the Query - Link field to your i__looker query. This should link you to the exact query that was used in the deleted Look, which you can now save to any folder you'd like.

If Query Link does not work, trying adding Query Slug instead. This will give you the share URL slug of this query. You can then access this query by navigating to:

 https://company.looker.com/x/QUERY_SLUG_HERE

If neither of those seem to work, you can use the fields from Step 4 that you used to identify the query to recreate it from its fields and filters.

Here's an example query with all of the relevant fields mentioned above: https://<your_domain_here>/explore/i__looker/history?fields=history.id,history.created_time,query.model,query.view,query.formatted_fields,query.formatted_filters,query.link,query.slug&f[look.id]=NULL&f[history.source]=Saved+Look%2CDashboard&f[history.real_dash_id]=NULL&sorts=history.created_time+desc&limit=500&query_timezone=America%2FNew_York&vis=%7B%7D&filter_config=%7B%22look.id%22%3A%5B%7B%22type%22%3A%22null%22%2C%22values%22%3A%5B%7B%22constant%22%3A%22%22%7D%2C%7B%7D%5D%2C%22id%22%3A0%2C%22error%22%3Afalse%7D%5D%2C%22history.source%22%3A%5B%7B%22type%22%3A%22is%22%2C%22values%22%3A%5B%7B%22constant%22%3A%22Saved+Look%22%7D%2C%7B%7D%5D%2C%22id%22%3A1%2C%22error%22%3Afalse%7D%2C%7B%22type%22%3A%22is%22%2C%22values%22%3A%5B%7B%22constant%22%3A%22Dashboard%22%7D%2C%7B%7D%5D%2C%22id%22%3A2%2C%22error%22%3Afalse%7D%5D%2C%22history.real_dash_id%22%3A%5B%7B%22type%22%3A%22null%22%2C%22values%22%3A%5B%7B%22constant%22%3A%22%22%7D%2C%7B%7D%5D%2C%22id%22%3A3%2C%22error%22%3Afalse%7D%5D%7D&dynamic_fields=%5B%5D&origin=share-expanded

Note: We CANNOT recover the look or dashboard using the look explore or the dashboard explore because the look and dashboard IDs are removed from the tables in the internal db once the content is hard-deleted (deleted from the Trash). Therefore, using the steps above to find when the content was queried is the only way to recover hard-deleted content.

 

This content is subject to limited support.                


0 replies

Be the first to reply!

Reply