Backup data
This user guide helps you to backup data of your Linux device on servers of the University of Vienna.
To do this, follow the user guides for installing and setting up backup software first.
Creating backup
Note
- The ZID takes no responsibility for a successful backup. With all of the above variants of data backup, you are responsible for whether a backup runs successfully or not. We therefore recommend that you check the log files regularly so that you can identify and repair any errors in due time.
- You can find the log files (dsmerror.log, dsmsched.log, dsminstr.log, dsmj.log) at:
/opt/tivoli/tsm/client/ba/bin/
Manually install backup
To create a backup of all file systems or the objects specified in the exclude/include file, enter the following command in the command line as root user:
sudo dsmc incremental
If you only want to back up a single file or a folder (including subdirectories), use the following commands:
sudo dsmc incremental test.file
sudo dsmc incremental /home/user/test/ -subdir=yes
Creating backup automatically via cronjob
To create a backup at regular intervals, you can add the command to start the backup to the cronjob. Since several backup jobs should ideally not run at the same time, the following syntax only starts the backup when the dsmc process is not running.
pgrep ^dsmc$ || dsmc incremental
To start a backup now, for example, daily at 16:05 and to save the output in log files, the line in the cronjob (of the root user) is as follows:
05 16 * * * pgrep ^dsmc$ || dsmc incremental 1>/var/log/dsm.log 2>/var/log/dsmerror.log
Creating backup automatically via Scheduler
In addition to automation with the help of a cron job, it is also possible to define a time window for a backup node.
A backup window extends over 2 hours, in which the backup is started independently of its total runtime, depending on the server load. An exact start time cannot be defined for this variant.
To configure this kind of automatic backup, first you have to:
- specify in the dsm.sys file that the backup should be started automatically via the scheduler,
echo " MANAGEDServices schedule" >>/opt/tivoli/tsm/client/ba/bin/dsm.sys
- start the Scheduler and add it to the autostart (see IBM website) via
sudo systemctl start dsmcad
sudo systemctl enable dsmcad - and make sure that the password is saved when logging in to the backup client again.
If not already specified during registration, and you have already set up the scheduler, fill out the Servicedesk form Zentrales Backup (Central backup, in German) with a request to set up a scheduler for your node and the desired backup window. Possible backup windows are: 00:00-02:00, 02:00-04:00, 04:00-06:00 ... 22:00-24:00.
Once the backup window has been set up, your backup node automatically backs up the data you have selected in the selected time.
After the first run, you should use the log files to check whether a backup was successfully created. The log files (dsmerror.log, dsmsched.log, dsminstr.log, dsmj.log) can be found under /opt/tivoli/tsm/client/ba/bin/.
Creating archive
Besides standard backups there is the option to backup so called archives. These archives are backed up on servers of the University of Vienna for a longer period of time – you can find the exact deadlines on the website of the central backup.
To create an archive of a file or folder (including subfolders), execute the following commands (as root user):
dsmc archive /home/user/test.txt
dsmc archive /home/user/* -subdir=yes
There is also the option of an autocomplete:
dsmc archive "/home/user/*.txt"
To make it easier to distinguish archives later, you can also add a description to an archive when backing it up:
dsmc archive /home/user/* -subdir=yes -description="Archiv_1"