FS
Documentation

Backup3G/User Guide/Recovering Data

This page was last modified 11:00, 6 March 2008.

From Documentation

< Backup3G | User Guide(Difference between revisions)
Jump to: navigation, search
Revision as of 02:59, 19 April 2006
Moff (Talk | contribs)
(How to Recover backup3G)
← Previous diff
Current revision
Moff (Talk | contribs)
(Backup3G 5.1/User Guide/Recovering Data moved to Backup3G/User Guide/Recovering Data)
Line 11: Line 11:
== Recovery Options == == Recovery Options ==
-Files can be restored to the original host machine or to any other host on the network+Files can be restored to the original host machine or to any other host on the network (though some users may have restrictions on which directories they can recover to—see Restricting Recovery Destinations by Role on page 51).
-(though some users may have restrictions on which directories they can+
-recover to—see Restricting Recovery Destinations by Role on page 51).+
-You can specify a different target directory from the original. If the directory doesn’t+You can specify a different target directory from the original. If the directory doesn’t already exist backup3G will create it. If you are recovering selected files under a directory, backup3G will also restore any subdirectories it needs to recreate each file’s directory path.
-already exist backup3G will create it. If you are recovering selected files under a+
-directory, backup3G will also restore any subdirectories it needs to recreate each+
-file’s directory path.+
In summary, the options available for restoration are: In summary, the options available for restoration are:
-Recover whole media set+*Recover whole media set
-Recover from selected steps+*Recover from selected steps
-Recover from indexes+*Recover from indexes
-Recover selected files identified by search+*Recover selected files identified by search
-Recover base directories.+*Recover base directories.
-Furthermore, if you are recovering from several discrete steps, you can recover to 
-the same host and all steps will relate to the specified directory. For example, If you 
-are recovering /etc/passwd and /usr/bin/go to the directory /tmp on host 
-mama, the recovered files will be in /tmp/etc/passwd and 
-/tmp/usr/bin/go. 
-'''Note -''' The restored file will be created with its original ownership and+Furthermore, if you are recovering from several discrete steps, you can recover to the same host and all steps will relate to the specified directory. For example, If you are recovering <tt>/etc/passwd</tt> and <tt>/usr/bin/go</tt> to the directory <tt>/tmp</tt> on host mama, the recovered files will be in <tt>/tmp/etc/passwd</tt> and <tt>/tmp/usr/bin/go</tt>.
-permissions. Any intermediate directories will be owned by root.+ 
 + 
 +----
 +;Note: The restored file will be created with its original ownership and permissions. Any intermediate directories will be owned by root.
 +----
<br> <br>
=== Recovering From Indexes === === Recovering From Indexes ===
-Backup3G keeps online indexes of backed up files. You can search the indexes for a+Backup3G keeps online indexes of backed up files. You can search the indexes for a file or directory. If necessary an index can be deleted to save disk space.
-file or directory. If necessary an index can be deleted to save disk space.+
<br> <br>
=== Single-Volume Backups === === Single-Volume Backups ===
-For a simple single-volume backup, each tape file corresponds to a backup step that+For a simple single-volume backup, each tape file corresponds to a backup step that backs up a base directory and all its subdirectories. Multi-part backups are written out in several parts, each part corresponding to a physical tape file.
-backs up a base directory and all its subdirectories. Multi-part backups are written+
-out in several parts, each part corresponding to a physical tape file.+
<br> <br>
=== Multi-part Backups === === Multi-part Backups ===
-When you recover from a multi-part backup backup3G asks you to choose the base+When you recover from a multi-part backup backup3G asks you to choose the base directory, then specify whether you want to do a full recovery or recover only selected files. For a selected recovery you can list the files and directories to be recovered or pick files from the online index (if one was created). For indexed backups backup3G reads only the parts containing files to be recovered.
-directory, then specify whether you want to do a full recovery or recover only+
-selected files. For a selected recovery you can list the files and directories to be+
-recovered or pick files from the online index (if one was created). For indexed backups+
-backup3G reads only the parts containing files to be recovered.+
<br> <br>
 +
