Link Search Menu Expand Document

Use the Elastio Shell

Table of Contents

Here are a list of commands that you need in order to use the Elastio Shell:

aws-configure

Name

This command allows access to the AWS CLI options in the region where the Elastio is enabled.

Synopsis

aws-configure [-p]

This command will prompt for the following values:

  1. AWS Access Key ID: The AWS access key part of your credentials
  2. AWS Secret Access Key: The AWS secret access key part of your credentials
  3. Default region name: The region where the elastio is enabled.
  4. Default output format: [None]

Description

The -p parameter allows you to specify an AWS profile name.

Exit status: Returns 0 if the object is dismounted; otherwise, it will return a non-zero value.

Example

The following command will initiate the AWS CLI configuration process:

elastio shell > aws-configure

The input parameter list is as follows:

  1. AWS Access Key ID: [None] accesskey

  2. AWS Secret Access Key: [None] secretkey

  3. Default region name: [None] us-east-2

  4. Default output format: [None]

The following command will configure the AWS CLI with an existing AWS profile:

elastio shell > aws-configure -p my-profile

backup

Name

This command performs a backup of the current object, including all of its contents.

Synopsis

backup [path] [vault]

Description

The following input parameters apply:

Path: Specify a path of the object to backup.

Vault: Specify the name of the vault to store the backup. If a vault is not specified, the system will use the default vault.

Exit status: Returns 0 if the object is dismounted; otherwise, it will return a non-zero value.

Note: The name completion function is activated by pressing the tab key.

Examples

This command will backup the AWS instance i-323232313s3sd to the default vault.

elastio shell /aws-assets/ec2/i-323232313s3sd > backup

This command will backup all of the files on localhost in the directory /usr.

elastio shell /localhost/dev/usr > backup

This command will backup the EBS volume in the directory /aws-assets/ebs/vol-094e20270740ed54c

elastio shell /aws-assets/ebs/vol-094e20270740ed54c > backup --vault data-vault

This command will backup the EBS volume again and create a new recovery point for the volume /vault/default/ebs/vol-094e20270740ed54c

elastio shell /vault/default/ebs/vol-094e20270740ed54c > backup --vault data-vault

cd

Name

cd - Change the shell working directory

Synopsis

cd [path]

Note: The following instructions apply to this command:

  • The name completion function is activated by pressing the tab key.
  • Use the right arrow to traverse the Elastio object hierarchy tree.

Description

This command changes the shell working directory and allows you to navigate through the Elastio object hierarchy. It requires either the full path or the directory’s name, depending on the current working directory that you’re in.

The [PATH] variable defines the search path for the directory.

A null directory name is the same as the current directory. If the [path] begins with a dot (.), then the shell root is used.

Exit status: Returns 0 if the object is dismounted; otherwise, it will return a non-zero value.

Examples

Set the path to the root directory.

elastio shell> cd

Set the path to the directory /vault/production/assets

elastio shell> cd /vault/production/assets

Set the path to the child directory of /protected assets/vault/production

elastio shell /vault/production> cd ec2

Set the path to the child directory of the recovery point id r-dfxsa2wgmhm3ghlr31kxlicl

elastio shell / > cd r-dfxsa2wgmhm3ghlr31kxlicl

Set the path to the child directory of the instance id i-030b7f58f383ac7f6

elastio shell / > cd i-030b7f58f383ac7f6

Set the path to the child directory of the instance id vol-01a552bfa93ba59ab

elastio shell / > cd vol-01a552bfa93ba59ab

elastio-configure

Name

elastio-configure

This command sets the shell mode to operate directly with the Cloud Connector within a particular region or with the Elastio Tenant.

Synopsis

This command will prompt for the following values:

  1. Tenant name: The name of the tenant
  2. Personal access token: The Elastio personal access token derived from the Tenant.

Description

Exit status: Returns 0 if the object is dismounted; otherwise, it will return a non-zero value.

Example

This command will provide access to your tenant APIs.

elastio shell > elastio-configure
Tenant name [None]: tenant name
Personal access key [None]: key

ls

Name

ls This command lists the information about objects in a directory.

Synopsis

ls [-la,-r,-m] [path] {name completion with tabs; right arrow to traverse tree}

Description

-la List the objects and all of its properties.

-r List the object tree starting from the current object location as set by a cd.

-m List all of the volumes mounted by Elastio.

Note: -r and -la can not be used in the same command.

[path] Specify the path to list the objects from. The default is the current path.

