How to Recover Data from LTO Tape Backed up using TAR?

Short for Tape Archive, TAR is a UNIX-based data backup utility that lets you manage data archives stored on magnetic LTO tape media and other conventional storage devices. It lets you create data archives, view the contents, and extract files when required.

TAR bundles files and folders into a single uncompressed package. This means that it only collates all the files and folders into a single archive without altering various file attributes like file name, permissions, file type, and more. Hence, it is ideal for taking data backups or for file distribution.

At times, you’re unable to extract files from a TAR backup stored on an LTO Ultrium tape. It may happen when the parser or the backup application fails to recognize the tape cartridge or there is an issue with the tape drive. It may also happen because of a syntax issue or insufficient read permissions while running the extract command.

Let’s read further and understand more about TAR and see how to recover data from an inaccessible TAR archive.

What is Tape Archive (TAR)?

As mentioned before, TAR or Tape Archive helps you create a data archive, known as a tarball – and manage the data within it. However, it cannot manage the physical LTO tape. Hence, it is used in conjunction with the mt command to control magnetic tape cartridges and tape drive operations.

To create a tarball, users can deploy the tar command in the Terminal. Here is its syntax:

tar - [options] [archive-file] [file or directory to be archived]

tar command

Here:

  • tar – command for archiving the selected file/folder/directory
  • [options] – options, like a, c, v, f, etc. These are various functions, eg - "c" is used to create a new archive, "x" is to extract data/files from an archive, and more.
  • [archive-file] – name of the archive file you are creating
  • [file or directory to be archived] – Source of the archive you are creating

Here is an example – tar -clpMzvf images.tar /home

The tarball file created has .tar file format, e.g., confidential_data.tar.

Use optional space-saving tools – gzip, bzip2, and XZ – to reduce the size of a tarball. This makes the backup file more efficient and simpler to store or share. Here is a brief about various compression tools that can be used with TAR:

Gzip – GZip or GNU zip is a common tool to compress archives and files. It is used because of its fast compression and decompression speeds.

Bzip2 – The bzip2 utility provides an improved compression ratio than gzip. It is a bit slower than gzip, but its compression ratio is better.

XZ – Based on the LZMA algorithm, XZ is a comparatively new compression tool that provides a higher compression ratio than both gzip and bzip2. Therefore, it is ideal for compressing large files. However, it’s a CPU-intensive tool, which makes it the slowest tool.

You may also refer to the man page of the TAR utility to learn more about it.

How are Files Stored in a TAR Archive?

To understand how TAR stores data, we need to look at its structure. Physically, it is depicted as a linear sequence of fixed-size blocks (each having a size of 512 bytes). At the end of the sequence, there are two consecutive blocks filled with zeros.

Now, if you look at it logically, it is a linear sequence of entries. Each entry has two or more blocks, where the first block is always the header, followed by subsequent blocks containing the contents of the file.

The header contains fields of information (metadata) about the file and each of them occupies a certain space in the Header block. To ensure the file’s portability, the metadata is encoded in ASCII. Below is a table showing different types of data stored in the header against the space occupied:

 
Field Size
File Name 100 bytes
File Mode 8 bytes
Owner ID 8 bytes
Group ID 8 bytes
File Type 1 byte
File Size 12 bytes
Last Modified Time 12 bytes
Checksum 8 bytes
Linked File Name 1 byte

Here is an image of the structure of a TAR archive file and how the data is stored in it.

TAR file structure

When to Use Tape Data Recovery Software?

You can extract files from a TAR backup on an LTO tape using the “-x” or “extract” option in the command.

For example – tar -xvf images.tar /home

extract files from a TAR backup using the extract command

But, in some situations, you may not be able to retrieve files from the TAR backup. These include:

  • Incorrect syntax
  • Improper argument used
  • Insufficient permissions to read file/s
  • Problematic tape drive

In such cases, you would need a powerful LTO tape data recovery software to recover the data from LTO tape backup. For this, you can rely on Stellar Data Recovery for Tape Toolkit. It is an advanced tool that recovers data from inaccessible magnetic tape cartridges on a Windows computer.

Salient Features of Stellar Data Recovery for Tape Toolkit:

  • Pay-per-use subscription plan
  • Recovers data from LTO tapes with 100% precision
  • Extracts data from a tape and stores it in an image dump (.tape)
  • Easily recovers missing files and folders from tape archives
  • Retrieves all types of data – documents, images, videos, database files (SQL/MySQL), mailbox files (MBOX, OST, PST), etc.
  • Supports all the generations of Ultrium tape from LTO-1 to LTO-9
  • Compatible with a wide range of tape parsers – TAR, HPE Data Protector, ArGest (BRU), Tivoli Storage Manager, Veritas, Symantec, and more.
  • Supports LTO tapes of prominent brands - IBM, HPE, Quantum, Oracle, Dell EMC, etc.

