LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-30-2011, 07:19 AM   #1
anaskoara
LQ Newbie
 
Registered: Jan 2011
Posts: 15

Rep: Reputation: 0
FTP Synchronization


what is the best way to synchronize files with ftp server

and I wnat to do this automaticlly

regards
 
Old 01-30-2011, 07:27 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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
 
Old 01-30-2011, 08:39 AM   #3
anaskoara
LQ Newbie
 
Registered: Jan 2011
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
Old 01-30-2011, 09:16 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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
 
1 members found this post helpful.
Old 01-30-2011, 09:29 AM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200
Quote:
Originally Posted by EricTRA View Post
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
 
Old 01-30-2011, 09:31 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi sycamorex,

Jump in anytime! The water's nice

Kind regards,

Eric
 
Old 01-30-2011, 06:43 PM   #7
anaskoara
LQ Newbie
 
Registered: Jan 2011
Posts: 15

Original Poster
Rep: Reputation: 0
hi Eric
thank you i'll try your approche and tell you with the results

Regards
 
Old 01-31-2011, 02:23 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

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

Kind regards,

Eric
 
Old 02-01-2011, 10:04 AM   #9
anaskoara
LQ Newbie
 
Registered: Jan 2011
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
Old 02-01-2011, 10:38 AM   #10
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,051

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
Quote:
Originally Posted by anaskoara View Post
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.
 
Old 02-01-2011, 10:53 AM   #11
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by anaskoara View Post
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
 
Old 02-03-2011, 06:26 AM   #12
anaskoara
LQ Newbie
 
Registered: Jan 2011
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
Old 02-03-2011, 07:45 AM   #13
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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
 
1 members found this post helpful.
Old 02-03-2011, 10:00 AM   #14
anaskoara
LQ Newbie
 
Registered: Jan 2011
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
Old 02-03-2011, 10:03 AM   #15
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,051

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
thread synchronization jkeertir Linux - Newbie 2 09-18-2009 03:17 AM
Synchronization with pthreads example R00ts Programming 0 01-23-2008 06:29 PM
clock synchronization rasejo Linux - General 12 07-12-2007 07:53 PM
iPaq synchronization papasj Linux - Laptop and Netbook 2 07-24-2005 07:26 PM
email synchronization (not file synchronization) Moebius Linux - Software 6 10-05-2004 06:31 AM


All times are GMT -5. The time now is 06:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration