Fast Cluster Restore

    It is assumed that a Cluster environment is running and a logical backupwith arangodump has already been taken.

    The procedure described in this page is particularly useful for ArangoDBversion 3.3, but can be used in 3.4 and later versions as well. Note thatfrom v3.4, arangorestore includes the option which can be a firstgood step already in achieving restore parallelization and its speed benefit.However, the procedure below allows for even further parallelization (makinguse of different Coordinators), and the part regarding temporarily settingreplication factor to 1 is still useful in 3.4 and later versions.

    The speed improvement obtained by the procedure below is achieved by:

    • Restoring into a Cluster that has replication factor 1, thus reducingnumber of network hops needed during the restore operation (_replication factor_is reverted to initial value at the end of the procedure - steps #2, #3 and #6).
    • Restoring in parallel multiple collections on different Coordinators(steps #4 and #5).

    Please refer tosection for further context on the factors affecting restore speed when restoringusing arangorestore in a Cluster.

    The first step is to copy the directory that contains the dump to all machineswhere Coordinators are running.

    This step is not strictly required as the backup can be restored over thenetwork. However, if the restore is executed locally the restore speed issignificantly improved.

    Step 2: Restore collection structures

    If you are using v3.3.22 or higher, or v3.4.2 or higher, please also add in thecommand above the option —replication-factor 1.

    The option —import-data false tells arangorestore to restore only thecollection structure and no data.

    This step is not needed if you are using v3.3.22 or higher or v3.4.2 or higherand you have used in the previous step the option —replication-factor 1.

    To speed up restore, it is possible to set the replication factor to 1 beforeimporting any data. Run the following command from exactly one Coordinator (anyCoordinator can be used):

    Step 4: Create parallel restore scripts

    Now that the Cluster is prepared, the script will be used.

    Please create the below parallelRestore script in any of your Coordinators.

    To run this script, all Coordinator endpoints of the Cluster have to beprovided. The script accepts all options of the tool arangorestore.

    The command below can for instance be used on a Cluster with threeCoordinators:

    Notes:

    • Starting from v3.4.0 the arangorestore option —threads N can bepassed to the command above, where N is an integer, to further parallelizethe restore (default is —threads 2).The above command will create three scripts, where three corresponds tothe amount of listed Coordinators.

    The resulting scripts are named coordinator_<number-of-coordinator>.sh (e.g., coordinator_1.sh, coordinator_2.sh).

    The coordinator_<number-of-coordinator>.sh scripts, that were created in theprevious step, now have to be executed on each machine where a _Coordinator_is running. This will start a parallel restore of the dump.

    Step 6: Revert to the initial Replication Factor

    Once the arangorestore process on every Coordinator is completed, thereplication factor has to be set to its initial value.