[an error occurred while processing this directive]
How can I easily backup my entire WebCom directory?

The WebCom FTP Server is capable of generating a single compressed file that contains the contents of an entire directory structure. This occurs as the directory is being transferred from WebCom to another computer. The process uses three standard Unix utilities to do this: "tar", "compress", and/or "gzip". In a nutshell, you can backup your entire structure by logging in to the FTP server as you (not as anonymous), changing directories to the pub directory above your home directory (cd .., or for a graphical FTP program, clicking on '..' will usually do it), and requesting any of the following "virtual files":

Here's how to restore your account from a compressed archive.


Commands and Examples

The WebCom FTP Server can create a "tar" archive containing the contents of an entire directory (and any directories underneath it), when the directory is transferred to your local computer. As an example, the following paragraphs demonstrate how to back up all the files contained in the WebCom demonstration user account into a single file which can be stored on another computer. You can use the same method to back up all the files contained in your account onto another computer.

To back up all the files stored in a WebCom account, you must be in the directory "/pub". This directory is located immediately above the one you are automatically placed into when you log onto WebCom. To reach it, either type "cd .." at the prompt if you are using a non-graphical FTP client, or highlight and select the ".." directory when using a graphical FTP client.


Command Line Clients

At the prompt enter "get" and the name of the directory you wish to transfer with ".tar" appended to it. In this case, we will select the "guest" directory.

Example: "get guest.tar"
This will create a "tar" archive containing all the files stored in the "guest" account on the computer the file was being transferred to.

If you wish to compress the file created by "tar" at the same time you are transferring it, you may tell the FTP Server this by appending a ".Z" (to use "compress") or a ".gz" (to use "gzip) after the name of the directory and the ".tar" suffix. You may also append ".tgZ" (to use "compress") and ".tgz" (to use "gzip") to the directory name if your computer does not support files with more than one period in them. Here are examples of all four options:

Example: get guest.tar.gz
This will create a single "tar" file compressed by "gzip" on the computer the directory is being transferred to.
Example: get guest.tar.Z
This will create a "tar" file compressed by "compress".
Example: get guest.tgz
This will create a "tar" file compressed by "gzip".
Example: get guest.tgZ
This will create a "tar" file compressed by "compress".

If you are using a command-line FTP client on a system which does not support long file names, or files with multiple periods (DOS or Windows for example), you will have to use ".tgZ" (to create a "tar" archive compressed by "compress") or ".tgz" (to create a "tar" archive compressed by "gzip").


Graphical Clients

Using a graphical FTP client, you may specify the directory to be transferred by entering its name into the selection box listing your files on WebCom. The type of file that the FTP Server will create depends on the suffix you append to the name of the WebCom directory being transferred.

Enter the name of the directory you want to transfer (in this case, "guest") into the selection box listing files on WebCom. Then enter a filename into the selection box listing files on your computer. This can be any filename you want, but it is best to have it end with a suffix matching the type of file you are creating. If your computer cannot support long filenames or multiple periods ".", in a file, use ".tgz" for a "tar" archive compressed with "gzip", and ".tgZ" for a "tar" archive compressed with "compress".

To archive and compress the "guest" directory at the time of transfer, append a suffix to the directory name in the selection box listing files on WebCom. Some examples:

Note that you do not have to create a "tar" archive to be able to compress a file as it is downloaded. For more details, see FTP Help.

For more information about FTP, see the FTP Overview and Making Files Available through FTP.


Explanation

To fully grasp the concepts behind this method of creating a compressed archive of your WebCom account, an introduction to the relevant UNIX utilities is helpful.

Tar, the Unix Tape Archive utility, is the standard Unix file archive utility. It creates a single file (an "archive") into which any number of files can be placed. This utility was originally written for UNIX to allow users to store and restore files from magnetic tape (hence the "Tape Archive" name), but these days (espically on the Internet), tar is more frequently used to bundle a group of disk files and/or directories into a single disk file.

A "tar" file can be stored on any computer, and the files stored within it may be "dearchived" by any computer for which the "tar" utility is available. No tape drive is necessary.

The "tar" utility creates an "archive" into which copies of all of the files in the directory (and any directories underneath this directory) being backed up are placed. This archive usually has a filename ending in ".tar". The ".tar" suffix (such as "files.tar") allows to users to readily identify the file as an "archive" created by the "tar" program. It signifies that the "tar" program must be used to "dearchive" the files contained within "files.tar".

Compress is the standard Unix file compression utility. It analyzes a file for sections which are frequently repeated and substitutes a marker representing these sections where ever they occur. This enables "compress" to create a smaller version of this file which can later be "uncompressed" to its original size without damaging the contents.

Files created by "compress" usually have a ".Z" suffix, which enables users to immediately recognize the file as a compressed file, for which the "compress" program is necessary to restore the file to its original size.

GNU zip is a file compression program created by the Free Software Foundation, a organization whose purpose is to create and distribute software that anyone can use free of charge. "gzip" (GNU software often has a "g" attached to the beginning of the filename, to distinguish it from commercial versions of the same program) uses a more efficient means of analyzing the contents of a file, and thus will create a smaller version of the same file than "compress" would. The files "gzip" produces are generally about 33% smaller than those produced by "compress".

Files created by "gzip" usually have a ".gz" suffix, which enables the file to be immediately recognized as a file created by "gzip", and for which the "gzip" program must be run in order to restore the file to its original state.

A "tar" file can also be compressed, once it has been created. A file of this type will usually end in ".tar.Z" or "tar.gz", which identifies it as an "archive" of files which has also been compressed by either "compress" (the file ends in ".tar.Z") or "gzip" (the file ends in ".tar.gz"). It may also end in ".tgZ" (a "tar" file compressed by "compress") and ".tgz" (a "tar" file compressed by "gzip"). These latter two enable people with computers who cannot create files with more than a single period in them (such as ones using DOS, or Windows) to more easily transfer files.

[an error occurred while processing this directive]