How to transfer a very large site from one server to another in a simple way?

Started by chatterbuzz1, Mar 27, 2023, 06:38 AM

Previous topic - Next topic

chatterbuzz1Topic starter

We have a task at hand - transferring a website from one hosting to another. However, there is a significant problem; the site files already amount to nearly 150 GB, mostly consisting of incompressible formats such as mp3 and video files.

Here's the challenge: how can we transfer these files from one server to another with minimal complications and time consumption?

Both servers run on CentOS and are situated in different colocation companies.

Any suggestions or insights on this matter would be greatly appreciated.


A highly efficient solution for transferring files is rsync. It not only copies files but also checks for any breakage during the process, ensuring that previously copied files are not duplicated (using the in-place/partial option).

Moreover, rsync offers the capability to compress files on the fly and transfer them securely via ssh (with the -z and -e options).

This powerful tool can preserve file permissions, timestamps, and other attributes, resulting in an exact replica of the original files (with the -a option).

In case you need to prioritize bandwidth usage, rsync even allows you to limit the copying speed, preventing the entire channel from getting congested (with the bwlimit option).

Overall, it's hard to find a simpler and more reliable way to handle file transfers than rsync.


To streamline the transfer process, I recommend compressing all the files into a zip archive initially. This way, transferring one large file will be significantly faster compared to numerous smaller ones.

Next, establish an ssh connection with the source server and subsequently connect to the new server via ftp to commence copying the compressed archive.

An additional optimization is to utilize the "screen" tool, which allows you to run the copying process independently. This means you won't have to keep your computer powered on for an extended duration.

By implementing these steps, you can expedite the transfer while minimizing the need for constant manual oversight.


1) Transferring the data is the initial step, and there are various methods available, but my preference would be rsync. It offers efficiency, especially when dealing with a large number of small files.
2) On the new server, it is essential to open access to our database user from the Internet to ensure smooth operation.
3) Next, we must deactivate the database on the old server, create a backup dump, and then merge it with the new server.
4) Additionally, we need to modify the scripts on the old server to establish a connection with the new database and launch the site smoothly.
5) To finalize the process, we should change the domain's configuration, specifically updating the A record of the domain from the old hoster to the new IP. Generally, this propagation can take only a few minutes (depending on the TTL settings).

By following this comprehensive approach, I have successfully transferred numerous working projects transparently to users, ensuring minimal disruption.