== How To Recover Files From Backup == == How To Recover Files From Backup ==
Line 66: Line 54:
<br> <br>
=== To Recover Files From a Known Backup === === To Recover Files From a Known Backup ===
-This topic describes how to do a recovery when you know which media set contains+ 
-the files.+This topic describes how to do a recovery when you know which media set contains the files.
-If you don’t know which backup contains the correct versions of the files, you will+ 
-first need to search the media contents database or online indexes. See To Recover+If you don’t know which backup contains the correct versions of the files, you will first need to search the media contents database or online indexes. See To Recover Using Search on page 110.
-Using Search on page 110.+
Line 76: Line 63:
#Start the Recovery module to display the list of available backups. #Start the Recovery module to display the list of available backups.
-#Highlight the backup you want to recover from, and select Contents >+#Highlight the backup you want to recover from, and select Contents > Open to list the base directories in this media set.
-Open to list the base directories in this media set.+ 
-Figure 26 — Backups available for recovery+ Figure 26 — Backups available for recovery
'''Selecting what files to recover''' '''Selecting what files to recover'''
-#The next step is to choose the backup steps you want to recover files from.+ 
-#*To recover the whole backup, select all the base directories.+:The next step is to choose the backup steps you want to recover files from.
-#*To recover all the files from selected steps in the backup, select those directories.+:*To recover the whole backup, select all the base directories.
-#*To recover all or selected files from a single backup step, select that directory.+:*To recover all the files from selected steps in the backup, select those directories.
-#*To choose files from an online index, select one base directory only, then+:*To recover all or selected files from a single backup step, select that directory.
-select Index > Open, then select the files you want to recover.+:*To choose files from an online index, select one base directory only, then select Index > Open, then select the files you want to recover.
'''Specifying the recovery parameters and destination''' '''Specifying the recovery parameters and destination'''
-#Select Recover > Interactive if you want to monitor the output+#Select Recover > Interactive if you want to monitor the output from the recovery job. Select Recover > Background if you don’t want to monitor the progress of the recovery job. Figure 27 — List of base directories in the selected backup
-from the recovery job. Select Recover > Background if you don’t want+#If more than one logical drive can read this media set, backup3G lists them now. Choose one. If only one drive is valid for this media type, this step is skipped.
-to monitor the progress of the recovery job.+#Some user roles are restricted in where they can recover files. Backup3G lists the hosts and directories you are allowed to recover to. If you have no restrictions, this step is skipped. Figure 28 — Recover to which host and directory?
-Figure 27 — List of base directories in the selected backup+#A form similar to the one in Figure 29 now prompts you to supply any remaining details. The fields to be filled in depend on the type of recovery and your own access capabilities. Figure 29 — Recovery prompt form (example)
-#If more than one logical drive can read this media set, backup3G lists them+#;Recover to host: Select the name of the host to which the files should be recovered. The default is the original host.
-now. Choose one. If only one drive is valid for this media type, this step is+#;:If you chose a host in step 6 on page 107, this field will be filled in for you.
-skipped.+#;Into directory: Specify where the recovered files should go. The target directory will be created if it doesn’t already exist.
-#Some user roles are restricted in where they can recover files. backup3G lists+#;:For an image backup, enter the full filename.
-the hosts and directories you are allowed to recover to. If you have no+#;:If you want to compare the current files on disk with the backedup versions, recover to a temporary directory so that the current versions will not be overwritten.
-restrictions, this step is skipped.+#;:If you chose a target directory in step 6 on page 107, this field will be filled in for you.
-Figure 28 — Recover to which host and directory?+#;Auto unload: Select ‘yes’ to unload the backup volume from the drive after the recovery has finished.
-#A form similar to the one in Figure 29 now prompts you to supply any+#;:This field only appears for a background recovery.
-remaining details. The fields to be filled in depend on the type of recovery+#;Recovery method: Select the recovery method. The default should be correct, as the recovery method is determined by the original backup method and format.
-and your own access capabilities.+#Press Accept.
-Figure 29 — Recovery prompt form (example)+ 
-Recover to host+ 
-Select the name of the host to which the files should be recovered.+Backup3G queues the job and requests the first volume containing files to be recovered.
-The default is the original host.+ 
-If you chose a host in step 6 on page 107, this field will be filled in+ 
-for you.+----
-Into directory Specify where the recovered files should go. The target directory+;Caution: Recovery overwrites any existing files with backup files of the same name. Before you recover files, make sure that you won’t lose important data.
-will be created if it doesn’t already exist.+----
-For an image backup, enter the full filename.+
-If you want to compare the current files on disk with the backedup+
-versions, recover to a temporary directory so that the current+
-versions will not be overwritten.+
-If you chose a target directory in step 6 on page 107, this field will+
-be filled in for you.+
-'''Caution -''' Recovery overwrites any existing files with backup files of the same name. Before 
-you recover files, make sure that you won’t lose important data. 
-Auto unload Select ‘yes’ to unload the backup volume from the drive after the 
-recovery has finished. 
-This field only appears for a background recovery. 
-Recovery method 
-Select the recovery method. The default should be correct, as the 
-recovery method is determined by the original backup method and 
-format. 
-#Press Accept. backup3G queues the job and requests the first volume containing 
-files to be recovered. 
'''Selecting files from a single backup step''' '''Selecting files from a single backup step'''
-If you selected a single base directory in step 3 on page 107, you can choose which+#If you selected a single base directory in step 3 on page 107, you can choose which files and directories you want to recover.
-files and directories you want to recover.+#;Type: To recover all files in the backup step, select ‘full’; to choose which files and directories to recover, use recovery type ‘selected’.
-Type To recover all files in the backup step, select ‘full’; to choose which+#;Pick from index?: If you wish to select files from the online index, set this field to ‘yes’ and press Accept. Select the files and directories and press Accept again to queue the recovery job.
-files and directories to recover, use recovery type ‘selected’.+#:If you don’t wish to select files from the index (or if there is no index) you will need to list the files and directories to be recovered.
-Pick from index?+#;Files to recover: Enter a space-separated list of files (not directories). The file names should be relative to the base directory.
 +#;Sub-directories: Enter a space-separated list of directories (not files). The directory names should be relative to the base directory.
 +#:Example: the base directory is <tt>/usr</tt>. To recover <tt>/usr/file.one</tt>, <tt>/usr/tmp/file.two</tt>, and all the files in <tt>/usr/lib/term</tt>, enter:
 +#Press Accept
-If you wish to select files from the online index, set this field to 
-‘yes’ and press Accept. Select the files and directories and press 
-Accept again to queue the recovery job. 
-If you don’t wish to select files from the index (or if there is no index) you will need+Backup3G queues the job and requests the first volume containing files to be recovered.
-to list the files and directories to be recovered.+
-Files to recover+
-Enter a space-separated list of files (not directories). The file+
-names should be relative to the base directory.+
-Sub-directories+
-Enter a space-separated list of directories (not files). The directory+
-names should be relative to the base directory.+
-Example: the base directory is /usr. To recover /usr/file.one, 
-/usr/tmp/file.two, and all the files in /usr/lib/term, enter: 
-#Press Accept when you are finished. backup3G queues the job and 
-requests the first volume containing files to be recovered. 
You can use the Monitor option to see what stage the recovery job is at. You can use the Monitor option to see what stage the recovery job is at.
<br> <br>
 +
=== To Recover Using Search === === To Recover Using Search ===
-The Search option on the main Recover window illustrated in Figure 26 allows+The Search option on the main Recover window illustrated in Figure 26 allows you to search for data to recover using the base directory for the backup or using the filename from online indexes.
-you to search for data to recover using the base directory for the backup or using the+ 
-filename from online indexes.+If you don’t know which backup contains the files you want to recover, this will give you list of all backup copies of the files you specify.
-If you don’t know which backup contains the files you want to recover, this will give+
-you list of all backup copies of the files you specify.+
-Recovering Data 111+
'''To search for base directories''' '''To search for base directories'''
 +
#Start the Recovery module to display the list of available backups. #Start the Recovery module to display the list of available backups.
#Select Search > Base directories. #Select Search > Base directories.
 +
The search options are described in detail in Searching Backup Media on page 46 and The search options are described in detail in Searching Backup Media on page 46 and
in How To Read Backup Media Contents on page 127. in How To Read Backup Media Contents on page 127.
- 
<br> <br>
 +
== How to Recover backup3G == == How to Recover backup3G ==
-Manual restoration is quite simple once you have the tape containing the files you+Manual restoration is quite simple once you have the tape containing the files you need to recover from and a media catalog that lists its contents. The media catalog is printed at the end of each backup job.
-need to recover from and a media catalog that lists its contents. The media catalog is+
-printed at the end of each backup job.+
-Backups in cpio, dump, or tar format can be recovered from the command line.+Backups in cpio, dump, or tar format can be recovered from the command line. Once you know what backup method was used, Table 6 tells you the command to use for the recovery.
-Once you know what backup method was used, Table 6 tells you the command to+
-use for the recovery.+
Line 197: Line 152:
*a suitable host, operating system, and target filesystem. *a suitable host, operating system, and target filesystem.
*the tape(s) containing backup3G. *the tape(s) containing backup3G.
-*a tape drive of the right format. You will need to know the no-rewind device+*a tape drive of the right format. You will need to know the no-rewind device name (example: <tt>/dev/nrmt0h</tt>).
-name (example: /dev/nrmt0h).+*a listing of the contents of this media set, including the media type and block size of the tape, and the file number, base directory, and format of each backup file on each tape.<br>If the media database is lost you should be able to get this from the set of hardcopy media catalogs produced by each backup job. Figure 30 shows a sample.<br>If these printouts have been destroyed or were not kept your only other option is to start scanning tapes using dd.
-*a listing of the contents of this media set, including the media type and+
-block size of the tape, and the file number, base directory, and format of+
-each backup file on each tape.+
-If the media database is lost you should be able to get this from the set of+
-hardcopy media catalogs produced by each backup job. Figure 30 shows a+
-sample.+
-If these printouts have been destroyed or were not kept your only other+
-option is to start scanning tapes using dd.+
-The standard procedure for restoring data without COSmanager is to recover COSmanager+ 
-and backup3G first, then use backup3G to recover the required data.+The standard procedure for restoring data without COSmanager is to recover COSmanager and backup3G first, then use backup3G to recover the required data. Your backups should have been configured so that COSmanager and backup3G are in the last tape file in the media set (see Designing Backup Procedures to Aid Data Recovery on page 21).
-Your backups should have been configured so that COSmanager and backup3G are+
-in the last tape file in the media set (see Designing Backup Procedures to Aid Data Recovery+
-on page 21).+
<br> <br>
Line 218: Line 162:
#Log in as root to the host with the tape drive attached. #Log in as root to the host with the tape drive attached.
-#Change to the directory where you want to restore backup3G. This would+#Change to the directory where you want to restore backup3G. This would usually be the original base directory. Example: <tt>cd /usr/cosmos</tt>
-usually be the original base directory. Example: cd /usr/COSmanager+#The media catalog lists the tapes in the media set and shows what files are on each tape. Using this, find the tape and the number of the tape file containing your data, then load the tape. Note that file 1, the first file on the tape, is the electronic label.
-#The media catalog lists the tapes in the media set and shows what files are+#Skip to the beginning of the selected tape file. The tape will be positioned at file 1, so to get to file N you must skip forward N-1 files. On most UNIX systems the command is:
-on each tape. Using this, find the tape and the number of the tape file containing+#:<tt>mt -f ''<no-rewind device>'' fsf ''<N-1>''</tt>
-your data, then load the tape. Note that file 1, the first file on the+#:Example: to skip to file 5, enter:
-tape, is the electronic label.+#:For most UNIX try: &nbsp;&nbsp;<tt>mt -f ''<no-rewind device>'' fsf 4</tt>
-#Skip to the beginning of the selected tape file. The tape will be positioned at+#:For HP/UX try: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tt>mt -t ''<no-rewind device>'' fsf 4</tt>
-file 1, so to get to file N you must skip forward N-1 files. On most UNIX+#:For SCO UNIX try: &nbsp;<tt>tape rfm 4 ''<no-rewind device>''</tt>
-systems the command is:+#The media catalog shows the block size of the tape and the backup format for each file.
-mt -f <no-rewind device> fsf <N-1>+#Enter the command to perform a full recovery of the tape file:
-Example: to skip to file 5, enter:+
-mt -f <no-rewind device> fsf 4+
-#The media catalog shows the block size of the tape and the backup format+
-for each file.+
-'''Note -''' The media catalog shows the block size in kilobytes, but dd expects+::{| border="1" cellpadding="6" cellspacing="0"
-the ibs parameter to be in bytes. Either multiply the block size by+|+Table 6 — Commands to manually recover each backup format
-1024 to convert it to bytes, or add k to the end to specify the block+|-
-size in kilobytes. Example: if the media catalog reports a block size of+!Format !! UNIX Version !! Command
-20, specify either: ibs=20k or ibs=20480.+|-
-For HP/UX try: mt -t <no-rewind device> fsf 4+|cpio || All || <tt>dd if=''<no-rewind device>'' ibs=''<bs>'' &brvbar; cpio -icdumB</tt>
-For SCO UNIX try: tape rfm 4 <no-rewind device>+|-
 +|zcpio || All || <tt>dd if=''<no-rewind device>'' ibs=''<bs>'' &brvbar; uncompress &brvbar; cpio -icdumB</tt>
 +|-
 +|tar || All || <tt>dd if=''<no-rewind device>'' ibs=''<bs>'' &brvbar; tar xpf -</tt>
 +|-
 +|dump || SVR4 || <tt>dd if=''<no-rewind device>'' ibs=''<bs>'' &brvbar; ufsrestore xf -</tt>
 +|-
 +|dump || SVR3 or BSD || <tt>dd if=''<no-rewind device>'' ibs=''<bs>'' &brvbar; restore xf -</tt>
 +|}
 + 
 + 
 +----
 +;Note: The media catalog shows the block size in kilobytes, but <tt>dd</tt> expects the ibs parameter to be in bytes. Either multiply the block size by 1024 to convert it to bytes, or add k to the end to specify the block size in kilobytes. Example: if the media catalog reports a block size of 20, specify either: <tt>ibs=20k</tt> or <tt>ibs=20480</tt>.
 +----
