Unix TSM Commands
Unix TSM Commands
You will b
e prompted for your Mac password then should see a prompt of the form:
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 6, Release 4, Level 1.5
Client date/time: 13-03-2014 14:57:05
(c) Copyright by IBM Corporation and other(s) 1990, 2013. All Rights Reserved.
Node Name: ABCD1234-LAPTOP-ITSERV
Session established with server OX_HFS_B1: AIX
Server Version 6, Release 3, Level 4.200
Server date/time: 13-03-2014 14:57:05 Last access: 10-03-2014 12:34:35
tsm>
2.3. Unix/Linux
Run dsmc as root from the shell prompt (e.g., in Ubuntu, run sudo dsmc). You sho
uld see a prompt of the form:
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 6, Release 4, Level 1.7
Client date/time: 13-03-2014 15:01:20
(c) Copyright by IBM Corporation and other(s) 1990, 2014. All Rights Reserved.
Node Name: TEST-UBUNTU-OUCS
Session established with server OX_HFS_B1: AIX
Server Version 6, Release 3, Level 4.200
Server date/time: 13-03-2014 15:01:15 Last access: 13-03-2014 13:01:04
tsm>
2.4. Netware
Type load dsmc at the console.
3. Accessing Help
Online help for TSM commands, options and error messages is available by typing
help at the tsm> prompt. The result will be similar to below:
1.0 New for IBM Tivoli Storage Manager Version 6.4
2.0 Using commands
2.1 Start and end a client command session
2.1.1 Process commands in batch mode
2.1.2 Process commands in interactive mode
2.2 Enter client command names, options, and parameters
2.2.1 Command name
2.2.2 Options
2.2.3 Parameters
2.2.4 File specification syntax
2.3 Wildcard characters
2.4 Client commands reference
2.5 Archive
2.6 Archive FastBack
Enter 'q' to exit help, 't' to display the table of contents,
press enter or 'd' to scroll down, 'u' to scroll up or
enter a help topic section number, message number, option name,
WEEKLY_ITSERV
ITSERV weekly incremental backup
Classic
Incremental
5
149 Hours and 35 Minutes
15 Minutes
1 Week
Wednesday
Never
Source File
----------------/opt/tivoli/tsm/client/ba/bin/incl
/opt/tivoli/tsm/client/ba/bin/incl
/opt/tivoli/tsm/client/ba/bin/incl
/opt/tivoli/tsm/client/ba/bin/incl
/opt/tivoli/tsm/client/ba/bin/incl
/opt/tivoli/tsm/client/ba/bin/incl
/opt/tivoli/tsm/client/ba/bin/incl
/opt/tivoli/tsm/client/ba/bin/incl
/opt/tivoli/tsm/client/ba/bin/incl
.excl
No DFS include/exclude statements defined.
Note that the include/exclude directives are listed at the partition level first
, then the directory/folder level and finally at the file level. The order they
are displayed above is the order in which these directives are applied by TSM. Y
ou will note that the order of the directives at any one level is the opposite o
f the order in which they appear in the options file. That is, TSM reads the dir
ectives listed in options file from the bottom up.
4.3. Querying what partitions have been backed up
At the tsm> prompt enter q fi to list which partitions have been backed up:
Windows:
#
--1
Type
---NTFS
tsm> q fi
#
Last Incr Date
---------------1 02-05-2012 02:13:13
2 25-07-2011 12:26:09
Type
---HFS
HFS
Type
---EXT4
EXT3
Type
---UFS
UFS
Mac:
Linux:
tsm> q fi
#
Last Incr Date
---------------1 02-05-2013 02:13:13
2 25-07-2014 12:26:09
Solaris:
tsm> q fi
#
Last Incr Date
---------------1 02-05-2012 02:13:13
2 25-07-2011 12:26:09
Netware:
#
--1
2
3
4
Type
---NTW:LONG
NDS
NTW:LONG
NTW:LONG
If you give just a path to a directory/folder you will only get the folder retur
ned as the output:
Windows:
tsm> q ba c:\Downloads
Size
Backup Date
-------------0 B 03-04-2012 19:57:54
\c$\Downloads
Mgmt Class
---------STANDARD
A/I File
--- ---A \\tentacles.oucs
Mgmt Class
---------STANDARD
A/I File
--- ---A /Users
Mgmt Class
---------STANDARD
A/I File
--- ---A /home/ians/proje
Mgmt Class
---------STANDARD
A/I File
--- ---A USR:/ians
Mac:
tsm> q ba /Users
Size
Backup Date
-------------72 B 24-04-2012 02:52:09
Linux:
tsm> q ba /home/ians/projects
Size
Backup Date
-------------512 B 24-04-2012 02:52:09
cts
Netware:
tsm> q ba USR:/ians
Size
Backup Date
-------------0 B 02-05-2012 00:25:32
Note that the Windows client lists the directory in UNC format. This format can
also be used for the file specification in the query.
If you just add a trailing * (star) as a wildcard in the above query, TSM will o
nly return those files and directories backed up immediately below the directory
path given in the query
tsm>q ba
Size
---512
1,024
512
512
/home/ians/projects/*
Backup Date
----------12-09-2011 19:57:09
08-12-2011 02:46:53
12-09-2011 19:57:09
24-04-2012 00:22:56
Mgmt Class
---------STANDARD
STANDARD
STANDARD
STANDARD
A/I
--A
A
A
A
File
---/home/ians/projects/hfs0106
/home/ians/projects/hsm41perf
/home/ians/projects/hsm41test
/home/ians/projects/hsm42upg
If you want to query all the current files and directories backed up under a dir
ectory and all its subdirectories you need to add the -subdir=yes option as belo
w:
tsm> q ba /home/ians/projects/*
Size
Backup Date
-------------512 12-09-2011 19:57:09
1,024 08-12-2011 02:46:53
512 12-09-2011 19:57:09
512 24-04-2012 00:22:56
1,024 12-09-2011 19:57:09
-subdir=yes
Mgmt Class A/I
---------- --STANDARD
A
STANDARD
A
STANDARD
A
STANDARD
A
STANDARD
A
File
---/home/ians/projects/hfs0106
/home/ians/projects/hsm41perf
/home/ians/projects/hsm41test
/home/ians/projects/hsm42upg
/home/ians/projects/hfs0106/test
1,024
test2
12,048
les
50,326
0023
50,326
0099
11,013
heck
12-09-2011 19:57:09
STANDARD
A /home/ians/projects/hfs0106/test/
04-12-2011 02:01:29
STANDARD
A /home/ians/projects/hsm41perf/tab
30-04-2012 01:35:26
STANDARD
A /home/ians/projects/hsm42upg/PMR7
27-04-2012 00:28:15
STANDARD
A /home/ians/projects/hsm42upg/PMR7
24-04-2012 00:22:56
STANDARD
A /home/ians/projects/hsm42upg/md5c
Note that file specifications with spaces in them will need to be quoted. Thus t
o query all the files backed up under C:\My Documents and any sub-directories be
low it, the following input would be required:
tsm> q ba "C:\My Documents\*" -subdir=yes
By default only the current versions of files are listed. In order to query both
current active and previous inactive versions of files, add the -inactive optio
n to the query:
tsm> q ba /home/ians/projects/*
Size
Backup Date
-------------512 12-09-2011 19:57:09
1,024 08-12-2011 02:46:53
512 12-09-2011 19:57:09
512 24-04-2012 00:22:56
1,024 12-09-2011 19:57:09
1,024 12-09-2011 19:57:09
test2
12,048 04-12-2011 02:01:29
les
8,448 03-12-2011 01:31:18
les
50,326 30-04-2012 01:35:26
0023
50,326 27-04-2012 00:28:15
0099
11,013 24-04-2012 00:22:56
heck
11,013 23-04-2012 17:10:08
heck
-subdir=yes -inactive
Mgmt Class A/I File
---------- --- ---STANDARD
A /home/ians/projects/hfs0106
STANDARD
A /home/ians/projects/hsm41perf
STANDARD
A /home/ians/projects/hsm41test
STANDARD
A /home/ians/projects/hsm42upg
STANDARD
A /home/ians/projects/hfs0106/test
STANDARD
A /home/ians/projects/hfs0106/test/
STANDARD
A /home/ians/projects/hsm41perf/tab
STANDARD
I /home/ians/projects/hsm41perf/tab
STANDARD
A /home/ians/projects/hsm42upg/PMR7
STANDARD
A /home/ians/projects/hsm42upg/PMR7
STANDARD
A /home/ians/projects/hsm42upg/md5c
STANDARD
I /home/ians/projects/hsm42upg/md5c
Note how the previous versions of files are marked by an I (for Inactive) in the
A/I column.
Unix and Linux users should be aware of potential confusion of how TSM stores fi
les in nested file spaces. This can arise in the following situation: A user bac
ks-up a file myconf.txt on the /usr partition in the /usr/local/etc directory. S
ubsequently, a new disk partition is mounted at /usr/local, or it is defined as
a virtualmountpoint. Running the command:
tsm> q ba /usr/local/etc/*
will not list the myconf.txt file. This is because TSM always looks for a file i
n the filespace (partition) with the longest name that matches the file specific
ation you include in the command. In the above example, the file was not backed
up under the /usr/local filespace but under the /usr filespace. To tell TSM to l
ook for a file in latter filespace you must specify the filespace explicitly usi
ng braces, as below:
tsm> q ba {/usr}/local/etc/*
5. Backing up your data
5.1. Backing up local disks
The basic syntax for backing up local disk volumes is dsmc backup-type disk volu
me(s), where backup-type is one of incremental or selective. We recommend increm
ental backups only; selective backups cause data to be sent even if it already e
xists on the HFS. By default, if the disk volume is omitted, TSM will backup tho
se volumes specified by the Domain option in the dsm.opt options file. If Domain
is set to All-Local, then to backup all local volumes enter:
tsm> incr
where incr is an abbreviation for incremental.
To incrementally back up specific volumes enter:
tsm>
tsm>
tsm>
tsm>
incr
incr
incr
incr
C: D: F:
/
/ /usr /usr/local /home
NDS: USR: SYS: APPS:
**
**
**
**
Windows
Mac
Unix/Linux
Netware
To run an incremental by date backup of the above, add the -incrbydate option, a
s in:
tsm> incr C: D: F: -incrbydate
To back up entire disk volumes irrespective of whether files have changed since
the last backup, use the selective command with a wildcard and -subdir=yes as be
low:
tsm>
tsm>
tsm>
tsm>
sel
sel
sel
sel
-su=yes
-su=yes
-su=yes
-su=yes
**
**
**
**
Windows
Mac
Unix/Linux
Netware
ata onto a machine other than the original from which it was backed up. Ideally
the machine platform should be identical to that of the original machine. Where
this is not possible or practical please note that restores are only possible fo
r partition types that the operating system supports. Thus a restore of an NTFS
partition to a Windows 9x machine with just FAT support may succeed but the file
permissions will be lost. Please do not attempt cross-platform restores, e.g. b
y trying to restore files onto a Windows machine that have previously been backe
d up with a non-Windows one: using TSM for Windows to try to access backups sent
by other OS platforms can cause those backups to become inaccessible from the h
ost system.
To restore your data to another machine you will need the TSM software installed
on the target machine. Entries in dsm.sys and/or dsm.opt will need to be edited
if the node that you are restoring from does not reside on the same HFS server
as the one that you are restoring to. Please see our help page section on TSM co
nfiguration files for their locations for your operating system. To check which
HFS server is required, please go to View TSM Client Details, where the listed H
FS Server will be the one needed for the Servername field in both dsm.sys (Mac/U
nix/Linux only) and dsm.opt (all operating systems). If you do need to edit thes
e files, it is recommended that you first of all make copies so that you can get
your old settings back later. The other two values which need to be changed are
TCPServer and TCPPort, in dsm.sys (Mac/Unix/Linux) or dsm.opt (Windows/Netware)
: these can be got from our page on connecting to the HFS through a firewall, wh
ere the relevant fields are in the 'DNS Name' and 'Port' columns respectively.
To access files from another machine you should then start the TSM client as bel
ow:
dsmc -virtualnodename=DEAD.MACHINE
load dsmc -virtualnodename=DEAD.MACHINE
** Windows
** Netware
The current access list can be queried and deleted using the query acc and delet
e acc commands.
Once access has been granted from another machine, you can query and restore fil
es from that machine to your local machine using the -fromnode option, as below:
tsm> q files -fromnode=ANOTHER.NODE
tsm> rest -fromnode=ANOTHER.NODE /home/*/* /home/restore/
9. Changing your TSM password
The TSM password is set to expire approximately one year after registration and
at one-yearly intervals after that. Prior to this automatic expiry, you will be
contacted to remind you to re-set this password. Note that even if you have the
option
PASSWORDACCESS Generate
set in your options file, it is recommended you manually re-set your TSM passwor
d. To do this at the tsm> prompt enter:
tsm> set password oldpassword newpassword