Adobe Commerce 2.3 reached end of support in September 2022.
Adobe Commerce only. Learn more.

Run the support utilities

In addition to the command arguments described in this topic, see Common arguments.

Run all Magento CLI commands as the file system owner.

Overview of the support utilities

The Adobe Commerce Support utilities (also referred to as the Data Collector) enable Adobe Commerce users to gather troubleshooting information about your system that can be used by our Support team.

Adobe Commerce uses these backups (also referred to as dumps) to analyze issues that require access to your code. A typical scenario follows:

  1. You’re having an issue with your Magento store and you contact Adobe Commerce Support.
  2. Support determines they need to see your code or database to reproduce the issue.
  3. You back up the code to a .tar.gz file.

    This backup excludes your media files to speed up the process and to result in a much smaller file.

  4. You back up the database to a .tar.gz file.

    By default, sensitive data is hashed when making the backup.

  5. You upload your backups to a file sharing service.
  6. Support analyzes your issues without affecting your development or production environment.

The utilities can take several minutes to complete.

Create a code backup

This command backs up code and compresses it in tar.gz format.

This is not the same code backup performed by the bin/magento setup:backup command. This command is intended to be used to back up code for examination by Adobe Commerce Support.

Command options:

1
bin/magento support:backup:code [--name=<file name>] [-o|--output=<path>] [-l|--logs]

Where:

  • --name specifies the dump file name (optional). If you omit this parameter, the dump file is time and date-stamped.
  • -o|--output=<path> is the absolute file system path to store the backup (required).
  • -l|--logs includes log files (optional).

For example, to create a code backup named /var/www/html/magento2/var/log/mycodebackup.tar.gz:

1
bin/magento support:backup:code --name mycodebackup -o /var/www/html/magento2/var/log

After the command completes, provide the code backup to Adobe Commerce Support.

Create a database backup

This command backs up the Magento database and compresses it in tar.gz format.

This is not the same code backup performed by the bin/magento setup:backup command. This command is intended to be used to back up code for examination by Adobe Commerce Support.

Command options:

1
bin/magento support:backup:db [--name=<name>] [-o|--output=<path>] [-l|--logs] [-i|--ignore-sanitize]

Where:

  • --name specifies the dump file name (optional). If you omit this parameter, the dump file is time and date-stamped.
  • **-o|--output=<path> is the absolute file system path to store the backup (required).
  • -l|--logs includes log files (optional).
  • -i|--ignore-sanitize means that data is preserved; omit the flag to hash sensitive data stored in the database when creating the backup (optional).

Sensitive data includes customer information from the following database tables:

1
2
3
4
5
6
7
8
9
10
'customer_entity',
'customer_entity_varchar',
'customer_address_entity',
'customer_address_entity_varchar',
'customer_grid_flat',
'quote',
'quote_address',
'sales_order',
'sales_order_address',
'sales_order_grid'

After the command completes, provide the database backup to Adobe Commerce Support.

Troubleshooting: display utilities and paths

We provide commands that display paths to utilities required by the Data Collector and the command line. You can use these commands, for example, if errors like the following display in the Admin or on the command line:

1
Utility lsof not found

Run the following commands in the order shown to display the paths to the applications used by the support utilities and Data Collector:

  1. Change to your Magento installation directory.

    For example, cd /var/www/magento2

    The commands run properly only from your Magento installation directory.

  2. bin/magento support:utility:paths creates <magento_root>/var/support/Paths.php, which lists the paths to all application used by the utility.
  3. bin/magento support:utility:check displays the file system paths.

A sample follows:

1
2
3
4
5
6
7
8
9
   gzip => /bin/gzip
   lsof => /usr/sbin/lsof
   mysqldump => /usr/bin/mysqldump
   nice => /bin/nice
   php => /usr/bin/php
   tar => /bin/tar
   sed => /bin/sed
   bash => /bin/bash
   mysql => /usr/bin/mysql

To resolve issues with running the tools, make sure these applications are installed and are in the web server user’s $PATH environment variable.