[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [gftp] Resume/overwrite issue

Diccon Towns wrote:
Is there any way to get gFTP to default to 'overwrite' rather than 'resume' when synchronising directories? I don't want to overwrite all the files (which checking the 'Overwrite by Default' option does) just files that are a different size/date.

At the moment I have to go through each file, changing it from resume to overwrite which is time-consuming as I'm making frequent updates to a large site.



I'm not familiar with gFTP's directory-sync feature, but this is a job that rsync handles well. Assuming that the server has rsync and SSH installed, you'd just run this command on the client:

rsync -av --delete /source/dir/on/client/ user@xxxxxxxxxx:/dest/dir/on/server/

That will cause the destination directory to be a mirror of the source directory, and rsync will only copy the files that need to be copied (i.e. new/changed files).

(And --delete just means to delete any files on the server that no longer exist on the client, that is, it's part of the mirroring operation.)

Anthony DiSante