manticoresoftware/manticoresearch-backup

Backup tool for Manticore Search

v1.5.1 2024-10-23 08:09 UTC

README

How to use

Read the official documentation for all the information about using the tool.

Developer documentation

Structure

Philosophy

  1. Keep the tool as small and lightweight as possible with no/minimum external dependencies.
  2. Try to write the code so that we can use it in different OSes (Windows, Linux, and any other where PHP can be used).
  3. We can use external binaries like rsync or any others, but we should maintain the native behavior so that we can still use the script when there is no such dependency.
  4. Tests should cover every new feature or extension to the script.

Backup structure

The directory with name backup-%date% is created in the --backup-dir folder. The target created directory has the following structure:

Building

To build the final executable you need to to run bin/build. The executable can be found then in the ./build directory under build/manticore-backup.

We recommend using manticore-executor. In this case, the script will use the custom-built PHP binary with all required extensions to run the tool. If you are adding a new functionality which requires a specific PHP module make sure you update manticore-executor as well.

The final script is a PHP Phar archive that can be run with PHP version of 8.1.11 that contains the next extensions:

  • zstd
  • Phar
  • Posix

Developing

To develop and run the system without building process you should use bin/run script that does all the magic.

Tests

All tests are located in the test directory.

We use PHPUnit for testing.

There are two tests: unit tests of used components and integrated tests of the whole script behavior.

Metrics

The backup tool by default sends your anonymized metrics to Manticore metrics server. It helps maintainers a lot with improving the product. We respect your privacy and you can be sure that the metrics are anonymous and no sensitive info is sent out, but if you still want to disable the telemetry, please make sure you run the tool with the flag --disable-metric or use the environment variable TELEMETRY=0.

Here are all metrics that we collect: