XF 2.0 Using rsync to copy directory structure from old to new server?

tourmeister

Active member
Howdy,

I am in the process of moving to a new server. I have just done a clean install of XF2 on the new server. From cPanel, I started a terminal session on the new server and used sftp to directly copy a backup of my database file to the new server without having to download to my home computer and then upload to the new server. What I need to do now is copy a directory, with all of the files and sub directories, to the new server as well.

To transfer the database I started terminal session on the new server, changed to the directory where I wanted the file to be located, and then I used the following:

sftp olduser@oldserver.com

Once logged in, I changed to the directory with the backup of the database and used the following,

get database.sql

That worked perfect. So I tried something similar with the directory. I started a terminal session on the new server, changed to the /home/newuserdir directory because that is where I want the source directory to be copied to. I then connected to the old server via sftp and tried to use

get -r /home/olduserdir/linkfiles

Where /linkfiles is the directory I want to copy

I get an error for the -r option. After some Googling and searching, I tried using rsync like this,

rsync -av /home/newuserdir/ olduser@oldserver.com:/home/olduserdir/linkfiles

When prompted I entered the password for the old server and I got this

building file list ... done
rsync: mkdir "/home/newuserdir/linkfiles" failed: Permission denied (13)

and then it stops.

I REALLY want to be able to transfer this directory without having to download it from the old server to my home machine and then upload it to the new server as that would take a VERY long time. I am sure I am missing something simple, but I am a bit out of my area of expertise here as I am in no way an IT person. I am learning (SLOWLY) as I go. Any help would be very much appreciated!
 
Got it. :)

The source I found that showed the rsync command was going from the local to the remote and I was wanting to go from the remote to the local. So the source/destination was backward. I swapped them and it worked perfect.

It's little things like this that can drive one to insanity...:eek:
 
Back
Top Bottom