Export and import via the dump method in that link? Is everything else I mentioned accurate?
I think this is the process, but someone please tell me if I'm wrong. I have a low traffic forum with a large media gallery that I want to move from one server to a new one.
- Confirm updates and health on current server
good ida
- Install new instance of 2.3 and add MG and Importer add-ons
no, unnecessary, rather counterproductive
- Copy entire contents of current site to new server ( I expect this to take a while)
rsync the complete contents of your XF directory to your new server's web root, adjust ownership for all files afterwards (recursively).
- Put forum into maintenance mode and backup DB.
Do that before you start copying
- Put forum back in operation.
do that only after you have imported the DB (and preferrably after you have switched the DNS entries successfully)
- Use importer add-on to import content and DB on new server
no. Use the mysql/maria db to import the db on the new host. Adjust db-information in src/config.php accordingly
- Test new server to make sure everything is working as expected
yup
- For cutover, old server back into maintenance mode, DB export, Importer again on new server to overwrite any changes
bad idea.
I understand I'll need to make certain DNS changes along the way, and I think that has to be modified in the config file at the CLI if I want to test with a temporary hostname and then changed again when I go live on the new server.
You have to change DNS to the IP of the new host. Set the TTL for the existing DNS entry to something short at least a day before the move. Set a temporary hostname in ACP under basic options (and be aware to care to login in the ACP of your temporary install instead of your production install by manually editing the URL to the ACP sorrowfully - else you might change the settings of your live install while assuming you would be working on your staging system.
I don't expect changes in the Media Gallery while I'm testing, but there could be a small number of new posts in the forum. That's why I believe I just need to grab a fresh copy of the DB if someone posts something. I shouldn't need to update any of the file content, I believe.
I would not do that. It is absolutely recommended to do a test run, creating a staging environment on your new host first to test everything out, following the instructions in the provided link. But I would personally rather avoid to convert this into a productive install afterwards the way you intend to.
Am I close to right, or way off base?
Depends.
I've done a server move recently after sorrowful preparation and testing. The whole process took around two hours downtime, including rsyncing the 20GB XF directory to the new server, setting up and testing on the new location. Depending from the size of your Media Gallery it could take longer. You can indeed speed up the process by rsyncing the directory earlier (while the forum in the old location is still running) and then, after switching to maintenance mode, rsyncing again, this time only the delta.
I'd suggest:
1. create a test install on the new location as described in the link.
2. test the process and the test install sorrowfully and create a ordered list of to dos that a three-year old could follow
When you are done and ready to move:
1. set down the TTL of your DNS entry to like 10-30 Minutes a day before you actually move (depending from the current TTL)
2. optional: rsync your XF directory to the new server (directly in between servers, not downloading to your computer and uploading again as this will take way longer)
3. switch forum to maintenance mode
4. dump the forum db
5. copy the forum db to the new server
6. import the forum db into the new server
7. rsync the XF directory again to the new server (this time effectively only the delta to last time, if you did the optional step 2)
8. adjust ownership and permissions of the directory and files on the new server
9. edit src/config.php with the values for the new db (and possibly also for redis/your cacheprovider if you use one)
10. switch your DNS entry to the new server, wait until it settles.
11. Log into your new server and ACP, check if everything works. In case you use Enhanced search you will have to reconfigure it and rebuild the index, too.
12. If everything works, turn off maintenance mode
13. Clean up the old host after taking a final backup.
14. Throw away your test installation
If you go for the variant with step 2 you could be done in less than one hour - however: Test this first with your test install...
PS: I've no idea if there are other steps necessary in case you are using Cloudflare.
PPS: One more thing: Make sure if you have any add on or any configuration within XF that requires an absolute (full) path to the web root that you adjust this to the new infrastructure. Otherwise this may end up being a time bomb, rendering your forum with a failure notice for the users once a cron fires, delayed even weeks later. Has just happened to me with a badly coded add on that clearly should not have done that (but instead either having suffered silently or thrown an error to the error log).
