Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i have Windows 2008 Server on which i store DB backups on daily basis. I want to be able to download new files only using wget, curl or windows built-in FTP doesn't matter.

Can you help me with command? I need only new files, ones that exists on local machine (Windows Vista) and server should be skipped.

Thanks

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

See the --noclobber option for wget. Also, if you have ncftpget available, I believe it skips existing files by default.

share|improve this answer
add comment

With wget: New = doesn't exist OR more recently modified

Each time run: (probably won't work on existing files - you need the initial download to contain the remote timestamp) wget --timestamping -r ftp://yoursite.com/path/

http://superuser.com/questions/283481/how-do-i-properly-set-wget-to-download-only-new-files

With cURL you can use the -z option to specify that only files after a certain date should be downloaded

curl -z "Jun 30 2011" http://yoursite.com/file.html

http://curl.haxx.se/docs/manual.html

share|improve this answer
add comment

What you are actually looking for is --timestamping. --no-clobber just wont download existing files taking no concideration if the files on the server are newer or not.

--timestamping looks at the file to see if the version remote is newer than local before downloading.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.