Monday, July 24, 2017

Restore files by TSM on Linux server

Unix/Linux file restoration by TSM:
Logon to server where file is locally stored (i.e. not where the file may be NFS mounted)
User id must be the owner of the file. TSM backups files under the ‘true’ name. Linked files would be backed up the target file’s name


$ dsmc

To get a list of backups available, issue

tsm> q b -inactive -pitdate=04/01/2017 -subdir=yes /u02/app/EBSQA/

Note: 1. The result list is way too long to read
          2. The result list is much short without '/' at the end.
              (I do not know/understand why and what it reports)
          tsm>  q b -inactive -pitdate=04/01/2017 -subdir=yes /u02/app/EBSQA
 
To restore a folder, issue
tsm> restore –inactive –replace=no –pitdate=03/092017 -subdir=yes /u02/app/EBSQA/ ‘

Total number of objects restored:         43,597
Total number of objects failed:             0
Total number of bytes transferred:        24.77 MB
Data transfer time:                                 1.96 sec
Network data transfer rate:                    12,921.81 KB/sec
Aggregate data transfer rate:                 48.57 KB/sec
Elapsed processing time:                       00:08:42
tsm> quit

$ find /u02/app/EBSQA -type f | wc -l
659159

NOTES:

1. Below line also does a restoration
restore -subdir=yes -replace=no -pitdate=02/30/2017 /u02/app/EBSQA/apps/apps_st/appl/*  

2. I saw this on a different server. Do not know why.
tsm> restore -inactive -replace=no -pitdate=03/09/2017 -subdir=yes /u02/app/EBSQA/
Total number of objects restored:         43,393
Total number of objects failed:             0
Total number of bytes transferred:        0  B
Data transfer time:                                 0.00 sec
Network data transfer rate:                    0.00 KB/sec
Aggregate data transfer rate:                 0.00 KB/sec
Elapsed processing time:                       00:19:59

tsm>


3. If getting this error, there may be a permission problem. It does not mean the backup was not running.
$ dsmc
ANS1398E Initialization functions cannot open one of the Tivoli Storage Manager logs or a related file: /opt/tivoli/tsm/client/ba/bin/dsmerror.log. errno = 13, Permission denied


No comments: