I have a Drupal 8 site on an Ubuntu 18.04 server and want to move my site to a new server with Ubuntu 20.04.
With Drupal 7 I did these steps
Create a set of keys (on the new server) :
$ sudo ssh-keygen -t rsa -b 4096 -C root@www-example-com
$ sudo cat /root/.ssh/id_rsa.pub
Add the public key (on the old server) :
$ sudo nano /root/.ssh/authorized_keys
Export the database (on the old server) :
mysqldump -u root -p www_example_com > /var/www/www-example-com/share/www-example-com_$(date +%F).sql
Repatriate the site file (on the new server) :
$ sudo scp -r -p root@xxx.xx.xxx.xx:/var/www/www-example-com/ /var/www/www-example-com/
Import the database (on the new server) :
mysql -u root -p www_example_com < /var/www/www-example-com/share/www-example-com_2020-08-10.sql
That's all, with these intructions, the Drupal 7 site works.
The problem
Now with Drupal 8 there is Composer with a new folder and file tree present in the var directories and in home.
How to move a Drupal 8 site to a new server ?