Tivoli Storage Manager: Configuration with Linux

TSM allows you to backup and archive your local data.

Backup

Backup may be used to perform incremental backups of your system. This way you may recover files deleted by accident or hardware failure.
A backup will only work on your computer.

Archive

Archives let you store files you don't need at the moment or only access irregularly. This way you may save local disk space. If you use an archive, you need to enter the password every time you want to access it.
Archives may be accessed by multiple computers and shared by a team.


Before you start

Your computer needs to be added as a node to the server. You may apply for login credentials by writing an e-mail to hotline@uni-mainz.de.
You need to provide the following information:

  • A valid e-mail address
  • Your computer's IP address
    You can get your computer's IP address by typing ip addr. You will see a list of all your network interfaces. Choose your network interface. In most cases this will start with "en" on a wired connection and with "wl" on a wireless connection. Your IP address can be found after the first line starting with inet.
  • FQDN (Fully Qualified Domain Name)
    You can get your FQDN by typing hostname -f inside a terminal.
  • An estimate of how much space you will need.

Install software

If you use a → ZDV Linux installation you can install TSM by executing this command:
apt install tivsm-ba

If you use a different Linux distribution you can find installable packages → here.

At the moment the Unix backup servers are running version 8. You need to install the same version.


Configuration

Configuration of backups is different from the configuration of archives.
If you want to use both on the same computer, set up the backup solution first. You can use an archive alongside backups.
If you only want to use the archive function, skip the backup setup.

Backup setup

All commands and changes need to be executed with root privileges.

1. Create config files

TSM config files are stored in /opt/tivoli/tsm/client/ba/bin/.

To set up TSM, you need to create dsm.opt, dsm.sys and excludelist configuration files.
Create these files with these commands.
touch /opt/tivoli/tsm/client/ba/bin/dsm.opt

touch /opt/tivoli/tsm/client/ba/bin/dsm.sys

touch /opt/tivoli/tsm/client/ba/bin/excludelist

Now all files are created.

2. Change configuration files

Open /opt/tivoli/tsm/client/ba/bin/dsm.opt and enter:

Open /opt/tivoli/tsm/client/ba/bin/dsm.sys and enter:

You need to make a change in line two starting with NODENAME. Replace your.node.name with the nodename provided to you.

The file /opt/tivoli/tsm/client/ba/bin/excludelist holds information about files and folders excluded from backup.
To exclude a file use EXCLUDE path.to.file.
To exclude a folder and all it's content use EXCLUDE.DIR path.to.folder.
You may use /.../ for multiple paths.

This can be useful to exclude temporary files.
Here is an example to exclude all files named core and folder and sub folder of /tmp, /var/log, /var/run and /var/tmp.

❗ Attention: Encrypted folder
If you use virtual file systems like encfs or ecryptfs (e.g. used by Ubuntu to encrypt your home folder) to encrypt your data, TSM only backs up your encrypted files by default.
If you want to back up plain text files you need to add a virtual mount point, this will tell TSM to back up all data inside a folder, even though they are saved encrypted somewhere else.
To add a virtual mount point you need to add the following line in /opt/tivoli/tsm/client/ba/bin/dsm.sys.

3. Start and log in

To start TSM type dsmc inside your terminal.

You will be asked for your username and password. Your user id is your nodename and it should be seen inside < > brackets. If this is the case you can press Enter without typing it again. Use the password provided to you.

4. Autostart

To autostart TSM and enable automatic backups run update-rc.d dsmcad enable with root rights.
Restart your computer.
Tp make sure everything runs without a problem, type:
cat /var/log/dsmwebcl.log.
You should see time and date for the next backup.

Archive alongside backup

You may use an archive alongside your backup. To access your archive you need to log in with a different nodename. It's the same as logging in with a different account.
To access the archive you need to add "-virtualnodename=archive.name" after the dsmc command.
Change archive.name to the name of the archive you want to access.

To open the archives inside command line, type (change archive.name to the archive name you want to access):
dsmc -virtualnodename=archive.name

Archive only

If you only want to access the archive function you need to create two config files.
Create these files with these commands.
touch /opt/tivoli/tsm/client/ba/bin/dsm.opt

touch /opt/tivoli/tsm/client/ba/bin/dsm.sys

Open /opt/tivoli/tsm/client/ba/bin/dsm.opt with root rights and enter:

Open /opt/tivoli/tsm/client/ba/bin/dsm.sys with root rights and enter:

You need to make a change in line two starting with NODENAME. Replace archive.name with the archive name provided to you.


