$Id: index.html,v 1.5 2000/05/01 23:09:10 bwilson2 Exp bwilson2 $
Backup requires making the backup, checking it, copy to and from the archive
macine, and restore. These steps are described in this procedure.
To backup our HiWAAY files, we need to combine the backup command "tar" with the
data compression utility "zgip" and send the results to a holding area "/tmp".
The following command from a 'telnet' shell command must be entered exactly has shown,
including the blanks (using cut and paste are recommended):
tar cvf - $HOME | gzip >/tmp/saveme.gz
The command works the following way:
- "tar " - this is the backup command that moves all of the files into a single output
- "c" - this flag means create a backup
- "v" - this flag means show me the files as the backup is created, verbose mode
- "f" - says the following character or text is the output filename
- " - " - this special character means send the output to the terminal, sort of.
- "$HOME " - this is a symbol that says start at my account, main directory
- "| " - the pipe symbol says take the terminal output and feed it into the next command
- "gzip " - the data compression utility to make the file smaller
- ">" - put the output, compressed data and write it to the following file
- "/tmp/saveme.gz" - use the temporary directory to hold the file named saveme.gz
We need to verify the backup file exists and check the contents. The following command
checks the existance of the backup file (again, cut and paste is recommended):
ls -al /tmp/saveme.gz
The output should show some protection flags, date and time stamp, and size in bytes
of the file. The "-al" flags provide this detail.
To check the contents, we need to uncompress the file and pipe the output into the
backup utility runing in a "list the contents" mode. The following command does this:
gunzip -c /tmp/saveme.gz | tar tf -
This command line consists of:
- "gunzip" - the uncompress command or utility
- " -c " - a flag that signals to leave the original file alone
- "/tmp/saveme.gz" - our compressed file
- " | " - takes the output of uncompress and sends it to next command
- "tar" - the backup program now running in restore mode
- " t" - this flag commands the backup to list the contents
- "f -" - this flag says use as input, the previous command output
MAKE COPIES OF THE BACKUP FILE
You can now run ftp (file transfer program) to copy the file over the network
to another machine. The best way is to run 'ftp' from the machine receiving the
file so the copy comes from the machine with the backup file. By the way, 'ftp'
programs run differently on various machines so this is just an example:
ftp> get /tmp/saveme.gz
Some PCs and all Macintoshes have graphical FTP utilities. Others have to run the 'ftp'
program from the command line. Regardless, always try to "get" the file instead of pushing
it with a "get" command. This avoids having to setup a login identifier on your PC or
Macintosh so only the source machine has to be known.
To upload the backup file, it is 'ftp' to a workarea, usually the '/tmp' directory. Once
there, it can be restored into a usable area. An example follows:
ftp> put saveme.gz
*** I will post after testing!!! Bob Wilson ***