Create a code backup
This command backs up code and compresses it in tar.gz
format.
support:backup
command is not the same code backup performed by the setup:backup
command. The support:backup
command is intended to back up code for examination by Adobe Commerce Support.Command options:
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
:
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 Commerce database and compresses it in tar.gz
format.
support:backup
command is not the same code backup performed by the setup:backup
command. The support:backup
command is intended to back up code for examination by Adobe Commerce Support.Command options:
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:
'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:
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:
-
Change to your Commerce installation directory.
For example,
cd /var/www/magento2
INFO
The commands run properly only from your installation directory. -
bin/magento support:utility:paths
creates<magento_root>/var/support/Paths.php
, which lists the paths to all application used by the utility. -
bin/magento support:utility:check
displays the file system paths.
A sample follows:
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.