Usage

GUI

You can use TSM inside a terminal or with a graphical user interface (GUI).
The GUI interface is the same on all operating systems. For information about using the GUI, please refer to the Windows documentation → Documentation about backups and restore and documentation about archiving. You can start the GUI interface by typing dsmj inside your terminal.

Terminal

TSM can be used in two different ways.

  • Inside an interactive shell, where you can enter all commands.
    To open this shell, type dsmc inside your terminal. You will see a new line starting with tsm>. All commands can be entered there.
  • Directly from a terminal by entering the command when opening TSM.
    To run a command from a terminal, type dsmc "followed by the command".

The next section explains commands used by TSM how you enter them is up to you.

Backup usage

Create initial backup

To create an initial backup of your system use the command backup. Backups will run automatically. There is no need to perform manual backups.

Restore files/folder

To restore a file/folder, use restore "path to file/folder". This will restore the selected file/folder to its original location.
In most cases you need to add additional options to your command if you want to restore files in a specific way. You may combine the different options to restore files/folder the way you want.

Restore files/folder to a different location
restore "path to file/folder" "path where to restore".

Restore deleted or older files
TSM differentiates between active and inactive files. All files of the last backup are treated as active files. Older or deleted files are treated as inactive files. By default, TSM only shows and restores active files.
To restore the latest backed up file no matter if it's active or not, use:
restore "path to file/folder" -inac=yes.

Restore sub folder
By default, TSM only restores the folder or file you have chosen. This means that if you choose a folder, no data in sub folders will be restored. To restore all data (including all data in sub folders), use:
restore "path to folder" -sub=yes.

Select the files/folder to restore
TSM can show you a interactive list of backed up files/folders. You can select which files/folders to restore. This may be helpful if you only want to restore a file from inside a folder and don't know how the file was named or if you want to restore an older backup of the file. To show you the list of files use:
restore "path to file/folder" -pick.
This option is most useful if combined with the -inac=yes and/or -sub=yes option.

Examples

  • Restore a deleted file to a specific location.
    restore "path to file" "path where to restore" -inac=yes
  • Select between all backed up versions of a file inside a folder and restore them at their original location.
    restore "path to folder" -pick -inac=yes
  • Select between all versions of backed up files and folders inside a folder, including files in subfolders and restore them at a specific location.
    restore "path to folder" "path to restore" -pick -sub=yes -inac=yes

Archive usage

If you use archives alongside backups, you must enter -virtualnodename=archive.name at the end of the dsmc command, if you want to interact with the archive.
If you want to use an interactive shell, this would look like this:
dsmc -virtualnodename=archive.name.
If you use the terminal directly, this would look like this:
dsmc "your command" -virtualnodename=archive.name.
In both cases replace the archive.name with the archive name you want to access.

Archive files and folders

To make it easier to find and restore archived data, it is best to provide a description when using the archive function. To do so, use -desc='Your Description'. ❗ Attention: Your description must be written between the ' ' symbols.

To archive a file type: archive -desc='description' "path to file".
To archive a folder type: archive -desc='description' "path to folder". ❗ Attention: By default TSM doesn't transfer the content of sub folders.
To archive a folder and sub folder type: archive -desc='description' -sub=yes "path to folder".

Retrieve files from archive

To get a file/folder from an archive, use the retrieve "path to file/folder" command. This will retrieve the file/folder from its original location.
By adding options to this command, you can change how to retrieve the file/folder. You can combine these options to retrieve files/folders, depending on what you need.

Retrieve file/folder to a different location
retrieve "path to file/folder" "path where to restore"

Retrieve sub folders
TSM doesn't retrieve content of sub folders by default. If you want to retrieve content of sub folders use:
retrieve "path to folder" -sub=yes

Retrieve by description
If you only want to retrieve files with a certain description, use
retrieve "path to file" -desc='description you want to retrieve'. ❗ Attention: The description must be inside the ' ' symbols.

Pick files/folders to retrieve
TSM can show you an interactive list of archived files/folders. This way you may select which files/folders to retrieve. This can be helpful if you only want to restore a file from inside a folder and don't know how the file was named. To show you the list of files use:
retrieve "path to file/folder" -pick.

Examples

  • Retrieve a folder including all sub folders to a specific location.
    retrieve "path to folder" "path to restore to" -sub=yes
  • Show a list of files/folder including sub folders with the description 'Very important data' and retrieve them to a specific location.
    retrieve "path to folder" "path to restore to" -sub=yes -pick -desc='Very important data'