Exit status: Returns 0 if the object is dismounted; otherwise, it will return a non-zero value.

Note: The name completion function is activated by pressing the tab key.

Examples

List the objects in the root directory.

elastio shell> ls /

List the objects in the directory /vault/production

elastio shell> ls /vault/default

List the object tree starting in the directory /vault

elastio shell> ls -r /vault

List the object details starting in the directory /vault/default/ec2/i-01aa7442f6e577a86/06-01-21 10:01AM

elastio shell> ls -la /vault/default/ec2/i-01aa7442f6e577a86/"06-01-21 10:01AM"

List the elastio mounted volumes.

elastio shell> ls -m

mount

Note: Will be available in an upcoming release

Name

mount Performs the mount of a volume of an EBS recovery point to restore its files and directories.

Synopsis

mount [rp-id] [vault]

Description

[rp-id] - Specifies a recovery point ID of either an EC2 backup or an EBS backup. If multiple volumes are attached to an EC2 backup at the time of backup, the mount command will mount all of these volumes.

-s Show the Elastio service status information

Exit status: Returns 0 if the object is dismounted; otherwise, it will return a non-zero value.

Example

This command will mount the Local volume with an id r-dgcjylmt11dgg8snlw5f8wa5 to a local device.

elastio shell> mount r-dgcjylmt11dgg8snlw5f8wa5 -v sv-x9

Mounted recovery point: ‘r-dgcjylmt11dgg8snlw5f8wa5’ of ‘i-0be8d01f14a0ba1b7’:

Partition: ‘/dev/nvme0n1p1’ to ‘/media/elastio/i-0be8d01f14a0ba1b7/2021-10-18-11:46:58/dev-nvme0n1p1’

pwd

The pwd command shows the user the current working directory.

Name

pwd - Show the working directory

Example

The following command will show the working directory.

elastio> pwd

/vaults/production/ec2/i-323232313s3sd

restore

Name

restore - Perform a restore of the current object and all of its contents.

Synopsis

restore [-s] [rp-id] [vault]

Description

[rp-id] Specify a recovery point ID of the object to restore. This can be a file, directory, stream, EC2 or EBS resource.

[vault] Specify the vault name. If a vault is not specified, the default vault is used.

Exit status: Returns 0 if the object is dismounted; otherwise, it will return a non-zero value.

Note: The name completion function is activated by pressing the tab key.

Examples

This command will restore the AWS instance i-323232313s3sd to the default vault.

elastio shell /aws-assets/ec2/i-323232313s3sd> restore i-323232313s3sd

This command will restore all of the files on localhost in the directory /usr.

elastio shell /localhost/dev/usr> restore /usr

This command will restore the EBS volume in the directory /aws-assets/ebs/vol-094e20270740ed54c

elastio shell /aws-assets/ebs/vol-094e20270740ed54c> restore vol-094e20270740ed54c --vault data-vault

This command will restore an object by recovery point ID.

elastio shell/> restore r-dfxsa2wgmhm3ghlr31kxlicl

shell

Name

shell Shell out to the Elastio CLI

Synopsis

shell elastio [commands]

Description

[commands] Elastio CLI commands, type elastio --help to get help with this command.

cp

Name

cp Command to copy data from a mounted point or local disk. It functions like the default Linux cp command

Synopsis

cp [OPTION]... [-T] SOURCE DEST
  or: cp [OPTION]... SOURCE... DIRECTORY
  or: cp [OPTION]... -t DIRECTORY SOURCE...
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.

