Rishi Verma
Rishi Verma

Reputation: 49

Copying only the changed files while mirroring a website

I am using wget to mirror website using this code

$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains website.org \
     --no-parent \
         www.website.org/tutorials/html/

The next time I run it it starts downloading the same files again, however I want only the changed files to be downloaded next time. I am open to use any other tool or script(preferably PHP,Curl) apart from using wget.

Upvotes: 3

Views: 122

Answers (2)

Sebastian Jordan
Sebastian Jordan

Reputation: 11

Try using the option --timestamping for an incremental download. Also see wget manual for further information.

Upvotes: 1

anubhava
anubhava

Reputation: 785286

This is tailor-made job for rsync. See man rsync

You can use:

rsync -avz <source> <destination>

Upvotes: 2

Related Questions