-#Enter the command to perform a full recovery of the tape file: 
-Table 6 — Commands to manually recover each backup format 
When backup3G is successfully restored you can use it to recover any other data When backup3G is successfully restored you can use it to recover any other data
Line 248: Line 199:
<br> <br>
 +
=== Layout of the Media Catalog === === Layout of the Media Catalog ===
-Figure 30 — Sample media catalog produced by medprint+ Figure 30 — Sample media catalog produced by <tt>medprint</tt>
-Format+ 
-UNIX+<br>
-Version Command+
-cpio All dd if=<no-rewind device> ibs=<bs> | cpio -icdumB+
-zcpio All dd if=<no-rewind device> ibs=<bs> | uncompress | cpio -icdumB+
-tar All dd if=<no-rewind device> ibs=<bs> | tar xpf -+
-dump SVR4 dd if=<no-rewind device> ibs=<bs> | ufsrestore xf -+
-dump SVR3 or BSD dd if=<no-rewind device> ibs=<bs> | restore xf -+
-Media+
-Media type+
-Tape file+
-Block size+
-(kilobytes)+
-Backup method+
-(incl. format)+
-Base directory+
-number+
-number+

Current revision

This section explains how to recover files from backup. You recover data by telling backup3G:

If backup3G is unavailable you will need to restore it manually from a recent backup. See To Recover backup3G Manually on page 113.


Contents

