Support

Documentation

The restore command

Syntax:

/path/to/php unite.phar restore fileName [--log=logPath] [--tmp=tempPath]
  [--certificate=certificatePath] [--verbose] [--quiet] [--nocolor]

Restores a backup archive.

This is the default command. As a result, you can omit the command name (restore) if you want.

The available arguments and options are:

fileName

Mandatory. The path to a UNiTE XML, JSON, JSON5 or YAML file which tells it what to do.

The path can be either absolute, or relative to the current working directory.

Use the special value STDIN to tell UNiTE to take its configuration file from the standard input instead of a file. This means that you can pipe a configuration output by another programme into UNiTE, e.g. cat /some/file.xml | /path/to/php unite.phar STDIN

--verbose

When this option is specified, UNiTE will print out debug messages to the output (screen) instead of just logging them.

--quiet

Print a minimal amount of information.

Will be overridden by the --verbose option if both are specified.

If neither --quiet nor --verbose is specified UNiTE will print a moderate amount of information which help you follow its progress as it happens.

--nocolor

Disable color output. Useful if you are running UNiTE through a CRON job and are receiving its output by email.

--log=/path/to/log/directory

Set the directory where the UNiTE execution log file will be stored. If this option is not provided, UNiTE defaults to the current working directory.

--tmp=/path/to/temp/directory

Set the directory where UNiTE will store temporary files. If this option is not provided, UNiTE defaults to the Operating System's temporary directory.

--certificate=/path/to/certificate.pem

Add /path/to/certificate.pem to the list of valid certification authorities. Use this option when you are going to be backing up a site which is using a self-signed SSL certificate, or a certificate signed by a certification authority that's not public or otherwise not in the list of trusted certification authorities. The file must be PEM-encoded.

How can UNiTE tell the configuration file format?

When you pass a file path in the fileName argument UNiTE checks the file's extension:

  • .xml: UNiTE assumes this is an XML file.

  • .json or .json5: UNiTE assumes this is a JSON or JSON5 document. Note that UNiTE actually uses the JSON5 parser in both cases. Since JSON5 is backwards compatible with JSON it can parse both formats just fine.

  • .yaml or .yml: UNiTE assumes it is a YAML file.

Any other file extensions result in an error message.

The extension check is case-insensitive, e.g. XML, xml and Xml are understood as the same thing.

If you are passing a file through the standard input (using STDIN as the fileName argument) UNiTE will try to guess the file type based on its contents.