TSM (Tivoli Storage Manager)
Dateien mit dem TSM Client via Kommandozeile (CLI Command Line Interface) zurücksichern
Starten des TSM Client auf der Kommandozeile
root@pillepalle:~# dsmc IBM Tivoli Storage Manager Command Line Backup-Archive Client Interface Client Version 7, Release 1, Level 1.0 Client date/time: 13.08.2015 11:15:14 (c) Copyright by IBM Corporation and other(s) 1990, 2014. All Rights Reserved. Node Name: PILLEPALLE Session established with server SERVER1: Linux/x86_64 Server Version 7, Release 1, Level 1.100 Server date/time: 13.08.2015 11:15:15 Last access: 13.08.2015 06:27:25
Die eingebaute Hilfe anzeigen lassen
tsm> help 1.0 New for IBM Tivoli Storage Manager Version 7.1.1 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 Archiveroot@pillepalle:~# dsmc 2.6 Archive FastBack 2.7 Backup FastBack 2.8 Backup Group 2.9 Backup Image 2.9.1 Static, dynamic, and snapshot image backup 2.9.2 Utilizing image backup to perform file system incremental backup 2.10 Backup NAS 2.11 Backup VAPP 2.12 Backup VM 2.13 Cancel Process 2.14 Cancel Restore 2.15 Delete Access 2.16 Delete Archive 2.17 Delete Backup 2.18 Delete Filespace 2.19 Delete Group 2.20 Expire 2.21 Help 2.22 Incremental 2.22.1 Journal-based backup 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, command name, or command and subcommand: q
Durch drücken von „q“ kommt man wieder raus
Um sich den Backupplan anzuschauen geben wir „q sched“ ein:
tsm> q sched Schedule Name: DAILY_BACKUP Description: Daily Backup at 22:00 of /home Schedule Style: Classic Action: Incremental Options: Objects: Priority: 5 Next Execution: 10 Hours and 37 Minutes Duration: 1 Hour Period: 1 Day Day of Week: Any Month: Day of Month: Week of Month: Expire: Never
Um sich anzeigen zu lassen, welche Dateien, Verzeichnisse oder Erweiterungen vom Backup ausgeschlossen oder explizit eingebunden sind gibt man „q inclexcl“ ein:
tsm> q inclexcl *** FILE INCLUDE/EXCLUDE *** Mode Function Pattern (match from top down) Source File ---- --------- ------------------------------ ----------------- No exclude filespace statements defined. Excl Directory /.../.TsmCacheDir TSM Excl Directory /.../.svn /opt/tivoli/tsm/client/ba/bin/dsm.sys Excl Directory /home/httpd/html/no_backup* /opt/tivoli/tsm/client/ba/bin/dsm.sys Excl Directory /space/udo-no_backup/ /opt/tivoli/tsm/client/ba/bin/dsm.sys Excl Directory /var/log /opt/tivoli/tsm/client/ba/bin/dsm.sys Include All /home/dev/cron/*.* /opt/tivoli/tsm/client/ba/bin/dsm.sys Exclude Backup /home/.../*.sql /opt/tivoli/tsm/client/ba/bin/dsm.sys Exclude Backup /home/*.sql /opt/tivoli/tsm/client/ba/bin/dsm.sys Exclude Backup /home/httpd/html/*.txt /opt/tivoli/tsm/client/ba/bin/dsm.sys No DFS include/exclude statements defined.
Mit „q fi“ fragt man ab, welche Partitionen gesichert werden:
tsm> q fi # Last Incr Date Type File Space Name -------------------------------------------------------------------------------- 1 26.01.2015 22:05:24 EXT3 / 2 12.08.2015 22:00:51 EXT3 /etc 3 12.08.2015 22:55:52 EXT3 /home 4 12.08.2015 22:00:50 EXT3 /root 5 12.08.2015 22:00:44 EXT3 /space 6 27.01.2015 00:14:48 EXT3 /usr 7 12.08.2015 22:00:51 EXT3 /usr/local/sbin 8 27.01.2015 00:15:25 EXT3 /var 9 12.08.2015 23:04:36 EXT3 /var/lib/mysql
Abfragen, welche Dateien gesichert wurden, z.B. unterhalb von /home/httpd/html/dev-udo/:
tsm> q ba /home/httpd/html/dev-udo/ -subdir=yes Size Backup Date Mgmt Class A/I File ---- ----------- ---------- --- ---- 4.096 B 11.02.2015 23:20:08 STANDARD A /home/httpd/html/dev-udo/content 4.096 B 06.07.2015 22:51:14 STANDARD A /home/httpd/html/dev-udo/images 4.096 B 24.01.2015 05:56:25 STANDARD A /home/httpd/html/dev-udo/index 4.096 B 24.01.2015 05:56:25 STANDARD A /home/httpd/html/dev-udo/palle 4.096 B 24.01.2015 05:56:25 STANDARD A /home/httpd/html/dev-udo/pille 4.096 B 24.01.2015 05:56:25 STANDARD A /home/httpd/html/dev-udo/shortlist 6.042 B 21.07.2015 23:06:45 DEFAULT A /home/httpd/html/dev-udo/.htaccess 40 B 29.01.2015 12:07:55 DEFAULT A /home/httpd/html/dev-udo/index.php 14 B 21.05.2015 23:23:02 DEFAULT A /home/httpd/html/dev-udo/noeeee.html
Möchte man sich auch die älteren Versionen einer Datei anzeigen lassen, sieht die Query wie folgt aus:
tsm> q ba /home/httpd/html/dev-udo/ -subdir=yes -inactive Size Backup Date Mgmt Class A/I File ---- ----------- ---------- --- ---- 4.096 B 11.02.2015 23:20:08 STANDARD A /home/httpd/html/dev-udo/content 4.096 B 06.07.2015 22:51:14 STANDARD A /home/httpd/html/dev-udo/images 4.096 B 24.01.2015 05:56:25 STANDARD A /home/httpd/html/dev-udo/index 4.096 B 24.01.2015 05:56:25 STANDARD A /home/httpd/html/dev-udo/palle 4.096 B 24.01.2015 05:56:25 STANDARD A /home/httpd/html/dev-udo/pille 4.096 B 24.01.2015 05:56:25 STANDARD A /home/httpd/html/dev-udo/shortlist 6.042 B 21.07.2015 23:06:45 DEFAULT A /home/httpd/html/dev-udo/.htaccess 6.042 B 20.07.2015 22:58:19 DEFAULT I /home/httpd/html/dev-udo/.htaccess 40 B 29.01.2015 12:07:55 DEFAULT A /home/httpd/html/dev-udo/index.php 14 B 21.05.2015 23:23:02 DEFAULT A /home/httpd/html/dev-udo/noeeee.html
Eine einzelne Datei zurücksichern
tsm> rest /home/httpd/html/dev-udo/.htaccess /home/httpd/html/dev-udo/backup/
Möchte man die Datei dabei direkt umbenennen
tsm> rest /home/httpd/html/dev-udo/.htaccess /home/httpd/html/dev-udo/backup/myold.htaccess
So sichert man mehrere Dateien bzw. Verzeichnisse zurück
tsm> rest/home/httpd/html/dev-udo/* /home/httpd/html/dev-udo/backup/ -su=yes
Eine komplette Partition zurücksichern erfolgt genauso wie im Schritt vorher, nur daß man den Platz beachten sollte, damit die Platte nicht voll läuft
tsm> rest /home/* /tmp/backup/ -su=yes
Ältere Dateien / Inactive Dateien wieder herstellen mit der pick Konsole, wo man sich die Dateien anschauen kann
tsm> rest /home/httpd/html/dev-udo/* /home/httpd/html/dev-udo/backup/ -su=yes -inactive -pick Session established with server SERVER1: Linux/x86_64 Server Version 7, Release 1, Level 1.100 Server date/time: 13.08.2015 11:56:09 Last access: 13.08.2015 11:15:16 Restore function invoked. TSM Scrollable PICK Window - Restore # Backup Date/Time File Size A/I File -------------------------------------------------------------------------------------------- 1. | 23.01.2015 22:53:13 4,00 KB A /home/httpd/html/dev-udo 2. | 11.02.2015 23:20:08 4,00 KB A /home/httpd/html/dev-udo/content 3. | 21.07.2015 23:06:45 5,90 KB A /home/httpd/html/dev-udo/.htaccess 4. | 20.07.2015 22:58:19 5,90 KB I /home/httpd/html/dev-udo/.htaccess 5. | 06.07.2015 22:51:14 4,00 KB A /home/httpd/html/dev-udo/images 6. | 24.01.2015 05:56:25 4,00 KB A /home/httpd/html/dev-udo/index 7. | 29.01.2015 12:07:55 40 B A /home/httpd/html/dev-udo/index.php 8. | 21.05.2015 23:23:02 14 B A /home/httpd/html/dev-udo/noeeee.html 9. | 29.01.2015 12:07:55 2,52 KB A /home/httpd/html/dev-udo/old_htaccess 10. | 29.01.2015 12:07:55 5 B A /home/httpd/html/dev-udo/old_index.html 11. | 24.01.2015 05:56:25 4,00 KB A /home/httpd/html/dev-udo/palle 12. | 24.01.2015 05:56:25 4,00 KB A /home/httpd/html/dev-udo/pille 13. | 24.01.2015 05:56:25 4,00 KB A /home/httpd/html/dev-udo/shortlist 0---------10--------20--------30--------40--------50--------60--------70--------80--------90 <U>=Up <D>=Down <T>=Top <B>=Bottom <R#>=Right <L#>=Left <G#>=Goto Line # <#>=Toggle Entry <+>=Select All <->=Deselect All <#:#+>=Select A Range <#:#->=Deselect A Range <O>=Ok <C>=Cancel pick> 4 TSM Scrollable PICK Window - Restore # Backup Date/Time File Size A/I File -------------------------------------------------------------------------------------------- 1. | 23.01.2015 22:53:13 4,00 KB A /home/httpd/html/dev-udo 2. | 11.02.2015 23:20:08 4,00 KB A /home/httpd/html/dev-udo/content 3. | 21.07.2015 23:06:45 5,90 KB A /home/httpd/html/dev-udo/.htaccess x 4.| 20.07.2015 22:58:19 5,90 KB I /home/httpd/html/dev-udo/.htaccess 5. | 06.07.2015 22:51:14 4,00 KB A /home/httpd/html/dev-udo/images 6. | 24.01.2015 05:56:25 4,00 KB A /home/httpd/html/dev-udo/index 7. | 29.01.2015 12:07:55 40 B A /home/httpd/html/dev-udo/index.php 8. | 21.05.2015 23:23:02 14 B A /home/httpd/html/dev-udo/noeeee.html 9. | 29.01.2015 12:07:55 2,52 KB A /home/httpd/html/dev-udo/old_htaccess 10. | 29.01.2015 12:07:55 5 B A /home/httpd/html/dev-udo/old_index.html 11. | 24.01.2015 05:56:25 4,00 KB A /home/httpd/html/dev-udo/palle 12. | 24.01.2015 05:56:25 4,00 KB A /home/httpd/html/dev-udo/pille 13. | 24.01.2015 05:56:25 4,00 KB A /home/httpd/html/dev-udo/shortlist 0---------10--------20--------30--------40--------50--------60--------70--------80--------90 <U>=Up <D>=Down <T>=Top <B>=Bottom <R#>=Right <L#>=Left <G#>=Goto Line # <#>=Toggle Entry <+>=Select All <->=Deselect All <#:#+>=Select A Range <#:#->=Deselect A Range <O>=Ok <C>=Cancel pick> O Restoring 6.042 /home/httpd/html/dev-udo/.htaccess --> /home/httpd/html/dev-udo/backup/dev-udo/.htaccess [Done] Restore processing finished. Total number of objects restored: 1 Total number of objects failed: 0 Total number of bytes transferred: 5,92 KB Data transfer time: 0,00 sec Network data transfer rate: 329.155,81 KB/sec Aggregate data transfer rate: 0,05 KB/sec Elapsed processing time: 00:01:47 tsm> quit root@pillepalle:~#
Möchte man die Daten auf einen anderen Server wiederherstellen, ruft man den TSM Client wie folgt auf:
dsmc -virtualnodename=DEAD.PILLEPALLE2.OLD
Alles andere bleibt so, wie oben schon erwähnt.