Recovery Options

Files can be restored to the original host machine or to any other host on the network (though some users may have restrictions on which directories they can recover to—see Restricting Recovery Destinations by Role on page 51).

You can specify a different target directory from the original. If the directory doesn’t already exist backup3G will create it. If you are recovering selected files under a directory, backup3G will also restore any subdirectories it needs to recreate each file’s directory path.

In summary, the options available for restoration are:


Furthermore, if you are recovering from several discrete steps, you can recover to the same host and all steps will relate to the specified directory. For example, If you are recovering /etc/passwd and /usr/bin/go to the directory /tmp on host mama, the recovered files will be in /tmp/etc/passwd and /tmp/usr/bin/go.



Note
The restored file will be created with its original ownership and permissions. Any intermediate directories will be owned by root.


Recovering From Indexes

Backup3G keeps online indexes of backed up files. You can search the indexes for a file or directory. If necessary an index can be deleted to save disk space.


Single-Volume Backups

For a simple single-volume backup, each tape file corresponds to a backup step that backs up a base directory and all its subdirectories. Multi-part backups are written out in several parts, each part corresponding to a physical tape file.


Multi-part Backups

When you recover from a multi-part backup backup3G asks you to choose the base directory, then specify whether you want to do a full recovery or recover only selected files. For a selected recovery you can list the files and directories to be recovered or pick files from the online index (if one was created). For indexed backups backup3G reads only the parts containing files to be recovered.


How To Recover Files From Backup

The Recovery module provides options to recover all of the contents of a media set or to recover only selected parts.


To Recover Files From a Known Backup

This topic describes how to do a recovery when you know which media set contains the files.

If you don’t know which backup contains the correct versions of the files, you will first need to search the media contents database or online indexes. See To Recover Using Search on page 110.


Selecting the backup

  1. Start the Recovery module to display the list of available backups.
  2. Highlight the backup you want to recover from, and select Contents > Open to list the base directories in this media set.
Figure 26 — Backups available for recovery


Selecting what files to recover

The next step is to choose the backup steps you want to recover files from.
  • To recover the whole backup, select all the base directories.
  • To recover all the files from selected steps in the backup, select those directories.
  • To recover all or selected files from a single backup step, select that directory.
  • To choose files from an online index, select one base directory only, then select Index > Open, then select the files you want to recover.


Specifying the recovery parameters and destination

  1. Select Recover > Interactive if you want to monitor the output from the recovery job. Select Recover > Background if you don’t want to monitor the progress of the recovery job. Figure 27 — List of base directories in the selected backup
  2. If more than one logical drive can read this media set, backup3G lists them now. Choose one. If only one drive is valid for this media type, this step is skipped.
  3. Some user roles are restricted in where they can recover files. Backup3G lists the hosts and directories you are allowed to recover to. If you have no restrictions, this step is skipped. Figure 28 — Recover to which host and directory?
  4. A form similar to the one in Figure 29 now prompts you to supply any remaining details. The fields to be filled in depend on the type of recovery and your own access capabilities. Figure 29 — Recovery prompt form (example)
    Recover to host
    Select the name of the host to which the files should be recovered. The default is the original host.
    If you chose a host in step 6 on page 107, this field will be filled in for you.
    Into directory
    Specify where the recovered files should go. The target directory will be created if it doesn’t already exist.
    For an image backup, enter the full filename.
    If you want to compare the current files on disk with the backedup versions, recover to a temporary directory so that the current versions will not be overwritten.
    If you chose a target directory in step 6 on page 107, this field will be filled in for you.
    Auto unload
    Select ‘yes’ to unload the backup volume from the drive after the recovery has finished.
    This field only appears for a background recovery.
    Recovery method
    Select the recovery method. The default should be correct, as the recovery method is determined by the original backup method and format.
  5. Press Accept.


Backup3G queues the job and requests the first volume containing files to be recovered.



Caution
Recovery overwrites any existing files with backup files of the same name. Before you recover files, make sure that you won’t lose important data.