Now, let’s see how to perform TAR archive data recovery using Stellar Data Recovery for Tape Toolkit.

Note: Before you proceed with the steps, ensure that the LTO tape cartridge is compatible with the tape drive you are using.
  • Go to the webpage of Stellar Data Recovery for Tape Toolkit. Click on Buy Now.

Stellar Date Recovery for Tape homepage

  • Choose Toolkit and then select the Number of Tape Supported using the given drop-down list. Again, click on Buy Now.

purchase the number of licenses for the tape data recovery software

Note: The tool offers a pay-per-use plan. 1 Use = 1 Tape. Hence, select the number of LTO tapes you want to recover the data from

  • After purchasing the tool, install it on a system running on Windows/Windows Server OS.
  • Connect the tape drive to the system.
  • Insert the tape cartridge into the drive.
  • After inserting the cartridge into the tape drive, launch the software.
  • The Select Option screen will appear. Click on Create Image and then click on Next.

click on create image to create a dump image of the tape cartridge

  • The Select Destination Path screen will appear. Click on Browse to choose the path where you wish to save the tape drive image.
  • Then, select Auto from the dropdown in the Block Size field. This will select the pre-defined block size and ensure faster processing and image creation.
  • Click on Create. The software will begin creating the tape drive image. Wait for it to complete.

select the settings

  • After the image is successfully created, it will show the Image Created screen. Click on Scan to begin scanning the image for recoverable data.

scan the tape dump image

  • Now, load the tape image you have just created. Click Next.

load the image

  • Browse for the tape dump image you’ve just created and click on Next.

select the dump image

  • After selecting the image, click on Scan.
  • After finishing the scan, the software will display all the recoverable files. Select a file to preview it.

tape data scanned

  • Select the files you want to save and click on Save in the ribbon.
  • The Save dialog box will appear. Choose either the Default Path (selected by the software) or the User Defined Path to save the data.

select the folder to save the recovered tape data

  • After selecting the destination path, click on Save. The software will start saving the data at the selected location.
  • After the software saves the recovered data, it will show the Process Complete dialog box. Click on OK to complete the process.

data saved successfully

The recovered files will be saved at the selected destination.

Conclusion

Users often face issues while trying to read LTO tape backup on Linux or retrieve files from a TAR archive using the “extract” argument in the TAR command. This can happen due to the lack of read permissions on one of the files or an improper argument used in the command.

Stellar Data Recovery for Tape Toolkit is an apt solution for this case. It is a powerful LTO tape data recovery software that can aid you in recovering data from inaccessible LTO tape drives. It can also recover legacy tape backup with 100% accuracy. It is compatible with tape backups created using various parsers, like TAR, Tivoli, Sun Solaris, Symantec, Arcserve Backup, HPE Data Protector, and more. This software supports tape drives of all generations and popular brands, such as IBM, Quantum, HP, and Oracle.

Read More

How to Recover Data from an LTO Tape that is Backed up in Veritas Backup Exec?

How to Recover Data from LTO Tape backed up using Tivoli Storage Manager?

How to Recover LTO Tape Data from Arcserve (Full, Incremental, and Differential)?



Was this article helpful?
FAQs

Here are some benefits of using TAR utility to archive data in an LTO tape:

  • TAR file is compatible with most operating systems
  • Facilitates seamless data sharing among users
  • Simple linear structure enables users to easily create and manage it
  • Optional compression tools help reduce the file size and make the archive efficient

If you want to extract files from a TAR backup, you can use the “--extract” (“--get” or “-x”) operation in the command. While on a Linux system, run the tar command in terminal. Eg - tar --extract –file=archive_name.tar file_name. You can refer to this

Yes. The tool can recover all types of data from magnetic tapes, including legal documents, financial records, databases such as SQL, MySQL, Exchange, Oracle, etc., email archives, user-created files, and more.

LTO tape cartridges are susceptible to damage if not stored or handled carefully. To prevent data loss, store the tapes in a controlled environment – a place without any moisture, humidity, heat, dust, or magnetic fields. Also, keep the tapes in a hardshell case while shipping them from one location to another. This is to avoid hardware damage from sudden impacts or jerks. This will help keep the tapes safe.

About The Author
author image
Keshav Katyal

An experienced Senior Content Developer with a deep interest in technology.

Table of Contents

WHY STELLAR® IS GLOBAL LEADER

Why Choose Stellar?
  • 0M+

    Customers

  • 0+

    Years of Excellence

  • 0+

    R&D Engineers

  • 0+

    Countries

  • 0+

    PARTNERS

  • 0+

    Awards Received

BitRaser With 30 Years of Excellence
Technology You Can Trust
Data Care Experts since 1993
google-trust
×