Ubuntu: How to write files to a tape

 

To put files onto a tape, run the following:

 

tar -cvf /dev/[path to tape] [file or directory] [file or directory] [file or directory]

 

An example would be:

 

tar -cvf /dev/st0 /home/bob

 

This will back up the user bob’s home directory to the tape, here located at /dev/st0 (a typical location – note the zero, not the letter o).

 

If you want to use compression in your backup, use the z flag in addition to the other tar flags, such as:

 

tar -cvfz /dev/st0 /home/bob

 

All done!