HOW TO: Transfer Web Site Data by Using FTP in a UNIX-to-Windows Migration
FTP is the least complicated method that you can use to transfer files between two platforms.
back to the top
Transfer One Large FileYou can store and serve Web sites in Apache from any location. Typically, a whole Web site is stored under a single directory. You can determine which directories are in use by using the grep utility to extract the DocumentRoot lines from a configuration file.
grep DocumentRoot /usr/local/apache/conf/httpd.conf
After you determine the location, use tar to back up the documents to a file:
- Log on to the UNIX server as root.
- Change to the parent of the directory that is returned by the grep utility.
For example, if the location is /usr/local/apache/htdocs, you type:
- Use tar to back up the whole directory. To back up to a file, use the following syntax:
tar cf website.tar ./htdocs
ScriptAlias /cgi-bin /usr/local/apache/cgi-bin
These may be outside of the document root for the Web site (as shown in the example).
Now move to the Windows-based computer:
- Click Start, point to Programs, point to Accessories, and then click Command Prompt.
- Change to the directory in which you want to store the files.
- Type ftp followed by the name of the UNIX host that is holding the tar file that you just created, and then press ENTER.
- Log on with an account that has FTP privileges and that can access the tar file that you just created.
- Type bin to switch to binary mode.
- Type prompt to switch off prompting.
- Change to the directory that is holding the tar file.
- Type get website.tar to retrieve the file.
- Type quit to exit the FTP client.
- Type exit to close the command prompt.
- Use WinZip or a similar tool to extract the contents of the tar file in your directory.NOTE: You may have to open and save or convert script files and data files to make sure that the line termination does not cause a problem. You can use the same process to transfer additional files and database files between two platforms during the migration.
Transfer Individual FilesTransferring individual files through the built-in FTP client in Windows is time-consuming for large sites because you must move in and out of each directory transferring the files. Instead, you can use an FTP client, such as FTP Voyage, to traverse the FTP directory for you and to mirror the contents of the UNIX-based Web site in a Windows directory.
One benefit of using FTP Voyager or a similar tool is that it uses ASCII mode for transferring ASCII files, which automatically translates the line termination sequence between the two platforms, and binary mode for graphics and other files, which eliminates any post processing on the files, but which does not fix the path name or other problems.
back to the top
For additional information about how to test your migration from UNIX to Windows, click the article number below to view the article in the Microsoft Knowledge Base:
For additional information about how to prepare to migrate data from UNIX to Windows, click the article number below to view the article in the Microsoft Knowledge Base:
back to the top
Article ID: 324062 - Last Review: 10/30/2006 23:29:18 - Revision: 3.2
- kbhowto kbhowtomaster KB324062