Solved

Syncing old server to new - is ftp best solution

Posted on 2014-02-14
4
270 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 37

Accepted Solution

by:
Gerwin Jansen 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now