• Resolved djhmateer

    (@djhmateer)


    Hi

    On a Windows 10 machine running WordPress locally using this docker-compose file:

    # docker-compose.yml
    version: '3.3'
    
    services:
       db:
         image: mysql:5.7
         volumes:
           - ./db_data:/var/lib/mysql
         restart: always
         environment:
           MYSQL_ROOT_PASSWORD: somewordpress
           MYSQL_DATABASE: wordpress
           MYSQL_USER: wordpress
           MYSQL_PASSWORD: wordpress
       wordpress:
         depends_on:
           - db
         image: wordpress:4.9.6-apache
         ports:
           - "8000:80"
         restart: always
         environment:
           WORDPRESS_DB_HOST: db:3306
           WORDPRESS_DB_USER: wordpress
           WORDPRESS_DB_PASSWORD: wordpress
         volumes: 
           - ./html:/var/www/html

    The export using All in One produces a corrupt .wpress file. Here is an image of a working copy on the right, and corrupt copy of the left

    https://ibb.co/jiX5f8

    If you don’t share the volume (ie keep the filesystem inside the Linux container) then the export works.

    The corrupt file actually looks like it works, and imports properly, but produces a directory structure as shown below, and doesn’t do the import properly.
    https://ibb.co/f47Gno

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Yani

    (@yaniiliev)

    @djhmateer
    How large are the wpress files? Do you see any size difference between the two (working and corrupted)?

    I cannot replicate the issue with the same configuration on Linux/Mac.
    I will try on Windows later today/tomorrow.

    Thread Starter djhmateer

    (@djhmateer)

    @yaniiliev Interesting that it is fine on Linux/Mac.

    I’ve put the 2 files into this zip for reference

    https://davemateer.com/assets/files.zip

    Many thanks for looking into this.

    Regards
    Dave

    Plugin Author Yani

    (@yaniiliev)

    @djhmateer
    Could you remove the link for the backups, please? Not safe.

    The two files are complete backups but the one that is corrupted has a file that is with incorrect size.

    Is this issue reproducible? If you create another backup, does it result in the same corrupted archive? You can drag/drop the backup file to https://traktor.servmask.com to see if the file is correct.

    Are you using the latest version of the plugin?

    Thread Starter djhmateer

    (@djhmateer)

    @yaniiliev file link taken down.

    Windows 10. Docker CE 18.03.1-ce-win65 (17513). Stable channel. (latest version)

    steps to repro:
    1 – make new docker-compose.yml file (copy and pasted from my first post above)
    2 – docker-compose up
    3 – install wordpress
    4 – install your All-in-One WP Migration (so yes, latest version 6.69) from live
    5 – make change to hello world post (make title: hello world2)
    6 – export to file
    7 – make a new instance of wordpress like above and import.
    8 – see failure in wp-content directory

    I tried the https://traktor.servmask.com link which didn’t work and gave me this:
    https://ibb.co/fb5K8T

    Many thanks

    Regards
    Dave

    Plugin Author Yani

    (@yaniiliev)

    Thanks Dave.
    Yes, if you see the NaN% in traktor it means the archive is broken.

    We will try to reproduce on our end.

    Plugin Author Yani

    (@yaniiliev)

    @djhmateer

    I am still unable to replicate this on a Windows 10 box. I see that the volume is specified as ./
    Where is ./ located on your hard disk? Is it NTFS file system? Any chance that it is on USB or some other attached media?

    Plugin Author Yani

    (@yaniiliev)

    @djhmateer
    Could you check to see if the backup file in wp-content/ai1wm-backups is working when using a shared volume?

    Plugin Author Yani

    (@yaniiliev)

    I was able to track this issue down to the following Apache settings:

    However, these two directives are known to have problem with a network-mounted DocumentRoot (e.g., NFS or SMB), the kernel may be unable to serve the network file through its own cache. So just open httpd.conf on all boxes and changes the following:
    EnableMMAP off
    EnableSendfile off

    Docker is using Samba on Windows to share volumes.
    WordPress Docker image is using Apache with the above settings turned on. When they are turned off, the download is working fine.
    Note that this will affect almost everything that you are downloading via apache that can be changed on the volume. For example, if you edit your css files and refresh them in the browser, you may not see the changes immediately but after a while.

    • This reply was modified 6 years, 9 months ago by Yani.
    • This reply was modified 6 years, 9 months ago by Yani.
    Thread Starter djhmateer

    (@djhmateer)

    @yaniiliev good find!

    I can confirm this fixes the problem. To ‘fix’ the issue I manually went into the running container and edited the /etc/apache2/apache2.conf file adding in the lines:

    EnableMMAP Off
    EnableSendfile Off

    then restarting with: apachectl restart

    Export then worked fine. The import container didn’t need the fix to work.

    https://httpd.apache.org/docs/2.4/mod/core.html#enablemmap

    Many thanks
    Dave

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Corrupt export with Docker shared volume’ is closed to new replies.