Magento 2.1.18 is the final 2.1.x release. After June 2019, Magento 2.1.x will no longer receive security patches, quality fixes, or documentation updates.
To maintain your site's performance, security, and PCI compliance, upgrade to the latest version of Magento.
Magento Commerce only

Run the support utilities

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

Run all Magento CLI commands as the Magento file system owner.

Overview of the support utilities

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

Magento Support 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 Magento 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 Magento 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 Magento 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 Magento 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).

After the command completes, provide the database backup to Magento Support.

What is sensitive data?

Magento uses your encryption key to encrypt the following:

  • Credit card information
  • Usernames and passwords specified in the Magento Admin configuration (for example, logins to payment gateways)
  • CAPTCHA values sent over the network

Magento does not encrypt:

  • Administrative and customer usernames and passwords (these passwords are hashed)
  • Address
  • Phone number
  • Other types of personally identifiable information except for credit card numbers

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

1
{:.bs-callout .bs-callout-info}   The commands run properly _only_ from your Magento installation directory.
  1. bin/magento support:utility:paths creates <magento_root>/var/support/Paths.php, which lists the paths to all application used by the utility.
  2. 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.

Updated