How to sync a local directory with a remote ftp directory?

Our site is based on images from one of our manufacturers. Image catalogs are massive, and getting them over FTP is a day's work. Now that we have downloaded the entire directory, we would like to periodically download files and directories that are new or have changed since the last download. We are thinking of writing a script that checks the modified date of files and only downloads the latest versions.

Since this may not be the first time this issue has been encountered or resolved, I thought I would post this and see if anyone knows of existing solutions that can be applied here. The existing solution must be FreeBSD and / or LAMP compatible.

+2


source to share


3 answers


with wput



+2


source


Is there any reason you can't use rsync?



+4


source


As pointed out in another comment by user77413 this should work ...

wget --mirror username:password@siteurl.com/path

      

The default number of retries is 20, you can increase this with --tries 100

0


source







All Articles