Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-05-2009, 06:57 PM   #1
LQ Newbie
Registered: Jun 2005
Posts: 7

Rep: Reputation: 0
Question Differential File Copy to FTP

I'm fairly new to Linux (I have a three week old installation of Fedora 10 on my HP Compaq 6710b and it is amazing), so bear with me here...

On my Windows XP boxes I would use nightly RoboCopy script to copy files in a directory to a server. RoboCopy transfers only those files from the source directory that are new or with newer "Last Modified" dates than the files in the destination directory on the server (a differential file-level copy). A nightly script on the server would then transfer the RoboCopy'd data to an ftp server at a remote site (a full copy).

This worked great when my environment was small and didn't include Linux my solution isn't cutting it. There is too much data for the server to send to the FTP site in less than 24 hours and I don't know how to perform a RoboCopy-style operation from my Linux box to a CIFS share.

MY QUESTION: is there any sort of native Linux command or package that operates like RoboCopy? Is there any sort of software utility that can perform a differential file-level copy directly to an FTP site?

I'd prefer something that performs raw differential file-level copy, basically directory mirroring using FTP as the destination.

P.S. I've seen software that creates differentials across backup sets (eg. a file selection being compressed into full.bak followed by incrementals.bak) and uploads them to an FTP but that won't work for me.
Old 02-05-2009, 07:11 PM   #2
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,333

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
The rsynch command will do what you want. See the rsynch man pages:

One of the examples in the man page is:

I mirror a directory between my lqoldrq and lqnewrq ftp sites with the command:

CWrsync -az -e ssh --delete ~ftp/pub/samba nimbus:"~ftp/pub/tridge"

This is launched from cron every few hours.
Steve Stites
Old 02-05-2009, 07:26 PM   #3
LQ Newbie
Registered: Jun 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Doesn't 'rsync' require that the destination host run 'ssh'? I want to make a differential copy of a local directory to a remote server via FTP.
Old 02-05-2009, 07:36 PM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could use tar with the -g <snapshot-file> option to create an incremental archive and then on the next line ftp the backup to the server.

See the info manual for tar. Section 5.2 covers Incremental Dumps. If the target server doesn't use a linux/unix filesystem, you would want to use a linux archive anyway to preserve ownership and permissions of the files.


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
how to copy a file to a directory ,where file and dir are sent as args to a function? wrapster Programming 1 06-08-2008 08:00 AM
copy vid tape to file and burn file to DVD jim mann Linux - Software 4 01-24-2006 10:57 PM
FTP Copy depam Linux - Software 2 10-07-2005 12:27 AM
Using wget to copy entire ftp directory stuartmunro Linux - Newbie 7 06-17-2005 08:06 PM
Is arrangement of file systems will differ if we copy a file from FAT 32 to ext 3 ? anindyanuri Linux - Software 2 02-20-2005 12:39 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:29 PM.

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