cancel
Showing results for 
Search instead for 
Did you mean: 

[2.1.1 CE] Backup of database (--db) does not gzip file.

0 Kudos

[2.1.1 CE] Backup of database (--db) does not gzip file.

Feature request from azeemism, posted on GitHub Sep 02, 2016

Running php bin/magento setup:backup --code --media --db as www-data creates a *_db.sql file instead of a *_db.gz file as indicated in http://devdocs.magento.com/guides/v2.1/install-gde/install/cli/install-cli-backup.html. The backup was run while in developer mode. I have not tested under production mode, but I expect the same result.

Obviously as the database sizes grows this will become a major space concern. The Restore/Rollback seems to work, but there is another major issue refer to #6460 .

Preconditions:

  1. Magento 2.1.1 CE (Composer install)
  2. php bin/magento deploy:mode:set developer
  3. Mariadb
    root@skynet:/# dpkg -l | grep mariadb
    ii  libmariadbclient18                   10.1.16+maria-1~jessie               amd64        MariaDB database client library
    ii  mariadb-client                       10.1.16+maria-1~jessie               all          MariaDB database client (metapackage depending on the latest version)
    ii  mariadb-client-10.1                  10.1.16+maria-1~jessie               amd64        MariaDB database client binaries
    ii  mariadb-client-core-10.1             10.1.16+maria-1~jessie               amd64        MariaDB database core client binaries
    ii  mariadb-common                       10.1.16+maria-1~jessie               all          MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
    ii  mariadb-server                       10.1.16+maria-1~jessie               all          MariaDB database server (metapackage depending on the latest version)
    ii  mariadb-server-10.1                  10.1.16+maria-1~jessie               amd64        MariaDB database server binaries
    ii  mariadb-server-core-10.1             10.1.16+maria-1~jessie               amd64        MariaDB database core server files
  4. PHP 7.0:
    root@skynet:/# dpkg -l | grep php7
    ii  libapache2-mod-php7.0                7.0.9-1~dotdeb+8.1                   amd64        server-side, HTML-embedded scripting language (Apache 2 module)
    ii  php7.0                               7.0.9-1~dotdeb+8.1                   all          server-side, HTML-embedded scripting language (metapackage)
    ii  php7.0-cli                           7.0.9-1~dotdeb+8.1                   amd64        command-line interpreter for the PHP scripting language
    ii  php7.0-common                        7.0.9-1~dotdeb+8.1                   amd64        documentation, examples and common module for PHP
    ii  php7.0-curl                          7.0.9-1~dotdeb+8.1                   amd64        CURL module for PHP
    ii  php7.0-fpm                           7.0.9-1~dotdeb+8.1                   amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
    ii  php7.0-gd                            7.0.9-1~dotdeb+8.1                   amd64        GD module for PHP
    ii  php7.0-igbinary                      1.2.1-1~2b7c703-1~dotdeb+8.2         amd64        igbinary serializer for PHP
    ii  php7.0-imagick                       3.4.2-1~dotdeb+8.2                   amd64        Provides a wrapper to the ImageMagick library
    ii  php7.0-intl                          7.0.9-1~dotdeb+8.1                   amd64        Internationalisation module for PHP
    ii  php7.0-json                          7.0.9-1~dotdeb+8.1                   amd64        JSON module for PHP
    ii  php7.0-mbstring                      7.0.9-1~dotdeb+8.1                   amd64        MBSTRING module for PHP
    ii  php7.0-mcrypt                        7.0.9-1~dotdeb+8.1                   amd64        libmcrypt module for PHP
    ii  php7.0-mysql                         7.0.9-1~dotdeb+8.1                   amd64        MySQL module for PHP
    ii  php7.0-opcache                       7.0.9-1~dotdeb+8.1                   amd64        Zend OpCache module for PHP
    ii  php7.0-pspell                        7.0.9-1~dotdeb+8.1                   amd64        pspell module for PHP
    ii  php7.0-readline                      7.0.9-1~dotdeb+8.1                   amd64        readline module for PHP
    ii  php7.0-redis                         3.0.0~rc1-1~dotdeb+8.2               amd64        PHP extension for interfacing with Redis
    ii  php7.0-soap                          7.0.9-1~dotdeb+8.1                   amd64        SOAP module for PHP
    ii  php7.0-xml                           7.0.9-1~dotdeb+8.1                   amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
    ii  php7.0-xsl                           7.0.9-1~dotdeb+8.1                   all          XSL module for PHP (dummy)
    ii  php7.0-zip                           7.0.9-1~dotdeb+8.1                   amd64        Zip module for PHP
  5. Debian
    root@skynet:/# cat /proc/version
    Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02)
    root@skynet:/# lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description:    Debian GNU/Linux 8.5 (jessie)
    Release:        8.5
    Codename:       jessie

Steps to reproduce

  1. Install magento 2.1.0 with composer
  2. Upgrade to 2.1.1 (while in developer mode)
    "require": {
        "magento/product-community-edition": "2.1.1",
        "composer/composer": "@beta"
    },
    "minimum-stability": "stable",
    "prefer-stable": true,
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    composer update
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento --ansi setup:static-content:deploy en_CA
    www-data@skynet:~/example.com/magento/2.x/2.x$ php bin/magento setup:db:status
    All modules are up to date.
    www-data@skynet:~/example.com/magento/2.x/2.x$ php bin/magento -V
    Magento CLI version 2.1.1
  3. Switch to or stay in developer mode php bin/magento deploy:mode:set developer
  4. Create a backup php bin/magento setup:backup --code --media --db as www-data

NOTE: Steps 1 (install 2.1.0) & 2 (upgrade) may not be required to reproduce the issue, and I also expect the same issue if a backup is run in production mode (but I have not tested with production mode).

Expected results

  1. Database file created with format *_db.gz as indicated in http://devdocs.magento.com/guides/v2.1/install-gde/install/cli/install-cli-backup.html

Actual results

  1. Database file creates with format *_db.sql
  2. Enabling maintenance mode
    Code backup is starting...
    Code backup filename: 1472779824_filesystem_code.tgz (The archive can be uncompressed with 7-Zip on Windows systems)
    Code backup path: /var/www/example.com/magento/2.x/2.x/var/backups/1472779824_filesystem_code.tgz
    [SUCCESS]: Code backup completed successfully.
    Media backup is starting...
    Media backup filename: 1472779824_filesystem_media.tgz (The archive can be uncompressed with 7-Zip on Windows systems)
    Media backup path: /var/www/example.com/magento/2.x/2.x/var/backups/1472779824_filesystem_media.tgz
    [SUCCESS]: Media backup completed successfully.
    DB backup is starting...
    DB backup filename: 1472779824_db.sql
    DB backup path: /var/www/example.com/magento/2.x/2.x/var/backups/1472779824_db.sql
    [SUCCESS]: DB backup completed successfully.
    Disabling maintenance mode
www-data@skynet:~/example.com/magento/2.x/2.x$ ls -lht var/backups/
total 43M
-rw-rw-r-- 1 www-data www-data 547K Sep  1 18:31 1472779824_db.sql
-rw-rw-r-- 1 www-data www-data  60K Sep  1 18:31 1472779824_filesystem_media.tgz
-rw-rw-r-- 1 www-data www-data  43M Sep  1 18:31 1472779824_filesystem_code.tgz

3. I do not see any errors showing up in ${webroot}/var/log/system.log.

Thanks.

4 Comments
Not applicable
Status changed to: Investigating
 
Not applicable

Comment from veloraven, posted on GitHub Sep 02, 2016

@azeemism thank you for your report. Please, format this issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result.

Not applicable

Comment from azeemism, posted on GitHub Sep 02, 2016

@veloraven comment has been updated. Thanks.

BTW the numbering reverting back to 1 within each step category is a github issue. It is inconsistent, and the more I try to fix it the worse it gets.

Not applicable

Comment from sevos1984, posted on GitHub Sep 06, 2016

This is a known issue, ticket is MAGETWO-50844, thanks for reporting.