Install the FaunaDB Data Manager

This page covers the requirements and installation procedure for the FaunaDB Data Manager:

Requirements

Run the following command to determine whether you already have Java installed, and if so, which version:

java -version

Install

  1. Download the FaunaDB Data Manager from the following link: https://fauna-repo.s3.amazonaws.com/fdm/fdm.zip

  2. Use your operating system’s ZIP archiving tools to extract the contents of fdm.zip. For example, in a terminal window:

    unzip fdm.zip

    A directory containing the FaunaDB Data Manager is created, and the directory name includes the current version number. You can add that directory to your terminal window’s PATH, but that is not required.

Verify the installation

  1. Open a terminal window.

  2. Enter the directory containing the FaunaDB Data Manager:

    cd fdm-{version}
  3. Run the FaunaDB Data Manager, with no parameters, to see the help text:

    ./fdm

    If the installation was successful, you should see output similar to:

    2020-04-08.18.32.56
    ===================
    
    FDM   1.14
    2020-04-09 01:24
    Loaded property file path: /Users/eskwayrd/fdm-1.14/fdm.props
    
    Field Formatting
    ================
    <<None>>
    
    
    Usage: FDM   1.14
    =================
     -c, --config <path>  Specify the path to the configuration file
     --demo <key>         Create a demo database
     -d, --dest <arg>     The destination options for the data:
                             path=<export directory>
                             key=<secret>
                                uri=<prot://host:port>]
                                collection=[exists | replace ] default=exists
                                index=[exists | replace | ignore] default=exists
                                function=[exists | replace | ignore] default=exists
                                role=[exists | replace | ignore] default=exists
                                data=[copy | ignore] default=copy
     -f, --format <arg>   Specify the field transformation options:
                             <field-name>[->new-name]:<field-type>[(date_format)]
     -h, --help           Print this help text
     -s, --source <arg>   The source option(s) for the data (indented=related):
                             path=<load file or directory>
                             key=<secret>
                                [uri=<prot://host:port>]
                                [pit=<timestamp>]
                             aws=<secret>
                                id=<id>
                                region=<region>
                                bucket=//bucket/folder
                             jdbc=<path>
                                driver=<name>
                                url=<jdbc_url>
                                user=<user>
                                password=<pass>
                                [database=<dbs>]
                                [table=<table>]
     --tsize <size>       Specify the number of documents per transaction
                             Default: 100
     -v, --verbose        Enable verbose output
     -V, --version        Print the tool's version
    
    
    Examples
    ===========================================================================
    
    - Copy a database at a point in time:
      fdm -source key=<source_secret> pit=12/1/2018 -dest key=<dest_secret>
    
    - Export a database to the directory '/work/export':
      fdm -source key=<source_secret> pit=12/1/2018 -dest path=/work/export
    
    - Import all JSON and CSV files from the directory '/work/import':
      fdm -source path=/work/import -dest key=<dest_secret>
    
    - Test import of all JSON and CSV files from AWS bucket and folder:
      fdm -source aws=${AWS_SECRET_ACCESS_KEY} id=${AWS_ACCESS_KEY_ID} \
          region=${AWS_DEFAULT_REGION} bucket=//bucket/load -dest dryrun

Logging

When the FaunaDB Data Manager finds a directory called log in the current directory, it creates a timestamped log file that captures all of the details of a single invocation, and creates a symbolic link to the most recent log file:

$ ls log
fdm.2020-04-08.21.37.47.log  fdm.2020-04-08.21.43.16.log
fdm.2020-04-08.21.39.03.log  fdm.log@

The log files could be useful if you are running multiple invocations of the FaunaDB Data Manager and need to compare the output between runs. If you encounter an error, the log file would be useful for Fauna support staff.

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!