willypeake
08-07-2002, 09:04 AM
I've been moving sites with wget and it works great. But I have some sites that have lot's of php scripts. Wget can't find all the associated files. I will have to push and shove for telnet access but can if I have to. Any suggestions on how best to move an entire site of php and html files.
Thanks in advance,
Willy Peake
p1net
08-07-2002, 09:53 AM
You could also use LFTP (http://freshmeat.net/projects/lftp/?topic_id=89%2C90) . It's a great program. Just login to the your FTP server and type mirror. There is a tutorial on the RS forums about it here (http://forum.rackshack.net/showthread.php?s=&threadid=5607&highlight=lftp) . ;)
Qgyen
08-07-2002, 02:58 PM
I used to use rsync (http://www.rsync.org/) to mirror data between two servers.
To be nice and secure, you can set it up to work over SSH and automatically authorize with the server. I wish I could find the howto I had to do it, but I lost the addy.
Once its all setup, you can have a cron job run nightly to update the other machine.
Ahmad
08-07-2002, 05:45 PM
Originally posted by willypeake
I've been moving sites with wget and it works great. But I have some sites that have lot's of php scripts. Wget can't find all the associated files.
...
You mean you are using wget to mirror the website from the outside? Like fetching:
http://client.com/
and putting all files on the new machine?
If that is the case, then all PHP files you've got this way you need to do again. PHP files are parsed server side, when you access them like this, you will get the parsed output, not the script itself. This also applies to cgi, pl and other executable files. Also, some people use .htaccess configurations to make .html files act as .php files too, so it is never easy to tell if it is safe to mirror a website from the outside.
Another point about this is orphant pages. If one of your users have web pages that aren't linked to from any other webpage, mirroring from the outside will not find it. For example, he might have uploaded a picture only to show it to people in another website or forum. Or maybe an order page with discounted prices where he is only linking to using email or to some targetted audience.
The best and safest way to move websites is by tarring their home directories and untarring them on the target machine.