Tar and Taper for Linux

In plain English, Yusuf Nagree explains archival backup with tar and his user-friendly taper program.
Making a Backup

Start taper, by typing:

$ taper

You will then be presented with the main taper window. There are three main modules—backup, restore and mkinfo, as well as preference management options. Select the backup option.

If an archive exists, you will be asked whether you wish to append files to it, or whether you wish to overwrite it. As with all dialog boxes, the space-bar toggles between the options, and ENTER will select the currently highlighted option.

If the archive doesn't exist, you will be prompted for the archive title.

Next you will be prompted for the volume title.

You will then be presented with a screen with three panels. The top left shows the current directory on the hard disk, the top right shows what's currently on the archive and the bottom panel is used to show which files have been selected for backup. At the top of the screen is the archive ID and archive title.

To move between panels, press the TAB key. To get help on keys, press H.

You now need to select which files and directories you wish to backup. Use the cursor keys to move around the directory. Pressing ENTER when the highlight is on a directory will move into that directory.

When you find a file or directory you wish to back up, press S. The file/directory will then be sized and moved to the bottom window—if you selected a directory, taper will check with you that you really want to back it up. Press ENTER to confirm. To disable the confirmation, change this in global preferences (Prompt Directories).

In the bottom window, the file/directory will be printed as well as its size. Also, to the left of this, there will be an I or F. This indicates that the file/directory will be backed up in incremental mode (IM.) or full backup mode (F). To toggle between F and I modes, press S when the highlight is on the selected file or directory.

When you select directories, all directories under that directory are recursively included.

If you wish to deselect a file, move the cursor to the bottom window (using TAB) and then move the highlight to the file/directory you wish to deselect. Press D and the file/directory will be deselected.

If you select a file (e.g., /usr/home/john/xyz) and then select the directory in which the file resides (e.g., /usr/home/john), taper automatically recognizes that the file has been selected twice and will put brackets around the file (/usr/home/john/xyz) to tell you so. When doing the backup, the file will be backed up only once.

When you have finished selecting, press F and taper will commence the backup. Pressing Q at any time will abort the backup.

Restoring Files

Select restore from the taper main menu.

You will then be presented with a list of all the archives taper knows about. They are sorted in archive ID order and the archive title is also printed. The highlight will be on the archive that is currently in the tape drive. Move the highlight onto the archive that you wish to restore from and press ENTER.

You will then be presented with three panels. The top left shows the files and directories currently on the archive, the top right shows a summary of the whole archive and the bottom panel is used to show the directories and files selected for restoring.

Use the cursor keys to move the highlight to select which files you wish to restore—pressing S selects the file/directory the highlight is currently on. Directories are recursively selected.

When you have selected a file/directory, it is transferred to the bottom window. In a similar way to backup, restore will put brackets around files selected twice.

In the select window, after the filename, the volume number is printed. This will show either a volume number or M. If M appears, taper is operating in most recent restore mode and will restore only the most recent copy of that file. If a volume number is displayed, the file will be restored from that volume, regardless of how recent the file in that volume is. You can toggle between the two modes by pressing S in the select window.

To deselect a file, position the highlight on the file you wish to deselect and press D.

When you have finished selecting files for restore, press F and taper will commence the restore. Pressing Q will abort the restore operation.


If you lose the archive information file (it gets deleted, corrupted or you try to restore on another machine and forget to take the archive information file with you), you can reconstruct the info file. Simply put the tape in the drive and select mkinfo from the taper main menu.


White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState