Skip to main content

MongoDB Backups

Several utilities are available to back up and restore data from Alteryx Server deployments using the embedded version of MongoDB. Use this backup functionality to recover from a system failure or data corruption or loss. You can also use restore options to roll back to past data.

Back up and restore data using the command line utilities available from the AlteryxService executable file AlteryxService.exe. Because the database backup process requires Server to be shut down (disabling scheduling and Server functionality for several minutes), perform backups during off-peak times.

Create a MongoDB Backup

  1. Stop AlteryxService. Shutdown multiple machines in order—Server UI node, workers, and then the controller.

  2. From the command line, navigate to the Alteryx Server installation folder (for example, D:\Program Files\Alteryx\bin).

  3. Run this command to save a backup of the database in the specified folder (must be an empty folder):

    alteryxservice emongodump=path_to_backup_location

    \Program Files\Alteryx\bin\AlteryxService.exe emongodump=c:\temp\dumpOutput

  4. Restart AlteryxService. Restart multiple machines in reverse order—restart the controller, then the workers, and then the Server UI node.

Restore from a MongoDB Backup

  1. Stop AlteryxService.

  2. From the command line, navigate to the Alteryx Server installation folder (for example, D:\Program Files\Alteryx\bin).

  3. Run one of the command templates in the following table based on your Server version to save a backup of the database in the specified folder (must be an empty folder):

    Server Versions

    Command

    • 2022.3.1.10.615 (patch 10) and higher

    • 2023.1.1.7.392 (patch 7) and higher

    • 2023.2.1.4.173 (Patch 4) and higher

    • 2024.1.1.17 (initial release) and higher

    alteryxservice emongorestore=path_to_backup_location,path_to_mongo_folder

    • 2022.3.1.9.597 (patch 9) and below

    • 2023.1.1.6.361 (patch 6) and below

    • 2023.2.1.3.133 (Patch 3) and below

    alteryxservice emongorestore=path_to_backup_location,path_to_mongo_folder,10

    Note

    If you restore your MongoDB to a new folder with a different name, then you have to update the Data Folder in Alteryx System Settings > Controller > Persistence to allow AlteryxService to start with the newly restored MongoDB folder. For more information about the controller configuration, go to the Controller help page.

    Set up the data folder under Controller Persistence.
  4. Confirm the restore was successful.

    Caution

    This is a necessary step as a restore failure will not be reported in the previous step and can lead to missing data on your Server. To do so, review the mongoRestore.log file in the MongoDB folder where the data was restored. Open mongoRestore.log and follow these steps:

    • Confirm that it reports #### document(s) restored successfully, 0 document(s) failed to restore on the last line.

    • Search for error, critical, fatal, and failed. If you are looking for failed, make sure the result is different from the sentence in the previous point, which contains 0 document(s) failed.

    If the recovery has failed, or if you find any results when searching the key words listed above, please contact Support with all the information you have gathered.

    Do not proceed if the MongoDB restore failed.

  5. If the restore was successful, restart AlteryxService.

Use a MongoDB Backup

  1. Open System Settings.

  2. Go to Controller > Persistence.

  3. In the Data Folder field, browse to the folder for the backup.

  4. Select Next to continue through the System Settings windows and restart the service. When the service starts it will run off the restored folder.