Skip to content

fmrcl Backup Tool

fmrcl is a command-line tool used to export the full contents of an operational FMR installation to disk and is the basis of the backup and restore process.

An account with administrative privileges on the FMR installation is required.

fmrcl can be run on any machine provided it has network access to the FMR installation's REST API.

Usage

fmrcl is available as a Docker image.

export ADMIN_USER=root
export ADMIN_PASSWORD=******

docker run --rm -v ./:/out sdmxio/fmrcl:latest -u ${ADMIN_USER} -p ${ADMIN_PASSWORD} -url http://registry.example.org
The backup is written to the container's /out directory on which a host volume should be mounted. In the example above, the current working directory is used specified by the -v ./:/out parameter.

Note

For FMR installations on localhost, the URL should instead use the special hostname host.docker.internal.

Thus http://localhost:8080 becomes http://host.docker.internal:8080.

docker run --rm -v ./:/out sdmxio/fmrcl:latest -u ${ADMIN_USER} -p ${ADMIN_PASSWORD} -url http://host.docker.internal:8080
Using localhost with the Docker image will fail because it references the container rather than host.

export ADMIN_USER=root
export ADMIN_PASSWORD=******

fmrcl.sh -u ${ADMIN_USER} -p ${ADMIN_PASSWORD} -o ./backup -url https://registry.example.org
$env:ADMIN_USER = "root"
$env:ADMIN_PASSWORD = "******"

fmrcl.bat -u $env:ADMIN_USER -p $env:ADMIN_PASSWORD -o .\backup -url https://registry.example.org

Prerequisites for native execution on Linux or Windows

  • Java 17 or later

What The Backup Includes

The backup captures the following registry content:

  • structural metadata artefacts, including change history and audit records
  • the reference metadata reports
  • data registrations

Warning

System settings, including database and security configuration, are not included in the backup.

Parameters

Parameter Description Example
-o Directory in which the backup will be created backup
-u User ID of the administrator account used to authenticate root
-p Password of the administrator account used to authenticate password
-url URL of the registry to back up https://registry.example.org

The content of the registry specified by -url is retrieved and stored as files in the directory specified by -o. The directory is created automatically if it does not already exist.

Output

On successful completion, the backup directory should contain folders and files similar to the following:

backup
├── metadata
│   └── allMetadata.xml
├── registration
│   └── allRegistrations.xml
└── structures
    ├── 1
    │   ├── audit.json
    │   └── structures.zip
    ├── 2
    │   ├── audit.json
    │   └── structures.zip
    ...
    ├── xxxx
    │   ├── audit.json
    │   └── structures.zip
    ├── structures.zip
    └── transactions.json

The structures directory contains one numbered subdirectory for each metadata change transaction. On actively maintained FMR installations, this may amount to many thousands of directories.