Table of Contents
The traditional way to use Remote CLI is as a command line script running on your machine.
Remote CLI requires a command line version of PHP (a.k.a. PHP-CLI)
to be installed on your machine. In the command line below, please
php with the full path to your PHP CLI
executable file. On most Linux and macOS systems, you don't need to
specify a path, just php will do as the executable
file is already in the path. On Windows, however, you most likely need
to specify a full path.
The PHP project provides an installer of PHP for
Windows which can install PHP for you and place the php.exe
binary in your path. For sanity's sake, we recommend you to install
Remote CLI requires PHP 8.0 with the optional
remote.phar (the Remote CLI
executable PHP archive) from our site you can use Remote CLI from the
command line of your operating system with a command like this:
php is the path to your PHP CLI
executable. If this is not in your path or you are not sure, please ask
your host or your system administrator.
If you are using Docker you can make use of the Dockerized version of Remote CLI:
docker run --rm akeebaltd/remotecli
The Dockerized version is self-contained, using the latest version of PHP at the time we built the container image. It's much simpler to use since it does not require installing or configuring anything on your host machine. Moreover, it's self-updating. The command line above always tries to use the latest version of Remote CLI we have published in Docker Hub.
There's a caveat. You can not use the Dockerized version with local servers i.e. anything which resolves to an IP address only routable by the host machine. If you want to try our Remote CLI locally you have to use the PHAR file.
hostName is the URL to the Akeeba
Backup / Akeeba Solo JSON API Endpoint URL which
can be read off the Schedule Automatic Backups page of our backup
Alternatively, you can use the URL to your site's root, without a
trailing slash, e.g.
secretKey is the Secret Key you have
defined in the component Options (Akeeba Backup for Joomla!) or the
System Configuration (Akeeba Backup for WordPress, Akeeba Solo) page of
the backup application.
The options which are required for each action are described in the Options chapter of this documentation.
For practical examples, or if you want to find out how to automate backing up and downloading the backups of your site, please consult the Walkthrough chapter.
actionName can be one of:
Prints an overview of the commands and available options.
Displays the license of the software and quits.
Prints information about the execution environment of Akeeba Remote CLI (NOT your site!). Use this when submitting support requests so we know what is going on with your execution environment.
Tests whether Remote CLI can connect to your site. If it can not, it will tell you why.
Performs a backup. It can (optionally) download the backup archive and delete it from the server afterwards.
Downloads a backup archive and can optionally delete it from the server afterwards
Delete backup archives from the server
Deletes backup archives and the associated backup record from the server
Lists the latest backup records
Lists the profile IDs and descriptions
Exports a backup profile as a JSON file, or a JSON string to the standard output. The generated JSON is the same you get as when exporting a backup profile from Akeeba Backup and Akeeba Solo.
Imports a backup profile from a JSON string in the standard input, a JSON string given as a parameter, or a JSON file (exported by Akeeba Backup, Akeeba Solo, or Akeeba Remote CLI).
Shows detailed information about a backup record
Upgrades Akeeba Backup on the server, if there is an update available
Before you can use Remote CLI with your site, you will need to enable the remote API in Akeeba Backup / Akeeba Solo. In order to do that, go to Akeeba Backup / Akeeba Solo and click on either thebutton in the toolbar (Akeeba Backup for Joomla!) or the button towards the bottom of the page (Akeeba Backup for WordPress, Akeeba Solo).
You will have to set Enable front-end and remote backup to Yes. You will also need to supply a Secret Key of your liking. This is the password to connect to your site over Akeeba Backup's Remote API. Due to several issues which have to do with server configuration, we strongly recommend using only alphanumeric characters (a-z, A-Z, 0-9), dash and underscore in your Secret Key. Other characters may lead to inability to connect to your site. Use something long and complex.