<commit_before>
# MySQL Backups

nc-backup-py can backup MySQL databases by making a mysqldump of the specified databases.

A sample configuration for MySQL is installed at [/etc/nc-backup-py/Examples/conf.mysql.json](nc-backup-py/conf/Examples/conf.mysql.json)

You can copy the above sample file or parts of the sample file and modify it to suit your needs.

Below is a sample mysql configuration section.

* Add mysql section to configuration file and add `/opt/backup/mydump` to `COMPRESSION.TARGETS`
```JSON
  "MYSQL": {
    "ACTION": "execute",
    "NAME": "mysql_backup",
    "EXECUTABLE": "mysql_dump.py",
    "PARAMETERS": {
      "CREDENTIAL_PATH": "/etc/nc-backup-py/mysql.credentials",
      "EXCLUDE_DB": "mysql performance_schema",
      "CONF_PATH": "/etc/my.cnf",
      "EXCLUDE_TABLE": "",
      "BINLOG_DAYS": "1"
    }
  },
  "COMPRESSION": {
    "ACTION": "execute",
    "NAME": "compression",
    "PARAMETERS": {
      "TARGETS": "/opt/backup/files /opt/backup/mydump",<commit_msg>minor fix<commit_after>
# MySQL Backups

nc-backup-py can backup MySQL databases by making a mysqldump of the specified databases.

A sample configuration for MySQL is installed at [/etc/nc-backup-py/Examples/conf.mysql.json](nc-backup-py/conf/Examples/conf.mysql.json)

You can copy the above sample file or parts of the sample file and modify it to suit your needs.

Below is a sample mysql configuration section.

* Add mysql section to configuration file and add `/opt/backup/mydump` to `COMPRESSION.TARGETS`
```JSON
  "MYSQL": {
    "ACTION": "execute",
    "NAME": "mysql_backup",
    "EXECUTABLE": "mysql_dump.py",
    "PARAMETERS": {
      "CREDENTIAL_PATH": "/etc/nc-backup-py/mysql.credentials",
      "EXCLUDE_DB": "mysql performance_schema",
      "CONF_PATH": "/etc/my.cnf",
      "EXCLUDE_TABLE": "",
      "BINLOG_DAYS": "1"
    }
  },
  "COMPRESSION": {  
    "ACTION": "execute",
    "NAME": "compression",
    "PARAMETERS": {
      "TARGETS": "/opt/backup/files /opt/backup/mydump",
{'fraction_non_alphanumeric': 0.13986013986013987, 'fraction_numerical': 0.000999000999000999, 'mean_word_length': 3.5522727272727272, 'pattern_counts': {'":': 30, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4636836', 'n_tokens_mistral': 670, 'n_tokens_neox': 650, 'n_words': 182}