If your problem is about redirecting requests from www.subdomain to subdomain.somedomain, you can simple use RewriteRule in Apache or similar implementations in other webservers. You can use the proxy parameter P to serve the site from the www. domain and let the webserver fetch it from the backup site on the fly.
If you want to crawl and modify the content, the easiest solution would be using wget
with the mirror option (availible on Linux, Windows...). It may be sufficient to use the inbuilt functions to convert absolute links to relative links. Otherwise just use a search and replace tool or regular expression to modify the domain in the downloaded folder.