Skip to content →

Using LFTP to Easily Mirror/Transfer your Website on another VPS (Debian 10)

The traditional way of transferring files from one server to another is slow and requires a bunch of setup whether its done via archiving, imaging or direct file copy.

Instead you can use LFTP to easily mirror a remote directory on a new VPS.

Step 0:

We need to install lftp

sudo apt-get install lftp

Step 1:

Now we need to connect via ssh to our old server whilst on the new server’s terminal (this is to add its host key otherwise you may get an error in the next step)

ssh -p 22 root@website.com

Step 2:

Use the following series of commands to mirror the directory

open -u user,password sftp://website.com
mirror /path/remoteDir /path/localDir
quit

That’s it!

Published in Uncategorized

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *