SUMMARY
This step-by-step article describes how to use FTP to transfer files either as one large archive of the Web site or to transfer each file individually.
FTP is the least complicated method that you can use to transfer files between two platforms.
back to the top
Transfer One Large File
You 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.
For example:
grep DocumentRoot /usr/local/apache/conf/httpd.conf
DocumentRoot /usr/local/apache/htdocs
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:
cd /usr/local/apache - Use tar to back up the whole directory. To back up to a file, use the following syntax:
tar cf website.tar ./htdocs
Additionally, make sure to back up any directories that are used to hold sections of a Web site or that hold CGI script elements. Check the Apache configuration file for more details. For example, the
ScriptAlias directive in an Apache configuration maps a logical directory in a Web site to a physical directory on the server:
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.
back to the top
Transfer Individual Files
Transferring 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
REFERENCES
For additional information about platform differences, file differences and compatibility, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
324054 HOW TO: Identify Potential File and Directory Problems in a UNIX-to-Windows Migration
324053 HOW TO: Fix File-Path Conflicts in a UNIX-to-Windows Migration
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:
324058 HOW TO: Test a UNIX-to-Windows Migration with FrontPage Extensions
323952 HOW TO: Understanding Compatibility for a UNIX-to-Windows Migration
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:
324538 HOW To: Migrate Web Site Data in a UNIX-to-Windows Migration
back to the top