Installing on Docker

This documentation details the process of working with Zoho Analytics On-Premise for Docker. 

Deploy Zoho Analytics On-Premise on Docker

You can download Zoho Analytics On-Premise on Docker easily. Follow the steps below to download the image and run the container in Docker.

Step 1: In the download page, choose Docker from the Deploy on drop down, and click Download Now.

Step 2: Copy the Docker pull command that appears in the Docker Hub page.

Step 3: Run the copied command docker pull zohoanalytics/onprem to download the docker image. 

You can list the downloaded images using the following command: docker images

Step 4: Before starting the docker container, create a directory on your server to store periodic backups of Zoho Analytics On-Premise. This will prevent data loss if the container is killed intermittently. This step is highly recommended.
Note: Periodic application backups will be moved to this new directory (in the local machine) automatically to avoid loss of data when the container is killed.

Step 5: To start your docker container, use the below command. The backup directory in our example is C:\Zoho\MyBackup and the container name is onprem.
docker run -d -p 8443:8443 -v C:\MyBackup:/home/zaop/Zoho/Analytics/Backup --name=onprem zohoanalytics/onprem

In addition to starting the docker container, this command performs the following actions:

  • Maps the ports of the docker container and the host server.

  • Links the Zoho Analytics On-Premise backup folder to the backup folder C:\Zoho\MyBackup present on the host server.

Note: If you are running Docker on Windows, the below popup appears. Click Share it to proceed.

You can check the containers that are running using the following command: docker ps

Step 6: Execute an interactive bash shell on the downloaded container using the following command: docker exec -it onprem bash

Step 7: Before starting the application, switch to the Zoho/Analytics/bin directory.

Step 8: Start Zoho Analytics On-Premise using the command: nohup sh app_ctl.sh run &. Use the command disown to remove jobs from the job table of the parent shell.

Note: To stop the application, use the following command: sh app_ctl.sh shutdown

Step 9: Once the application has started, you can access the application from a web-browser using the following URL.

https://<serverIP address>:8443 (replace <server IP address> with the docker IP address)

Use the following credentials in the screen that appears to login to Zoho Analytics On-Premise. Please change the default password upon login.
Username: admin
Password: admin

Backup the database

Zoho Analytics On-Premise automatically backs up data every day, and stores the data in the Zoho/Analytics/Backup directory.  
Sample file name: OfflineBackup_20200706134016.ezip (The number appended is the backup time stamp)

Running ad hoc backups

Follow the steps below to back up your Zoho Analytics On-Premise data per your requirements. 

Step 1: Execute an interactive bash shell on the container using the command docker exec -it demobackup bash.

Step 2: To start the backup, change the directory to Zoho/Analytics/bin, and execute this command sh backupDB.sh

Once a complete backup is taken, the following screen appears. 

Step 3: Copy the masterIV and masterKey to the product's default backup directory. These files are required to decrypt the restored database. 

Restore backup

Follow the steps below to restore a backup file. 

Step 1: Copy the backup folder to the home directory /home/zaop.

Step 2: Execute an interactive bash shell on the container as a root user using the command docker exec -it --user=root demorestore bash, and change the ownership of your backup folder.

Step 3: Change the directory to Zoho/Analytics/bin and execute the interactive bash shell on the container using the command docker exec -it demorestore bash.

Step 4: To restore the backup, use the command sh restoreDB.sh, followed by the full directory path of the backup file and its password. 

Note: If you are using Analytics Plus version 5000 or above, use "Analytics" as the password for the backup file. Else, use the name of the backup file in reverse as the password.

This is how the command would appear: sh restoreDB.sh /home/zaop/MyBackup/OfflineBackup_20200715.ezip -p Analytics or sh restoreDB.sh /home/zaop/MyBackup/OfflineBackup_20200715.ezip -p 51700202_pukcaBenilffO

The following screen appears after successfully restoring the backup file.