Redgate Clone

CLI Installation

Our command line tool rgclone is hosted directly in the server and can be downloaded via our Web API (through a download endpoint).

This also means that installation and upgrades are basically identical as they require this download to your local machine.

Contents

Web API endpoint

To download and configure the rgclone CLI you'll need the Redgate Clone API endpoint for your cluster:

Web API Endpoint

Managed (AKS) clusters: https://<instance-dns-address>

Embedded (VM) clusters: https://<instance-dns-address>:8132

Installation

rgclone can be installed on Windows or Linux.

Windows Installation

  1. Set the RGCLONE_API_ENDPOINT environment variable to point to your Web API endpoint.
  2. Download the zip file that contains the rgclone command line executable.
    • You can do this by going to <web-api-endpoint>/cloning-api/download/cli/windows-amd64  in your browser.
  3. Extract the rgclone.exe file from the zip file and place it somewhere on your file-system.
  4. (Optional): update your PATH environment variable to point to the directory containing rgclone.exe , so you can call it more easily from any directory.
  5. In a shell, run rgclone.exe version  to verify the CLI is working and connected to your cluster. If all is well it should output something like this:
    Current rgclone CLI version                          : 2.3.2 (built for Redgate Clone version '1.0.64747')
    Latest rgclone CLI version (downloadable from server): 2.4.0
    Current Redgate Clone server version                 : 1.0.67045

Linux Installation


1. Set the RGCLONE_API_ENDPOINT environment variable to point to your Web API endpoint.

export RGCLONE_API_ENDPOINT=<web-api-endpoint>

2. Download and extract the rgclone .tar.gz file

curl $RGCLONE_API_ENDPOINT/cloning-api/download/cli/linux-amd64 | tar xz

3. There should now be an rgclone executable in the current directory. Verify it's working and connected to your cluster:

./rgclone version

4. (Optional): move the rgclone executable to a directory of your choice, then update the PATH environment variable to point to that directory. This is so you can call it more easily from any directory. Note: the exact command you need will depend on the shell you are using, but below is an example for bash:

echo "export PATH=$PATH:<path to rgclone directory>" >> ~/.profile

Verification


If required, you can obtain a checksum for the CLI from the <download address>/checksum endpoint

Authenticating


Before you can run other commands (e.g., to create data images or data containers), you need to authenticate rgclone using the access token you configured in the Admin Console.

You can make this persistent (e.g. for usage in CI/CD pipelines) by setting an environment variable.

Upgrades


Since the latest version of rgclone is hosted in the server, you can upgrade by simply repeating the installation steps above whenever a new version is available.

The tool will automatically detect if you are running an older (or newer) version of rgclone after running any command and issue a recommendation to update:


The message will be slightly different if you are running a newer version (e.g. if a server downgrade happened):





Didn't find what you were looking for?