How do I run diagnostics on my Tandberg tape drive?

If the Tandberg TDtool diagnostic application is not yet installed, download and extract it to a temporary directory:

mkdir -p /esupport/tandberg && cd /esupport/tandberg
wget http://www.tandbergdata.com/default/assets/File/Downloads/tdtoollinux64.tar.gz
tar xzvf tdtoollinux64.tar.gz

To run the diagnostics, first log in to a graphical session (via VNC, DRAC or locally at the console).

Launch a terminal, and then launch the diagnostics:

cd /esupport/tandberg
./tdtool.sh

From within the diagnostic tool, verify the your tape drive’s information appears correctly, as shown in the example below:

To run a test backup, select Tape IO Test. For a complete test, enter an amount of data close to the size of the your database.

For additional information, please see Tandberg’s website: Tandberg Support Tools

How do I perform a manual tape backup on Linux?

If your system is configured to perform a tape backup as part of the standard snapshot script, simply run the following command:

at now /u2/UTILS/bin/snapsave_linux.sh

If your system is configured to perform a local and/or remote rsync backup as part of the standard snapshot script, but you need to run a tape backup only, run the following command:

[root@eclipse-server ~]# /u2/UTILS/bin/snapsave_linux.sh
Unmounting previous snapshots
Suspending database
Performing snapshots
Releasing database suspension
Run tape backup now?  [NO/y]y
Run local rsync now?  [NO/y] n
Send email report now?  [NO/y] y
[root@eclipse-server ~]#

This script will suspend your database, take snapshots of the database files and create a full tape backup. You will not see any output in your console session, because the script creates a separate log file under /tmp/snapsave.log.

If you have already created the snapshot filesystem, but you want to perform a separate manual tape backup:

tar -cvzpf /dev/st0 --totals -C / ./etc -C /snap ./u2

If there are no snapshots present, but no users are on the system and you want to perform a manual tape backup:

tar -cvzpf /dev/st0 --totals -C / ./etc -C / ./u2

How do I restore files from my tape backup on Linux?

If you are just interested in testing the readability or listing the contents of a tape, you may perform a table of contents listing (aka readback):

tar -tzf /dev/st0

To restore a single file (CONTROL) to a temporary directory (/esupport/restore):

mkdir -p /esupport/restore
cd /esupport/restore
tar -xzvf /dev/st0 ./u2/eclipse/CONTROL

To restore an entire directory (/u2/eclipse) to it’s original location (/u2/eclipse) for a full system recovery:

Warning: As always, please exercise caution when performing system maintenance, especially when initiating processes that can potentially overwrite data.
cd /
tar -xzvf /dev/st0 ./u2/eclipse

How do I troubleshoot tape backups on Linux?

Here are a few helpful procedures for troubleshooting tape backup problems under Linux.

  • First, test the tape drive by attempting to rewind the tape:
mt -f /dev/st0 rewind
    • If there are no problems issuing the rewind command, you’ll be returned to the command prompt.
    • If there are any issues, you will be presented with a descriptive error message.
  • Next, try to perform a manual backup of a few small files:
tar -czvpf /dev/st0 /etc
    • If there are no problems performing the test backup, you’ll see a number of files scroll by and then be returned to the command prompt.
    • If there are any issues, you will presented with a descriptive error message.
  • If there were errors with either of the above tests, please run the Dell Hardware diagnostics

Here are some common errors you may see with tape drives under Linux:

  • Tape has been marked as write-protected or read-only:
tar: /dev/st0: Cannot open: Read-only file system
tar: Error is not recoverable: exiting now

Resources:

How do I view my Eclipse tape backup logs on AIX?

The standard tape backup script keeps a number of log files that are accessible to the system administrator. To view the log files, log into your server as root and run the following commands. You may also configure the backup script to send an email every time the backup is run.

/tmp/backup.bak contains the output from the last successful tape backup command

more /tmp/backup.bak

The log for a successful tape backup will show output similar to the following:

Backing up to /dev/rmt0.
Cluster 51200 bytes (100 blocks).
Volume 1 on /dev/rmt0
The total size is 19986274993 bytes.
Backup finished on Tue Sep  7 18:11:20 CDT 2010; there are 39071600 blocks on 1 volumes.

/tmp/backup.chk contains the start and stop timestamps for the tape backup operation

more /tmp/backup.chk

The following log file indicates the backup ran for 30 minutes.

