This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 09-28-201805:07 PM - edited on 04-06-202009:54 AM by kcsrestapiuser
Backing up and Restoring Alteryx Connect Database via Command Line
Backing up and restoring Connect can easily be done from the Administrator Console within Connect. Please see the following Help article for details steps: Back Up and Restore Connect. However, for various reasons it may be advantageous to do the backup/restore via the command line or a script. This article walks you through how to do this.
Part 1: Creating a backup of Connect's H2 database via the command line:
1. Stop AlteryxConnect service
2.In a command prompt, change directories to the appropriate folder:
cd "C:\Program Files\AlteryxConnect\webapps\ROOT\WEB-INF\lib\"
3. Run the following command to enter the H2 shell:
5. Perform a full reindex of the database to complete the restoration:
Log in to Alteryx Connect
Click your icon in the top-right of the screen and selectAdministration
From the Admin Menu, clickReindex
'java' is not recognized as an internal or external command,operable program or batch file.
As a note, Java must be available to call directly (meaning it must be added to the environmental variable PATH) or you will need to list the full path to the java executable found in C:\Program Files\AlteryxConnect\jre\bin. The above commands already reference the full path, so this will not occur if you run the commands as written above.
Error: Could not find or load main class org.h2.tools.Shell
This means that the .jar file is incorrect. Please ensure that the .jar file listed in the command matches the h2*.jar file located inC:\Program Files\AlteryxConnect\webapps\ROOT\WEB-INF\lib
Exception in thread "main" org.h2.jdbc.JdbcSQLException: Database may be already in use: null.
The AlteryxConnect service is still running - please stop the service and try again.