If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Navigating the Hosting Transfer: Files, Git, and Database Deployment

Started by MartinL, Aug 05, 2023, 12:01 AM

Previous topic - Next topic

MartinLTopic starter

In general, I used to handle around 25 thousand unique websites per day.
This is the first time in my 8-year experience that I have encountered such a task. Previously, the number of websites was limited to 1 thousand per day. There were also large websites when I worked at Beeline (e1.ru, local.beeline.ru, beeline.ru), but the system administrators took care of them. Now, I am faced with the challenge on my own, as we don't have a system administrator. However, I am confident in my abilities and have been preparing for this task for over a month.

A Task.
The task at hand is to provide support for a high-traffic website on Bitrix, with around 25 thousand visitors per day.
The first step is to migrate the website to a different hosting provider. The database size is 700 MB, while the total file size exceeds 40 GB.
I would appreciate it if you could share your experiences and insights on this matter. Additionally, any articles or resources on this topic would be highly valuable.

Curious to explore more, I began my search on Google.

As of now, here's what I've gathered. I plan to upload the entire list of files to Git, along with the database. Once uploaded to the new hosting provider, I will then deploy the database.
While I have some confidence in this decision, I am not entirely certain of its correctness.
  •  


Ytuzweambinna

Migrating a high-traffic website to a different hosting provider can be a complex task, but with proper planning and execution, it can be successfully accomplished. Here are some suggestions and considerations:

1. Analyze the current website: Before migrating, assess the website's structure and identify any potential issues or areas that need improvement. Make sure all necessary components are accounted for, such as plugins, themes, customizations, and integrations.

2. Research the new hosting provider: Take the time to thoroughly research and choose a hosting provider that can handle the expected traffic and offers appropriate resources like bandwidth, disk space, and server performance. Look for providers with experience in handling high-traffic websites and good customer support.

3. Test the migration process: Before executing the migration, it's crucial to test the entire process on a staging environment. This will help you identify any potential challenges or conflicts that may arise during the actual migration.

4. Backup everything: Prior to migration, create a full backup of both the website files and the database. This will ensure that if anything goes wrong during the migration, you have a copy of the site that can be restored.

5. Move files and database: Upload the entire list of files to Git or any other version control system for safekeeping. For large file sizes, consider compressing them into a single archive for faster and more manageable uploading. As for the database, you can export it using tools like PHPMyAdmin or command-line utilities provided by your hosting provider.

6. Configure the new hosting environment: Set up the new hosting environment based on the requirements of your website. This includes creating the necessary server configurations, installing compatible software versions, and setting up proper file permissions.

7. Deploy the website: Once the hosting environment is ready, deploy the website files and configure the database connection settings accordingly. Ensure all dependencies and configurations are properly set up.

8. Thoroughly test the migrated website: After the migration, thoroughly test the website to ensure it functions seamlessly on the new hosting provider. Test various functionalities, user interactions, and monitor for any performance issues or errors.

9. Monitor and optimize performance: With a high-traffic website, it's essential to continuously monitor and optimize performance. Implement caching mechanisms, optimize database queries, enable content delivery networks (CDN), and consider any other performance optimizations recommended by the hosting provider or industry best practices.

consider when migrating a high-traffic website:

1. Plan for downtime: During the migration process, there may be a period of downtime where the website is inaccessible. To minimize the impact on users, schedule the migration during off-peak hours and communicate the downtime to your audience in advance.

2. Optimize the database: Before migrating the database, optimize it for better performance. This can include cleaning up unnecessary data, optimizing queries and indexes, and ensuring efficient database configurations.

3. Monitor the migration: Keep a close eye on the migration process to ensure it is progressing smoothly. Monitor the file uploads, database imports, and any errors or issues that may arise. Having a thorough understanding of the process will help you address any challenges effectively.

4. Set up redirects: If the URL structure of the website is changing during the migration, set up proper redirects from the old URLs to the new URLs. This will help maintain search engine rankings and avoid broken links.

5. Consider scalability: As your website receives high traffic, it's important to consider scalability. Choose a hosting provider that offers scalability options, such as auto-scaling or load balancing, to handle sudden spikes in traffic effectively.

6. Implement caching: Utilize caching mechanisms, such as server-level caching or caching plugins, to improve website performance. This can help reduce the load on the server and improve response times for visitors.

7. Continuously monitor and optimize: Even after the migration, regularly monitor your website's performance and make necessary optimizations. Keep an eye on server resources, website speed, and user experience to ensure the website continues to perform optimally.
  •  

arold10

To select the appropriate strategy for relocating a website to a different server, the first step is to determine whether it is permissible to disable writing or updating operations in the database during the transfer, causing actual downtime. Let's consider the scenario where we are migrating a busy online store that generates orders every three minutes. If we were to simply create a database dump, archive the files, move them to the new server, and deploy everything, the time delay would be at least 30 minutes, even if the new hardware is located in the same rack. During the migration process, new orders would still be recorded in the old database.

One option is to prevent the creation of new orders and users during the migration period. However, businesses are not satisfied with just 30 minutes (or even 2 hours) of downtime. Therefore, seamless relocation is implemented for larger projects. This involves installing a load balancer, rewriting the DNS to point to it, and having it proxy traffic to the old server. Then, a second server is set up and a database is deployed on it, functioning as a slave attached to the database on the old server. Scripts are synchronized using rsync/csync, and files are transferred to the cloud. The result is a classic master-slave model.

Finally, we switch the roles in the database, making the new server the master and the old server the slave. We then shut down the old server.
  •  

Sweexiacexnaw

The most convenient method involves using a standard backup software. Presumably, your 40Gb data is located in the /upload directory, so you can exclude it during the backup process. Additionally, another option is to employ RSYNC or sync the files through Git.
  •  

bababhuvaneshus

Navigating the hosting transfer involves a systematic approach for seamless transition. For files, utilizing FTP or SSH ensures data integrity during migration. When dealing with Git repositories, cloning the repository on the new host maintains version history. For database deployment, exporting and importing SQL dumps preserves data consistency. Testing after each step and updating configurations guarantees a successful transfer while minimizing disruptions.
  •  

Nidhibng

FTP or SSH ensures data integrity during migration. When dealing with Git repositories, cloning the repository on the new host maintains version history. For database deployment, exporting and importing SQL dumps preserves data consistency. Testing after each step and updating configurations guarantees a successful transfer while minimizing disruptions.
  •  
    The following users thanked this post: Sevad

Nidhibng

HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website. You can see examples of GitHub Pages sites in the GitHub Pages examples collection.
  •  



If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...