Mandatory arguments for long options are also mandatory for short options
  -a, --archive same as -dR --preserve=all
      --attributes-only don't copy the file data, just the attributes
      --backup[=CONTROL] make a backup of each existing destination file
  -b like --backup but does not accept an argument
      --copy-contents copy contents of special files when recursive
  -d same as --no-dereference --preserve=links
  -f, --force if an existing destination file cannot be
                                 opened, remove it and try again (this option
                                 is ignored when the -n option is also used)
  -i, --interactive prompt before overwrite (overrides a previous -n
                                  option)
  -H follow command-line symbolic links in SOURCE
  -l, --link hard link files instead of copying
  -L, --dereference always follow symbolic links in SOURCE
  -n, --no-clobber do not overwrite an existing file (overrides
                                 a previous -i option)
  -P, --no-dereference never follow symbolic links in SOURCE
  -p same as --preserve=mode,ownership,timestamps
      --preserve[=ATTR_LIST] preserve the specified attributes (default:
                                 mode,ownership,timestamps), if possible
                                 additional attributes: context, links, xattr,
                                 all
      --no-preserve=ATTR_LIST don't preserve the specified attributes
      --parents use full source file name under DIRECTORY
  -R, -r, --recursive copy directories recursively
      --reflink[=WHEN] control clone/CoW copies. See below
      --remove-destination remove each existing destination file before
                                 attempting to open it (contrast with --force)
      --sparse=WHEN control creation of sparse files. See below
      --strip-trailing-slashes remove any trailing slashes from each SOURCE
                                 argument
  -s, --symbolic-link make symbolic links instead of copying
  -S, --suffix=SUFFIX override the usual backup suffix
  -t, --target-directory=DIRECTORY copy all SOURCE arguments into DIRECTORY
  -T, --no-target-directory treat DEST as a normal file
  -u, --update copy only when the SOURCE file is newer
                                 than the destination file or when the
                                 destination file is missing
  -v, --verbose explain what is being done
  -x, --one-file-system stay on this file system
  -Z set SELinux security context of destination
                                 file to default type
      --context[=CTX] like -Z, or if CTX is specified then set the
                                 SELinux or SMACK security context to CTX
      --help display this help and exit
      --version output version information and exit

By default, sparse SOURCE files are detected by a crude heuristic and the corresponding DEST file is made sparse as well. This behavior is indicated by --sparse=auto. Specify --sparse=always to create a sparse DEST file whenever the SOURCE file contains a long enough sequence of zero bytes.
Use --sparse=never to inhibit the creation of sparse files.

When --reflink[=always] is specified, perform a lightweight copy, where the data blocks are copied only when modified. If this is not possible, the copy fails, or if --reflink=auto is specified, the system will revert back to a standard copy.
Use --reflink=never to ensure a standard copy is performed.

The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.
The version control method may be selected via the --backup option or through the VERSION_CONTROL environment variable.
Here are the values:

  none, off never make backups (even if --backup is given)
  numbered, t make numbered backups
  existing, nil numbered if numbered backups exist, simple otherwise
  simple, never always make simple backups

As a special case, cp makes a backup of SOURCE when the force and backup options are given and SOURCE and DEST are the same name for an existing, regular file.

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation at: <https://www.gnu.org/software/coreutils/cp>
or available locally via: info '(coreutils) cp invocation'

umount

Note: Will be available in an upcoming release

Name

umount Perform a dismount of a volume mounted by Elastio.

Synopsis

umount [-a] [point]

Description

[point] Specify a recovery point ID or mount point to umount device.

-a Dismount all of the elastio mounted volumes.

Exit status: Returns 0 if the object is dismounted; otherwise, it will return a non-zero value.

Examples

This command will dismount the device with an rp-id of r-dgcjylmt11dgg8snlw5f8wa5.

elastio shell > umount r-dgcjylmt11dgg8snlw5f8wa5

This command will dismount the device with an mount point of /media/elastio/i-0be8d01f14a0ba1b7/2021-10-18-11:46:58/dev-nvme0n1p1

elastio shell > umount /media/elastio/i-0be8d01f14a0ba1b7/2021-10-18-11:46:58/dev-nvme0n1p1

This command will dismount all Elastio mounted volumes.

elastio shell > umount -a

connectors

Name

connector Connect to a rds instance, and list databases and tables to backup and restore.

Synopsis

connector [RDS-db-instance-name]

Description

Exit status: Returns 0 if the object is dismounted; otherwise, it will return a non-zero value.

Examples

This command will connect you to a RDS database instance by name.

Welcome to the elastio shell. Type help or ? to list commands. Connector set to AWS account: 275707583963 Connector region is us-east-2

elastio-shell elastio/>cd aws-assets/rds/
elastio-shell rds/>ls -r

rds
├── mysql
│ └── test-mysqldb-instance
└── postgres
    └── database-1
elastio-shell rds/>connector test-mysqldb-instance

Enter a database instance username, if you want to use MasterUsername, leave this field empty.
Username: admin
Password: *******
elastio-shell rds/>ls -r
rds
├── mysql
│ └── test-mysqldb-instance
│ ├── TestCustomerMysqlDB
│ │ ├── testTABLE
│ │ ├── testTABLE22
│ │ └── testTABLE345
│ └── testDB
└── postgres
    └── database-1
elastio-shell rds/>backup TestCustomerMysqlDB