Search code examples
intellij-ideapluginsdotfiles

How do I backup my IntelliJ plugins and automatically install them again?


I was backing up my dotfiles and selected parts of my .idea directory. I recklessly removed a symlink in such a way that it deleted my plugins directory.

I didn't know all the plugins I had installed and I couldn't find a file containing a list of those plugins. Does such a file exist?

Essentially my goal is to:

  1. backup my plugins in case .idea or plugins is accidentally deleted, or if I want to re-install IntelliJ and forgot the plugins I had installed.
  2. have IntelliJ install the plugins automatically when I choose to restore them.

There are a few solutions I can think of:

  • If a file containing a complete list of plugins exists then place it under version control.

  • Place the entire plugins directory (which includes binaries) into version control. This I want to avoid.

  • Instead of placing it under version control, place it under a backup directory. This should work as I just need to copy the files across into the plugins directory. The only problem I have is that it separates my files and directories unless I choose to place the entire selection of the .idea directory there.

  • Export and Import settings from IntelliJ although I believe that the plugins need to be installed already as they are merely settings. The .zip file will give me an indication of the plugins I have installed but I'd have to manually export my settings on every installation.

  • Keep a manual copy of my plugins and update it every time a new plugin is added. This could work because I don't install a lot of plugins but I'd prefer to have it automated.


Solution

  • You can use the Settings Sync feature which synchronizes your settings between different systems and stores the backup of the settings and the list of installed plug-ins in your JetBrains account.

    .idea project directory should not have any relation to the plug-ins directory that is stored under the user profile.

    Another option is to use the Required Plugins feature to store the list of the the plug-ins you need together with your project. Certain project files can be put into the version control.