I relocated my LAMP server to an another host. On the new host I have a freshly installed /root folder. I remounted from the old server the WWW and SQL partition. My question: what else I had to copy from the old server (old root folder) to function my web site again. I suppose (appache and mysql config file) where they are?
1 Answer
Things to migrate, if you made any of these changes on original installation.
1) Any users/groups you created.
2) Any files belonging to created users.
3) Any CRON job files living in /var/spool/cron/crontabs
This includes all these files, for the root user + any users you created.
4) All of /etc.
When I take on new hosting clients, I normally clone their entire /etc filesystem into $client-etc, so I have all system config files... including...
Tunings/Configs for Apache + MariaDB/MySQL + PHP.
Also any SSL certs, which likely live in /etc/letsencrypt of other /etc directory.
Here's a good trick.
When you setup your new machines, run LXD + collect all your files for each site or set of related sites inside an LXD container.
This way you can move the entire container between machines + you'll always know you've captured every single file + oddball tuning/config change.
-
Hi David, thanks your response. I needed to look after this LXD. I have never used it before. Basically I finished the migration with the old fashion way, but I will test the LXD, because I still have permission related warning messages, but the site is more or less working. Oct 18, 2017 at 7:30
-
You're welcome. One warning about LXD, once you start using it, you may get hooked. LXD makes hosting many sites, all running different software versions a snap. Oct 18, 2017 at 12:31