Question about Moving C5 site to new host
PermalinkWhat I want to understand is how it works to move a site while the site is in use. For instance, if I back up all my files and load them onto the new server and get it working good on the new one and then have my domains transfer over and such, it can take hours to a couple of days to do all that. At that point, how do I make sure I don't lose any registered users that have registered on my site in the day or so while I was transferring everything over. If I just do a fresh backup/install of the database will that do it, or are there other files that contain this kind of info?
I just want to make sure I have my ducks in a row BEFORE I dive in and accidentally mess everything up.
Thanks,
~Kari
This way you would have downtime in two spots:
1. When you initially setup the "shared DB" you'll need to put your site down to minimize data loss when you switch to the centralized DB (initial => centralized)
2. When you finally move to the final DB, the same downtime there (centralized => final)
Other options would include setting up rsyncing process but that is hard with relational databases (although it's doable with the correct amount of budget, e.g. whitehouse.gov might want to do this).
Best,
Antti / Mainio
EDIT: And with both options you also need to setup your old server to run a cron script e.g. every minute to sync any new files in the /files/ dir to the new server.
EDIT2: Just other thought that came to my mind regarding to the "centralized DB" option: actually you could even minimize your downtime even further from there if you just moved the DB straight to your new server. Then you would allow remote access to that DB for the old server during the DNS update phase. Then when DNS is updated over the world, only thing you'd need just to do is disable the remote access to the DB which wouldn't cause any downtime.
Usually it's not a big deal if the site appears to be "down" for an hour or two so if this was a case of mine, I'd just setup an index.html for the old site to state "the DNS is updating please check again in few hours". So I believe this is similar what citytech answered above.
Again, in this situation I'm saying that I, as the sole web editor, will make zero changes to the "old" website during the time I'm setting up the new server - the only thing I'm worried about transferring over are any new users that came to my site since "Day 1".
Thank you!
1. Set the old site down (e.g. c5 maintenance mode or .htaccess writing or pointing requests to other location on that server)
2. At this phase copy the whole DB and /files to your new server
3. Setup the DNS and wait for them to update
If you don't have the option to set the old site down, I would still set that down for that couple of minutes it takes you to transfer the DB to the new server and then setup the old site to use the new DB as well (my previous post about allowing remote access for the old server to the new DB).
So to be even clearer: once you're ready to do DNS change, at that time you'll need to make sure your new site's DB and /files folder are up-to-date, thus you'd want to copy any new changes to them to the new site once you're ready to do the update.
Thanks.
This is the process that I've followed to move a live site from one hosting company to other.
Citytech