Backup started at: Mon Feb 22 21:00:05 EST 2010
Backup ended at: Mon Feb 22 21:30:11 EST 2010

/tmp/backup.err contains any potential error messages from the most recent backup

more /tmp/backup.err

The following log file indicates there was no tape in the drive.

backup: 0511-089 Cannot open /dev/rmt0: The device is not ready for operation.
Mount volume 1 on /dev/rmt0.

/tmp/snapsave.log logs database suspension and snapshot operations:

less /tmp/snapsave.log

The following log file shows a successful backup and details the database and snapshot operations taking place. This is very useful for troubleshooting backup issues.

--------------------------------------------------------------------------------
Tue Sep  7 21:00:05 CDT 2010: Current snapshot status
Snapshots for /u2
Current  Location          512-blocks        Free Time
*        /dev/fslv00           163840       50432 Mon Sep  6 21:01:32 CDT 2010
Snapshots for /u2/eclipse
Current  Location          512-blocks        Free Time
*        /dev/fslv01          2818048     1512448 Mon Sep  6 21:01:39 CDT 2010
Snapshots for /u2/eclipse/ereports
Current  Location          512-blocks        Free Time
*        /dev/fslv02            32768       32000 Mon Sep  6 21:01:44 CDT 2010
Snapshots for /u2/pdw
Current  Location          512-blocks        Free Time
*        /dev/fslv03          1835008     1833984 Mon Sep  6 21:01:48 CDT 2010
--------------------------------------------------------------------------------
Tue Sep  7 21:00:16 CDT 2010: Releasing and unmounting previous snapshots
Tue Sep  7 21:00:18 CDT 2010: Unmounting /snap/u2/pdw
Tue Sep  7 21:00:23 CDT 2010: Removing snapshot(s) of /u2/pdw
rmlv: Logical volume fslv03 is removed.
Tue Sep  7 21:00:31 CDT 2010: Unmounting /snap/u2/eclipse/ereports
Tue Sep  7 21:00:32 CDT 2010: Removing snapshot(s) of /u2/eclipse/ereports
rmlv: Logical volume fslv02 is removed.
Tue Sep  7 21:00:39 CDT 2010: Unmounting /snap/u2/eclipse
Tue Sep  7 21:00:40 CDT 2010: Removing snapshot(s) of /u2/eclipse
rmlv: Logical volume fslv01 is removed.
Tue Sep  7 21:00:47 CDT 2010: Unmounting /snap/u2
Tue Sep  7 21:00:47 CDT 2010: Removing snapshot(s) of /u2
rmlv: Logical volume fslv00 is removed.
--------------------------------------------------------------------------------
Tue Sep  7 21:00:53 CDT 2010: Suspending database
--------------------------------------------------------------------------------
Tue Sep  7 21:00:59 CDT 2010: Performing snapshots:
Tue Sep  7 21:00:59 CDT 2010: Taking snapshot of /u2
Snapshot for file system /u2 created on /dev/fslv00
Tue Sep  7 21:01:04 CDT 2010: Taking snapshot of /u2/eclipse
Snapshot for file system /u2/eclipse created on /dev/fslv01
Tue Sep  7 21:01:11 CDT 2010: Taking snapshot of /u2/eclipse/ereports
Snapshot for file system /u2/eclipse/ereports created on /dev/fslv02
Tue Sep  7 21:01:16 CDT 2010: Taking snapshot of /u2/pdw
Snapshot for file system /u2/pdw created on /dev/fslv03
--------------------------------------------------------------------------------
Tue Sep  7 21:01:21 CDT 2010: Database suspend released.
--------------------------------------------------------------------------------
Tue Sep  7 21:01:21 CDT 2010: Mounting snapshot filesystems
Tue Sep  7 21:01:23 CDT 2010: Mounting snapshot: /snap/u2
Tue Sep  7 21:01:25 CDT 2010: Mounting snapshot: /snap/u2/eclipse
Tue Sep  7 21:01:27 CDT 2010: Mounting snapshot: /snap/u2/eclipse/ereports
Tue Sep  7 21:01:30 CDT 2010: Mounting snapshot: /snap/u2/pdw
rmt0 changed
Tue Sep  7 21:02:05 CDT 2010: Starting backup from /snap
--------------------------------------------------------------------------------
Tue Sep  7 22:40:15 CDT 2010: Mailing backup report
--------------------------------------------------------------------------------