Don’t Lose Your Work! Stay Safe With DataGrip
We’ve all been in situations where we thought we lost something forever, a text file or a photo, perhaps. But then somehow we found a way to recover it. The relief you feel in that moment can stay with you for a long time.
DataGrip can be a really powerful tool for recovering your queries, even if it can’t recover all your data. Read on to learn about what it can do.
DataGrip saves all the queries you run. To view the query history for the current data source, click the Clock button on the console’s toolbar.
Text search is available in this window to help you find queries.
To paste a query in the editor, simply double-click it.
Any queries that DataGrip runs against your databases are stored in the database.log file. They can be accessed in Help | Show SQL log. This file can show you what DataGrip actually does under the hood, but it can also help you restore a query from your history if you don’t remember where and when you ran it last.
You can attach the folder with this log file to the Files tool window in DataGrip. This will make accessing the log easier, and the log itself will be properly highlighted when opened inside the IDE.
Imagine you created a query but you’ve never run it. Is it possible to bring it back? Yes, it is – with the help of Local History. DataGrip tracks the changes made to your source files, protecting you from any accidental losses or modifications, even if they were made by other applications.
Our upcoming 2021.2 version will introduce text search throughout Local History versions, so finding lost pieces of code will become even easier.
Local history for folders
Local History also works for folder contents – if you manipulate files from DataGrip’s Files tool window, that is. You can use Local History to restore deleted files.
Instead of deleting things, we often just close files that had some important info, and then it seems like it’s been lost.
Please rest assured that everything is saved automatically in DataGrip. You might as well forget the Ctrl/Cmd+S shortcut or remap it to some other, more useful action!
If closing a regular SQL file doesn’t seem dangerous, closing console files is more stressful, as they appear to be temporary. But actually, all console files are stored locally on your machine and can be opened again.
To open any tab you’ve closed by mistake, use Recent Files (press Ctrl/Cmd+E).
With both auto-saving and Local History available, peace of mind should finally be possible. What happens in DataGrip stays in DataGrip!
Sometimes you copy things to the clipboard and forget to paste them where you meant to. And then you copy other things to the clipboard, which of course overwrites the contents.
As yet another safety net, DataGrip keeps a record of the items you copy to the clipboard. It starts doing this as soon as you launch the IDE and clears the clipboard history after you close it.
Use Ctrl/Cmd+Shift+V to bring up the Clipboard history and then choose what you want to paste from it.
We hope you never lose any important data, but in the event that you do, be sure to check whether DataGrip has a way to recover it. You just might save yourself a lot of hassle.
And don’t forget to backup your database regularly! Better safe than sorry.
The DataGrip team
Subscribe to Blog updates
Thanks, we've got you!
Introspection Level Auto-Selection
Back in 2015, I was the only DataGrip team member working on database introspectors. Since then, several of my teammates have followed suit with their own introspectors for various database management systems (DBMSs). The Oracle introspector, however, remains solely my project. The Oracle introsp…
DataGrip 2023.3 EAP 2 is Out!
Hello, DataGrip community! The second Early Access Program version for DataGrip 2023.3 is here. If you want to try the new features before the official release, this is for you! Introspection scheduler It's now possible to set an introspection interval for each data source. Materialized…
DataGrip 2023.3 EAP is Open
Hello! We’re starting our 2023.3 Early Access Program (EAP) and, as usual, we invite you to try the latest features and improvements we’re adding to DataGrip ahead of the official release. Let’s take a look at what’s inside the first EAP build. DataGrip takes a long time to introspec…
DataGrip 2023.2: New UI with toolbar icons in the header, AI Assistant, time zones in the data editor, support for Redis Cluster
DataGrip 2023.2 is out!Here’s a sneak peek at what it has to offer. For a detailed description of this update, please visit our What’s New page. User Interface New UI: The toolbar icons have been moved to the header Improved main toolbar customization Light theme with light …