R
R
Ruslan Leviev2013-02-13 00:00:48
Backup
Ruslan Leviev, 2013-02-13 00:00:48

How to easily transfer a very large site from one server to another?

The task is to transfer the site from one hosting to another. Problem: site files weigh almost 50 GB. And almost all of these 50 GB. - essentially incompressible formats (mp3 + video files). Throw some ideas how to transfer site files from one server to another with the least hemorrhoids and with little time cost?

Both servers are on CentOS. Servers are in different companies that provide colocation.

Answer the question

In order to leave comments, you need to log in

11 answer(s)
D
DobroFenix, 2013-02-13
​​@DobroFenix

The easiest is to download everything via rsync
More complex via ftp/scp

N
nochkin, 2013-02-13
@nochkin

rsync can copy, and when it breaks, it checks itself what has already been copied and does not copy again (options inplace/partial).
rsync can also do this with on-the-fly compression and via ssh (options -z and -e).
It can save rights, time and other attributes. There will be a one-to-one copy (option -a).
You can even limit the copy speed if you don't want to clog the entire channel (option bwlimit).
Easier and more reliable you can't imagine.

W
Wott, 2013-02-13
@Wott

64 gig flash drive :)

S
SergeyR, 2013-02-13
@SergeyR

On server 1, log in to SSH and run mc and in one of the windows connect via FTP or SSH to server 2.
And just copy the directory from one to another (perhaps even in the background).

Z
ZiGR, 2013-02-13
@ZiGR

I would advise you to first pack all these files into a zip archive (because one large file will be transferred much faster than 100k small ones), and then connect via ssh to the first server, and then ftp from it to the new server and start copying the archive . With screen, you can set this process to run on its own, so as not to keep your computer turned on for a long time.

-
----, 2013-02-13
@stalkerxxl

if there is an ISP panel on both servers, then just “import user”

I
Ilya Evseev, 2013-02-14
@IlyaEvseev

Install rsync on both servers: yum install rsync
On the source server, edit /etc/rsyncd.conf:

uid=root
use chroot=no
[RootFS]
path=/
read only=yes
hosts allow=ip address of new server

and run /etc/init.d/rsyncd start
On the receiving server, create the /home/oldserv directory and run the command:
rsync \
--archive         \
--hard-links      \
--inplace         \
--numeric-ids     \
--delete          \
--delete-excluded \
--progress        \
"--exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/home/*/.gvfs}" \
"$IP-старого-сервера::RootFS" "/home/oldserv/"

Run it again until the execution time stops decreasing.
On the old server, execute /etc/init.d/rsyncd stop, comment the "RootFS" section in /etc/rsyncd.conf.

-
----, 2013-02-13
@stalkerxxl

or just copy ftp--->ftp

S
SergeyR, 2013-02-13
@SergeyR

(not there) deleted.

S
Stepan, 2013-02-13
@L3n1n

1) Copy the data. All of the above will work, but I would still choose rsync. Other suggested methods will take longer if you have tons of small files.
2) On the new server, we open access to our database user from the Internet.
3) Turn off the database on the old server. We do a dump. We pour on a new one.
4) In scripts on the old server, registers a connection to the database on the new one and launch the site.
5) Change nski on the domain. It is advisable to change the A record of our domain to a new ip at the old hoster, this usually happens in a couple of minutes (depending on what TTL).
Here, according to this scheme, I always transfer working projects almost transparently for users

A
Alexander, 2018-10-12
@alexmixaylov

The question is already more than three years old,
but I found it through Google
The simplest solution, in my opinion,
make an archive on the old server
on the new one, connect via SSH and download it using wget -c

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question