Link Search Menu Expand Document

Install the CLI

Before installing the Elastio CLI, install and configure the AWS CLI, making sure that you fill in your AWS credentials and the default region (for instance, us-east-2) or attach an IAM instance role to the EC2 instance where Elastio CLI will be installed.

Table of Contents

Before installing the Elastio CLI, install and configure the AWS CLI. Make sure that you fill in your AWS credentials. Creating a separate user with access to the AWS credentials is effective to prevent compromise of a low privilege user from providing access to the credentials and the permissions granted. Set the default region (for instance, us-east-2). Alternatively, you can attach an IAM instance role containing ElastioFullAdmin permission policy to the EC2 instance where Elastio CLI will be installed. Attaching other role/s will result in granting or restricting access to various AWS resources.

Supported Environments

The Elastio CLI can be installed on any Linux, macOS or Windows machine in the following environments:

  • Amazon EC2 instances (Note: Elastio Snap driver,as well as iscan (unless it is initiated as a background job) can’t be run on Arm-based instances)
  • Azure VMs
  • GCP VMs
  • Digital Ocean Droplets
  • Linode instances
  • Hetzner Bare-Metal servers
  • Hetzner cloud VMs
  • Local machines

Additionally, the Elastio CLI can be used from within the following environments:

  • AWS Fargate
  • AWS Lambda
  • AWS CodePipeline
  • GCP GKE
  • Google Cloud functions
  • Azure containers
  • Azure functions
  • GitHub actions
  • CircleCI
  • Ansible
  • Jenkins

Lastly, the Elastio CLI can be scripted in:

  • Bash
  • Python
  • Powershell

Install the Elastio CLI on Linux

Elastio provides repositories for the most popular Linux distributions of different versions of x86_64, aarch64 (arm64) architectures.

Supported x86_64 distributions are RHEL/CentOS starting from version 7, Amazon Linux 2, Fedora 34 and higher, Debian 8 and higher and Ubuntu LTS versions 16.04, 18.04, 20.04.

Supported aarch64 (arm64) distributions are Amazon Linux 2, Debian 10 / Ubuntu 20.04, Debian 11, Fedora 35, RHEL/CentOS 8.

Note: Elastio doesn’t yet support block backups with the changed block tracking driver on aarch64 architecture. It is also not guaranteed that Elastio will work properly on WSL.

To install the Elastio CLI and Elastio Snap driver use the following command:

sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/elastio/elastio-stack/master/scripts/install-elastio.sh)"

Note: If Secure Boot is enabled on the machine, Elastio Snap driver cannot be installed or used. To work around this issue for the time being, Secure Boot should be disabled and the driver installed. We are currently working on getting rid of this inconvenience.

We recommend that you install the Elastio CLI together with the Elastio Snap driver. However, they can be installed separately.

Use the following script to install the Elastio CLI only:

sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/elastio/elastio-stack/master/scripts/install-elastio.sh) $0" -- -c

Here is the installation script for the Elastio Snap only:

sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/elastio/elastio-stack/master/scripts/install-elastio.sh) $0" -- -d

In case you encounter the bash: curl: command not found error when installing the Elastio CLI on Linux, install the curl package and then proceed with the installation as follows:

Run the following command for Ubuntu:

sudo apt install curl

Run the following command for RHEL / CentOs / Fedora:

sudo yum install curl

Install the Elastio CLI on Windows

The Elastio install for Windows contains the packages to install the Elastio CLI and two needed drivers for Windows Server 2016, 2019, 2022, Windows 10, Windows 11. No reboot is necessary to install Elastio.

Note: You must install the Elastio CLI on the Windows OS as an administrator.

Two commands should be executed for a complete Elastio installation - the first one will install the drivers, the second one the Elastio CLI.

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://repo.assur.io/release/drivers/install.ps1'))

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://repo.assur.io/release/cli/install.ps1'))

This installation will only install the necessary drivers for performing local block device backups and mounts of recovery points. These drivers aren’t needed for file, filesystem, stream and agentless EBS and EC2 backups.

Use fltmc command to confirm that the driver was installed correctly, look at the output, and verify that EioHelium is included in the output. The example output is as follows:

C:\Users\Administrator>fltmc
Filter Name                     Num Instances    Altitude    Frame
------------------------------  -------------  ------------  -----
WdFilter                                2       328010         0
EioHelium                               1       289100         0
storqosflt                              0       244000         0
wcifs                                   0       189900         0
CldFlt                                  0       180451         0
FileCrypt                               0       141100         0
luafv                                   1       135000         0
npsvctrig                               1        46000         0
Wof                                     1        40700         0

If you suspect that the driver is not installed properly, but all needed files are on your local machine, you can run the install command from the right-click menu on the driver’s ini file (EioHElium.inf or EioJet.inf). The installation path is printed during the CLI install. The default path is C:\Program Files\elastio\driver.

Note: The Elastio CLI is intended to be run in a modern terminal, either Windows PowerShell or Windows Console. The PowerShell ISE will work, but some of the output such as tables might be rendered incorrectly by the lack of modern terminal capabilities. The ISE users are encouraged to use the JSON output format that is easier to use within scripts.

Install the Elastio CLI on macOS

To install the Elastio CLI run the following command:

brew install elastio/tap/elastio

Install the Elastio CLI in a docker container

Your user should be added to sudo group to the running docker CLI with sudo permission.

Before running Elastio ClI in the docker container you need to register you Docker CLI in public.ecr.aws/elastio/elastio-cli public repository.

You can do this with command:

aws --region us-east-1 ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws/elastio/elastio-cli

Specify your aws credentials and region before running the docker command in a way that is convenient for you.

export aws_access_key_id=<AWS-ACCESS-KEY-ID>
export aws_secret_access_key=<AWS-SECRET-ACCESS-KEY>
export aws_region=<AWS-REGION>

Most likely this is not the latest version of Elastio CLI. You can find the latest version at this link: https://gallery.ecr.aws/elastio/elastio-cli

Example of EC2 backup:

export vault=default
export instance_id=i-0cab23a70a5ad4a86

docker run \
-e AWS_ACCESS_KEY_ID=$aws_access_key_id \
-e AWS_SECRET_ACCESS_KEY=$aws_secret_access_key \
-e AWS_REGION=$aws_region \
public.ecr.aws/elastio/elastio-cli:latest ec2 backup --instance-id $instance_id --vault $vault --monitor

If you want to wait for the EC2 or EBS backup to complete, add --monitor argument in the end of your docker command.

Example of stream database backup:

export vault=default

pgdump dbname | docker run \
-e AWS_ACCESS_KEY_ID=$aws_access_key_id \
-e AWS_SECRET_ACCESS_KEY=$aws_secret_access_key \
-e AWS_REGION=$aws_region \
public.ecr.aws/elastio/elastio-cli:latest stream backup --stream-name mydb --tag predeploy

Example of file backup:

export vault=default

docker run \
-e AWS_ACCESS_KEY_ID=$aws_access_key_id \
-e AWS_SECRET_ACCESS_KEY=$aws_secret_access_key \
-e AWS_REGION=$aws_region \
public.ecr.aws/elastio/elastio-cli:latest file backup /artifacts --tag release