Upgrade from v3 to v4


#1

Hi,

Is it safe to upgrade to v4 and if so, any particular approach to take? Or can I simply use the installer script?

Thanks for any tips :slight_smile:


#2

@rolfallardvanha EasyEngine does provide a migration script to migrate your v3 sites to v4. I suggest you read our v3 to v4 migration guide and then learn more about how to use the migration script.


#3

I really suggest you make a backup first as things are likely to go sideways and you don’t want that.


#4

Hi guys, thanks for your replies and the excellent guide and migration script.

I’ve read through it and looking at the requirements and possible incompatibilities, I don’t see any issues except that Multisite does not allow the test over ports 8080 and 8443 apparently. i could live with that if I knew how to (quickly) switch back to the v3 site version if it turns out something went wrong. Is that possible at all?

And: I’m running multiple multisites on a single VPS. If I migrate one by one, will the sites created on v3 remain accessible during the process or is Docker going to hog ports 80/443 once the first migrated multisite is activated? Or rather: will Docker be running up front or behind an nginx-proxy?

This does scare me a little. What is likely to go wrong? Partial file migration? DB corruption? Can you recommend any extra checks to do (like comparing disk usages or db table sizes) afterwards even if all seems fine?

Thank you so much for all clarity you can provide, and of course for the famous EE :slight_smile:


#5

I have successfully downloaded and executed the migration script. My server: Linode, Ubuntu 18.04.1 LTS. I have only one site on ee3 on that server that I have now tried to migrate. I’m getting following errors:

Status: Downloaded newer image for easyengine/redis:v4.0.0
Configuring project.
Creating WordPress site mysite.com
Copying configuration files.
Starting site's services.
Downloading and configuring WordPress.
Checking and verifying site-up status. This may take some time.

Installing WordPress site.
Success: https://mysite.com has been created successfully!
[...]
Exporting db.
Error: This does not seem to be a WordPress install.
Pass --path=`path/to/wordpress` or run `wp core download`.
mv: cannot stat 'mysite.com.db': No such file or directory
Importing db.
ERROR:
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

rm: cannot remove '/mysite.com.db': No such file or directory
Copying site contents
sending incremental file list
rsync: change_dir "/wp-content" failed: No such file or directory (2)

sent 20 bytes  received 12 bytes  64.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
ERROR:
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

ERROR:
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

chown: cannot access '': No such file or directory
mysite.com created in ee v4
-----> Switching EasyEngine v4 sites to port 80
-----> Disabling EasyEngine v3.
Stop : nginx     [OK]
Stop : php5.6-fpm[OK]
Stop : php7.0-fpm[OK]
Stop : mysql     [OK]
Stop : postfix   [OK]
ee-global-redis is up-to-date
Recreating ee-global-nginx-proxy ...
Recreating ee-global-nginx-proxy ... done
OK
ERROR:
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

ERROR:
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

-----> Replacing `ee` executable with EasyEngine v4.
-----> Now running `ee` will execute EasyEngine v4.
-----> Migration is complete.

Second try and it went better after I entered the correct email address. However, I still get the error message during install. Everything seems to work from what I can see. I’m just waiting for ssl certificate (letsencrypt) to propagate so that I can test the site fully.


#6

AFAIK, it is not possible on single server migration. If you want it, I recommend that you try out migration to different server. That way, you’ll be able to test both sites simultaneously by updating the entry in hosts file.

In both, single server and different server migration, During the process of migration, v3 site will be available. After migration is completed, you will be asked to verify if your site(s) work on v4.

  • In same server migration, you will verify it on port 8080 and 8443.
  • In different server migration, you will have to verify by updating host entries.

During this process, you’ll be able to access your v3 sites

Once you verify that the migrated sites are correct, then

  • in case of single server migration, EasyEngine will stop v3 stack and start v4 stack. Now, v4’s Nginx Proxy will start listening on port 80 and 443 of the same server.

Nginx-Proxy itself runs on Docker containers. So it is the nginx proxy docker container that will listen on port 80 and 443 after you’ve confirmed that your sites work on v4.


#7

Thanks for your thoughts @kirtan

OK, so does that mean it’s not possible to run a mixture of v3 and v4 sites at the same time, even if it’s for a transitional period? Let’s say I migrate one multisite one day, then the second multisite the next day (and so on) will the second multisite remain accessible while the first multisite is switched to live on docker?

If not, the idea of pushing v4 migrations to a new server is maybe the best option. They are all multisites so there would not be the possibility to test over ports 8080/8443 anyway…