There are two directory structures for a jEdit installation on a given machine. The first is the jEdit installation directory; the second is the jEdit settings directory.

The jEdit installation directory has the jEdit program, the documentation files, and default macros (if installed). You choose the location of this directory when you install jEdit. This directory is not changed by jEdit after installation. Nothing in this directory needs to be backed up, because everything in it comes from the install file. You need to keep track of any files you add to this directory, for example, startup scripts and macros. Those will need to be added to your backup list. [1]

The jEdit settings directory stores the current configuration for your jEdit installation, log files, plugin jars and their settings, etc. This is where you will need to backup files from. This directory is called .jedit (yes, it begins with a period) and is installed under your home directory. To find out where this is, look at the activity log, using Utilities>Troubleshooting>Activity Log. There is more information on this in the jEdit User's Guide. For jEdit 4.2, see Chapter 7, "Customizing jEdit" in the section "The jEdit Settings Directory". Online, this is posted here

If you are using Windows, and one of the Windows launchers, reinstalling jEdit may require reinstalling the launcher if your registry was rebuilt or itself restored. Otherwise program associations and the jEdit context menu in Windows Explorer may no longer work.

Always keep track of where you install your own custom macros (and startup scripts) and edit modes, and ensure they are backed up

It's arguable whether you need to backup plugin jars. Plugins can be reinstalled from the Plugin Manager, as plugin settings are configuration are mostly stored in the jEdit properties file. Note that some plugins, for example Project Viewer, also has its own extra configuration stored in the jEdit settings directory; but your backup should include that anyway. The downside of not backing up plugin jars is the extra time it will take to identify the list of plugins you had before, and to download them.

Backups are not necessarily a good way to move jEdit configuration between machines, or between operating systems. You'll need extra planning for that, and may want to consult with the jEdit users mailing list to ask for advice.

If you hack jEdit, editing either the core source code or plugins, and don't commit to the central CVS repository, of course you will want to back up those source files--assuming they are not stored somewhere in the settings directory tree.

To create a complete backup, create a copy of your entire .jedit settings directory (see above). This will include not just jEdit properties/configuration, but also the activity log, recent files list, plugin jars and settings, and so on.

The jEdit program directory does not need to be backed up, unless you have added macros or startup scripts. If you have not, the program directory can be re-installed from an installation package; see Installing jEdit for details about (re)installing jEdit.

The complete backup has the slight disadvantage that it backs up plugins and plugin source code and external configuration. This may make your backup take a little longer and take a little more space.

You will need to backup any macros and startup scripts you added to the jEdit program directory in any case.

There are a couple of options for a partial backup of jEdit settings:

Backup the entire .jedit settings directory tree, but exclude the /jars directory and any subdirectories

See the jEdit User's Guide, Chapter 7--this is described earlier in this page. If you make a partial backup, make sure to include the macros and modes directory if you are in the habit of adding macros or edit modes that are not available online

Restoring is then a matter of extracting the files you backed up to the jEdit settings directory after the reinstall. If you do not backup the plugin jars, you'll need to use the Plugin Manager to reinstall the plugins. Plugin settings are stored with the jEdit properties file, so plugins will still be configured after a backup.

A partial backup will save a small amount of space and time in your backup process. It is probably OK to backup everything but the jars in the jEdit settings directory, as you can reinstall plugins pretty easily from the Plugin Manager--assuming you have a good Internet connection during the reinstall.

Picking and choosing individual jEdit files to backup is probably not a good idea. In a recent discussion (October 2004) on the jEdit developer's mailing list, nobody recommended this approach.

Also, note that a backup should work properly if you reinstall to the same, or very similar operating system and version of Java. If you try to backup on Windows and reinstall on Linux, you may need to fix file and directory names in the jEdit settings.

A mailing list discussion brought up a couple of other points (from Alberto Romero)

if you are using the jIndex plugin, the indexes it creates may be very large and you might want to skip them in a backup, recreating them later

if your java configuration changes after the reinstallation, the jCompiler plugin configuration won't be valid and you will need to regenerate jIndex' indexes

if you use Project Viewer and/or Sessions plugins, try to keep your projects in similar directory trees after a reinstall, or your plugin configurations won't be valid