Skip to content

monobilisim/mt

Repository files navigation

Contributors Forks Stargazers Issues GPL License

Readme in English Readme in Turkish

mt

mt is a tool for backing up call recordings for Asterisk servers and transferring them to various destinations, including Minio.

Table of Contents


Installation

  1. Save the configuration file as /etc/mt/config.yml or use config_sample.yml as a template.

  2. Download the latest version of mt from GitHub Releases and place it in /usr/local/bin/mt. Make it executable.


Usage

To backup call recordings for Asterisk servers and transfer them to Minio:

/usr/local/bin/mt upload --source=/var/spool/asterisk/monitor/$(date -d yesterday +\%Y/\%m/\%d) --destination=minio/monitor/$(date -d yesterday +\%Y/\%m)/ -r -l debug -md5 -n -soe -rm -dmp

Parameters

General Parameters

  • --config / -c: Location of the configuration file. (If not used, the default is /etc/mt/config.yml.)
  • --log-level / -l: Log level (debug, info, warn, or error). (If not used, log level is determined by the configuration file.)

Upload Subcommand Parameters

  • --source / -s: Source file or directory.
  • --destination / -d: Destination.
    • Format: <Server entry in the configuration>/<bucket>/<prefix>
  • --recursive / -r: Required to move directories.
  • --md5-validation / -md5: When used, MD5 validation is performed for the uploaded file.
  • --remove-source-files / -rm: When used, source file is deleted after successful upload and validation.
  • --stop-on-error / -soe: When used, the process is terminated on the first error.
  • --notify-errors / -n: When used, errors are notified to Rocket.Chat.
  • --disable-multipart / -dmp: When used, multipart upload is disabled for large files.

License

mt is GPL-3.0 licensed. See LICENSE file for details.