LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   FTP Synchronization (https://www.linuxquestions.org/questions/linux-newbie-8/ftp-synchronization-859540/)

anaskoara 01-30-2011 06:19 AM

FTP Synchronization
 
what is the best way to synchronize files with ftp server

and I wnat to do this automaticlly

regards

EricTRA 01-30-2011 06:27 AM

Hello,

You could use wget to synchronize different types of servers like http, ftp, ... Can you indicate the use for this synchronization? Are you trying to keep a mirror of a FTP server for backup purposes? Do you have SSH access to that server or only FTP? The more information you provide the better we can help.

Kind regards,

Eric

anaskoara 01-30-2011 07:39 AM

Hi
my team was directly working on my remote server
for speed I want them to work on local server and then changes to local server are transferred to remote server

I have ftp account to the remote server I can get ssh access

Regards

EricTRA 01-30-2011 08:16 AM

Hello,

I'm not sure if you could do what you want using only FTP, maybe someone else can clarify on that point. But if you can get SSH access then you can easily set up synchronization with rsync, or even better (my personal opinion) with Unison File Synchronizer. Have a look at the features, you'll be surprised. I have it set up to synchronize configuration files between various servers so that our developers only have to make their changes in one place.

Kind regards,

Eric

sycamorex 01-30-2011 08:29 AM

Quote:

Originally Posted by EricTRA (Post 4242305)
Hello,

I'm not sure if you could do what you want using only FTP, maybe someone else can clarify on that point. But if you can get SSH access then you can easily set up synchronization with rsync, or even better (my personal opinion) with Unison File Synchronizer. Have a look at the features, you'll be surprised. I have it set up to synchronize configuration files between various servers so that our developers only have to make their changes in one place.

Kind regards,

Eric

Sorry to jump in, but I've just been thinking about something similar. Thanks

EricTRA 01-30-2011 08:31 AM

Hi sycamorex,

Jump in anytime! The water's nice :)

Kind regards,

Eric

anaskoara 01-30-2011 05:43 PM

hi Eric
thank you i'll try your approche and tell you with the results

Regards

EricTRA 01-31-2011 01:23 AM

Hello,

You're welcome. Looking forward to know how it works out.

Kind regards,

Eric

anaskoara 02-01-2011 09:04 AM

Hi
I failed to install unison on the remote server
on both servers I used centos 5 can you give suitable binary and how to install it

Regard

schneidz 02-01-2011 09:38 AM

Quote:

Originally Posted by anaskoara (Post 4242285)
Hi
my team was directly working on my remote server
for speed I want them to work on local server and then changes to local server are transferred to remote server

I have ftp account to the remote server I can get ssh access

Regards

i would recommend not using the old antiquated ftp protocol and instead use the much more secure scp. the added benefit you can automate things more easily in scripts without using plain text passwords.

EricTRA 02-01-2011 09:53 AM

Quote:

Originally Posted by anaskoara (Post 4244648)
Hi
I failed to install unison on the remote server
on both servers I used centos 5 can you give suitable binary and how to install it

Regard

Hello,

How did you try to install it? Using your package manager? Is Unison available for CentOS in the repositories you use? You could download a RPM from this site for your OS/architecture. Be sure to have the dependencies installed if you don't use your package manager or alternatively download and installed all dependencies also.

Kind regards,

Eric

anaskoara 02-03-2011 05:26 AM

Hi

I installed it and worked with it and did excellent job!

there is on small problem with me

how can i one way sync from local to remote host only (my main problem if id delete file in local i want it to delete it on the remote)

Regards

EricTRA 02-03-2011 06:45 AM

Hello,

Glad you got it working! Unison has a very complete and easy to understand online manual (or you can consult the man page for unison). I'm sure you'll find your answer in there.

Kind regards,

Eric

anaskoara 02-03-2011 09:00 AM

Hi

unison is working like magic
i do every this i need
but there is one last question
when i write
unison myfolder ssh://remotemachine//pathe_folder
it always ask my about root password
how can i pass the password in arguments to make this process done automatically by cron tab ,I've read the manual and did not find any thing about this.

Regards

schneidz 02-03-2011 09:03 AM

^ i dont know about unison but you can ssh into machines using keys:
http://linuxproblem.org/art_9.html


All times are GMT -5. The time now is 09:45 PM.