Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently mirroring a website on my server. The site itself is rarely updated, but it is updated enough that info can become outdated quickly.

I mirrored it first with wget, and this worked fine, but I made some changes:

  • The original index.html used frames, but the site also provides a main.html which is essentially index.html but without frames. I deleted index.html and renamed main.html.
  • I did not want to mirror the webchat, blog or forum, so I deleted those files and directories and made directories "blogs" "forum" and "chat" and placed a php redirect in each of those, redirecting visitors to the orignal site.

I'd like to auto-update the mirror (maybe once every 24-72 hours), but preserve the changes I made. Is this possible? How would I go about doing it? I am completely clueless as to how.

Thanks for any and all help! :)

share|improve this question

I assume you're using wget --miror. Possible solutions:

  1. If the sections to be preserved are in directories this may work:

    wget --exclude-directories=LIST

  2. If you can tolerate it you allow the race condition you can let wget overwrite things and then overwrite them back with a script that restores them.

  3. Prevent overwriting of the files you don't want to change.

    chmod 444 index.html

share|improve this answer

Your Answer


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.