Automated backup and restore (backuptools)
You can automatically back up your environment. To do this, a backup tool is provided: backuptools.jar to be run on the server.
It can be run via the "backuptools.jar" Java tool provided in the <digdash_install>\add-ons\tools\lib folder with default or customisable arguments (see next section).
The available options are as follows:
- -url server_url : Server URL (default http://localhost:8080)
- -domain dd_domain: application domain name (by default ddenterpriseapi)
- -login user_login: administrator login
- -pass user_pass: administrator password
- -export or -backup: saves the configuration in a zip file
- -import or -restore: restore the configuration from a zip file
- -file zipfile: path to the backup file to be restored
- -ldap: back up or restore the LDAP directory
- -noldap: no backup or restore of the LDAP directory
- -ds: backup or restore data sources in the Common Datasources data directory
- -nods: no backup or restore of data sources in the Common Datasources data directory
- -help: displays help
- -debug : displays error messages
- -backupxml xmlfile: specifies a backup.xml file to be used as a template for the backup (Ignores the -ldap/-noldap, -ds/-nods options. Not available in restore mode.)
This template allows you to specify the elements to be backed up (data models, flows, formats, etc) in the same way as you would in the classic backup interface. An example file is available in the /add-ons/tools/backuptools/ directory. To make configuration easier, you can also retrieve the backup.xml file from an existing backup and modify it.
Examples of use:
java -jar backuptools.jar -url http://localhost:8080 -domain ddenterpriseapi -login admin -pass admin -export -ldap
java -jar backuptools.jar -url http://localhost:8080 -domain ddenterpriseapi -login admin -pass admin -import -ldap -file C:\\backup.zip
If you make a backup of your environment, a backup file is created. This file is named datedujour_backup.zip (for example 20241219_backup.zip if the backup was performed on 19 December 2024) and is located in the directory containing the tool data (By default, <DD Install>/Application Data/Enterprise Server/<domain>/config.).
A file is also provided: "backup_export.bat" (interactive file with prompts) for backing up your environment:
This file is located in the installation directory. When you run the file, you need to specify :
- The URL of your server: by default, http://localhost:8080
- The application domain: by default, ddenterpriseapi
- The user ID: by default, admin
- The user's password: by default, admin
- Whether or not you want to back up the LDAP dictionary (users and roles): enter y to back up and n not to back up.
A backup file is created. This file has the name <datedday>_backup.zip (for example 20230710_backup.zip if the backup was performed on 10 July 2023) and is located in a directory containing the data. By default, <DD Install>/Application Data/Enterprise Server/<domain>/config.
For example on Windows:
C:\Users\<user>AppData\Roaming\Enterprise Server\ddenterapi\config
To restore a backup automatically, you can also use the backup_import.bat file. You need to fill in the same parameters as for backup_export (instead of indicating whether you want to back up the LDAP directory, indicate whether you want to restore it). Also enter the name of the backup file (by default, it should be in the same directory as the backup_import.bat file).