Selecting files from a single backup step

  1. If you selected a single base directory in step 3 on page 107, you can choose which files and directories you want to recover.
    Type
    To recover all files in the backup step, select ‘full’; to choose which files and directories to recover, use recovery type ‘selected’.
    Pick from index?
    If you wish to select files from the online index, set this field to ‘yes’ and press Accept. Select the files and directories and press Accept again to queue the recovery job.
    If you don’t wish to select files from the index (or if there is no index) you will need to list the files and directories to be recovered.
    Files to recover
    Enter a space-separated list of files (not directories). The file names should be relative to the base directory.
    Sub-directories
    Enter a space-separated list of directories (not files). The directory names should be relative to the base directory.
    Example: the base directory is /usr. To recover /usr/file.one, /usr/tmp/file.two, and all the files in /usr/lib/term, enter:
  2. Press Accept


Backup3G queues the job and requests the first volume containing files to be recovered.

You can use the Monitor option to see what stage the recovery job is at.


To Recover Using Search

The Search option on the main Recover window illustrated in Figure 26 allows you to search for data to recover using the base directory for the backup or using the filename from online indexes.

If you don’t know which backup contains the files you want to recover, this will give you list of all backup copies of the files you specify.


To search for base directories

  1. Start the Recovery module to display the list of available backups.
  2. Select Search > Base directories.


The search options are described in detail in Searching Backup Media on page 46 and in How To Read Backup Media Contents on page 127.


How to Recover backup3G

Manual restoration is quite simple once you have the tape containing the files you need to recover from and a media catalog that lists its contents. The media catalog is printed at the end of each backup job.

Backups in cpio, dump, or tar format can be recovered from the command line. Once you know what backup method was used, Table 6 tells you the command to use for the recovery.


Overview

You will need:


The standard procedure for restoring data without COSmanager is to recover COSmanager and backup3G first, then use backup3G to recover the required data. Your backups should have been configured so that COSmanager and backup3G are in the last tape file in the media set (see Designing Backup Procedures to Aid Data Recovery on page 21).


To Recover backup3G Manually

  1. Log in as root to the host with the tape drive attached.
  2. Change to the directory where you want to restore backup3G. This would usually be the original base directory. Example: cd /usr/cosmos
  3. The media catalog lists the tapes in the media set and shows what files are on each tape. Using this, find the tape and the number of the tape file containing your data, then load the tape. Note that file 1, the first file on the tape, is the electronic label.
  4. Skip to the beginning of the selected tape file. The tape will be positioned at file 1, so to get to file N you must skip forward N-1 files. On most UNIX systems the command is:
    mt -f <no-rewind device> fsf <N-1>
    Example: to skip to file 5, enter:
    For most UNIX try:   mt -f <no-rewind device> fsf 4
    For HP/UX try:        mt -t <no-rewind device> fsf 4
    For SCO UNIX try:  tape rfm 4 <no-rewind device>
  5. The media catalog shows the block size of the tape and the backup format for each file.
  6. Enter the command to perform a full recovery of the tape file:
Table 6 — Commands to manually recover each backup format
Format UNIX Version Command
cpio All dd if=<no-rewind device> ibs=<bs> ¦ cpio -icdumB
zcpio All dd if=<no-rewind device> ibs=<bs> ¦ uncompress ¦ cpio -icdumB
tar All dd if=<no-rewind device> ibs=<bs> ¦ tar xpf -
dump SVR4 dd if=<no-rewind device> ibs=<bs> ¦ ufsrestore xf -
dump SVR3 or BSD dd if=<no-rewind device> ibs=<bs> ¦ restore xf -



Note
The media catalog shows the block size in kilobytes, but dd expects the ibs parameter to be in bytes. Either multiply the block size by 1024 to convert it to bytes, or add k to the end to specify the block size in kilobytes. Example: if the media catalog reports a block size of 20, specify either: ibs=20k or ibs=20480.


When backup3G is successfully restored you can use it to recover any other data from backup.


Layout of the Media Catalog

Figure 30 — Sample media catalog produced by medprint