Accidentally deleted Bigquery data — data recovery

Weekly Dev Blog
1 min readJan 11, 2021

BigQuery matins a 7-day history and allows you to query a point-in-time snapshot of your data by using either table decorators or SYSTEM_TIME AS OF in the FROM clause. You can easily revert changes without having to request recovery from backups

To revert a change you can either use standard SQL or bq command-line tools.

For example,

bq cp project:dataset.table@-36000 project:dataset.table

This command will replace the table with data from the same table 1 hour ago.