Skip to content

5.5 Backup

SBI- edited this page Oct 14, 2018 · 1 revision

Explanation

Creates a back up of the user setup (generally the jde folder), inside the backup folder. Depending on the mode, more or less files are included in the backup. This task is useful for:

  • moving to another machine
  • sharing configurations with other users
  • reverting to a known working state
  • having a backup before you try new / unsafe operations

The jazz development environment creates self-contained run time configurations, so it's nice to be able to back them up to restore and run them at a later time. 7zip is used for backup, so please make sure you have a 7z capable zip program before you try to unzip your backups.

Backups can take a significant amount of time, especially when backup modes that include many files are selected.

Arguments

The backup task takes one argument, --mode, which specifies which back up mode is used. The following modes are supported:

Mode Description
slim This is the default mode. It creates a backup of the entire jde folder, excluding all IBM files. Databases, user configurations and runtimes are preserved, but all sdk and jre files are excluded. This will usually create around ~100MB worth of zip.
user Creates a backup of just the user folder. This is useful if you want to preserve your user configurations but wish to set up a new environment otherwise.
full Includes the entire jde folder, so just backs up everything. This is useful if you are maybe moving to a new machine, or wish to share your running configuration with somebody who has a similar setup. Note that backups will be very large, as multiple copies of the sdk and jre will be included. A full backup of an environment that has been used can easily exceed 5GB. Also, creating these backups will take a vast amount of time. Use this mode only if you really need it.

Default

The backup task defaults to the slim mode.

Short examples

  1. Run a backup: ./gradlew backup
  2. Backup the user folder: ./gradlew backup --mode=user
  3. Backup all files: ./gradlew backup --mode=full

Target directory

All backups are created in the backup folder in the base directory of the jazz development environment:

jazz-development-environment
├── backup <- this is where backup files are stored
├── build.gradle
├── buildSrc
├── gradle
├── gradlew
├── gradlew.bat
├── jde
├── LICENSE
├── README.md
├── settings.gradle
└── tool

Restoring

Restoring procedures depend on the mode used when creating the backup. Currently, you have to manually handle any backups, and extract or copy the files to their proper destinations.

Slim mode

  1. Before restoring a slim mode backup, your environment needs to at least be in a state comparable to the bootstrap and setup commands having run.
  2. Extract and overwrite all files.

User mode

The user folder can be over-written at any time. Of course, the jde folder needs to exist, but the user settings of any jazz development environment can always be exchanged, as they are always re-evaluated at run time.

Full mode

Full mode comprises the entire jde folder, so you can extract it to any jazz development environment, even a freshly cloned git repository, and run all your environments again.