Solved

Syncing old server to new - is ftp best solution

Posted on 2014-02-14
4
273 Views
Last Modified: 2014-02-25
We have a web server that is crashing/unstable - and a new server that has been bare-metal installed from a backup from broken server about a week old.  There is, however, new data (both mysql and actual PHP files.)

I'm going to break this up into two questions - this is just for the files.

How would you recommend I go about syncing up just the newer files?  Some sort of FTP with the newer tag?  Or is there a better way of doing it...and what would the syntax be to make it recursively parse through a directory structure and find/transfer the files after some date?

Thanks in advance!
0
Comment
Question by:erzoolander
4 Comments
 
LVL 16

Expert Comment

by:AlexPace
ID: 39861277
FTP transfers complete files so it should be fine for a one-time transfer but if this is an ongoing thing and you expect small changes to large files then rsync might be a better choice because it can sent only the portion of the file that actually changed.
0
 
LVL 38

Accepted Solution

by:
Gerwin Jansen, EE MVE earned 500 total points
ID: 39861880
For the files, I'd use rsync (also suggested by AlexPace).

On source server:

rsync -avz /folder/source/ remote_username@remote_servername:/folder/destination/

When rsync starts, you'll have to enter the password for remote_username@remote_servername - rsync will make the first, full, recursive copy.

When starting the above command again (after some time), only the new/changed files will be copied over.
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39864444
Agree with Gerwin.. Go for rsync as this provides delta copy.

TY/SA
0
 
LVL 1

Author Closing Comment

by:erzoolander
ID: 39887745
Gracias!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question