Backup
Backup with R-diff backup
Our backup from harriet and its mounted fibrechannel-space SAN is realised with rdiff-backup (installed with: aptitude install rdiff-backup
). The software has to be installed on the server and the machine which will get backed up. Additionally the server needs a working ssh-connection to all clients.
R-diff backup configuration
Install the software with:
Create groups and a user:
Change to the user rdiff-backup:
Create ssh-key:
Create ssh shortcut and enter the simple name and the IP of the server you want to backup:
Change the permissions of the ssh directory:
Add the public key to the server you want to backup. Therefore connect to the remote server:
Then get
root
or create the .ssh directory via sudo.And the pub-key of the backup server (Svalbard).
After you added the key you need to append some commands in front of the key:
and paste the following directly in front of the key:
So it should look similiar to this (you can get the domain adress of the server with:
dig -x IP_ADRESS
):Repair permissions of the .ssh directory:
Back on the backup-server type we test the backup with:
This will backup the typed remote directory into the local one. When this is running successfull we are creating a cronjob.
Run:
And add something like this
This is running the backup every night at 2:40 and is backing up
/
but excluding some recommend directories.
Restore files from the backup
To restore any file from a backup you first have to login as the user rdiff-backup (password is found in the KeePassX-database), then you have to type:
So for example to restore alices whole home directory from 10 days ago:
The restore directory has to be owned by rdiff-backup so the user can write into it.
Delete increments - free disk space
To delete old increments run: rdiff-backup --remove-older-than 90D /data/backup_harriet
This will delete all increments which are older than 90 days.
Back up the seafile-data
Additional to the server backups (harriet) you should backup the seafile-data directory. So in case of a corruption of these files you can restore all metadata.
TSM-backup
IBM Tivoli Storage Manager is a heavy backup software which enables clients to upload their backup onto TSM servers. TSM is now called IBM Spectrum Protect. We have the authorization to backup our server onto the HU TSM servers.
Installing the client software
Installing the client server on a Debian system running kernel 4.9+ is somewhat complicated. You need several .deb
packages to install the software.
Create a working directory and change into it:
mkdir tsm; cd tsm
Download the latest
.deb
package from the IBM support site OR via direct link:Decompress the downloaded
.tar
archive:tar -xvf 8.1.0.0-TIV-TSMBAC-LinuxX86_DEB.tar
Delete the outdated Filepath source:
rm tivsm-filepath-source.tar.gz
for a Debian running Kernel 4.9.0-2 you can download this [Filepath source]. For any other Kernel you can try the above, or the one inside the.tar
package. If they don't compile you have to write an E-Mail to IBM-staff (tsmosreq@us.ibm.com). He will fix the source code to fit your kernel version.Check the release number of your TSM instance:
dpkg-deb -I tsmbackup/tivsm-api64.amd64.deb
and copy theVersion:
entry.Install
make
and the Linux-headers:
Then extract the Filepath source: tar -xf TIVsm-filepath-source_test.tar.gz
. Change into source directory: cd jbb_gpl
and compile it with make RELNUM=$copiedReleaseNumber deb
. If the compile can't finish successfull you can't continue, see step 4 for details. If make
is not found you first have to run sudo aptitude update
and then sudo aptitude install build-essential linux-headers-amd64
. The compiling will create a .deb
package in the jbb_gpl
directory.
Install all TSM components by running the following commands:
When every package was sucessfully installed head over to the configuration.
TSM Configuration
Firt of all you have to alter the
init.d
registration of TSM. Open/etc/init.d/dsmcad
with your favorite editor and go to line 92. Replace line 92 with:if [ $ID = "debian" ]
this will make the script work correctly with Debian. Try the script with:sudo /etc/init.d/dsmcad status
You should got the login credentials for the TSM-server from the workgroup-systemadminstrator. These credentials should contain the following 4 parameters which are needed to access the HU TSM server:
A password
SErvername
TCPServeraddress
NOdename
Also have a look at the official HU configuration manual. Open a new file:
And paste the following but replace the bold entries with the parameters mentioned above:
Now create a new options file with: ``` nano /opt/tivoli/tsm/client/ba/bin/dsm.opt ``` Replace the bold entry and paste:
Starting the TSM backup
To start the TSM backup simply type:
You may get asked for the TSM password. You can find the complete documentation of all command line parameter here.
Add a cronjob for the TSM-backup
You also should add a cronjob so the TSM-backup runs every week:
Add the line:
[Filepath source]: https://github.com/majuss/ecoevolpara/raw/master/source/appendix/various/TIVsm-filepath-source_test.tar.gz
Last updated