Professionelle Datensicherung aus der OpenSource-Welt
Transcription
Professionelle Datensicherung aus der OpenSource-Welt
AMANDA Professionelle Datensicherung aus der OpenSource-Welt AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Was ist AMANDA? Advanced Maryland Automatic Network Disk Archiver „A backup system that allows the administrator of a LAN to set up a single master backup server to back up multiple hosts to a single large capacity tape drive.“ AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger AMANDA ist KEIN Backup-Programm! „The first thing to understand is that amanda is NOT a backup program. SURPRISE! Actually amanda is a backup manager, managing backups made by other programs. Currently these programs use the syntax of the unix dump or tar programs.“ Jon LaBadie, AMANDA-core-member. AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Ursprünge von AMANDA Begründet 1991 von James da Silva und Olafur Gudmundsson an der Universität Maryland, entwickelt für die Sicherungsaufgaben am Department of Computer Science. Weiterentwickelt von Alexandre Oliva, John R. Jackson, Jean-Louis Martineau, ... dem amanda-core-team. AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Motivation ➔ ➔ Zentralisieren Automatisieren ➔ AMANDA Optimieren oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Zentralisieren Früher : Ein Bandlaufwerk pro Server - geringe Bandkapazitäten - manuelles Handling und Scheduling AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Zentralisieren mit AMANDA Client-Server-Lösung: - Ein großvolumiges Bandlaufwerk auf einem Tape-Server - Zentrales Handling und Scheduling AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Automatisieren ● Verlagern des Schedulings in die Software ● Einführung von „dynamischem Scheduling“ ● Erweiterte Fehlertoleranz ● Lastverteilung ● ... weniger Administration nötig ... AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger statisch vs. dynamisch „In the classic backup scheme you said: I want to have incremental backups from Mo-Th and a full backup on Fr. Using AMANDA you say: I want to have at least one full backup in 5 days.“ (Quelle: AMANDA-docs, TOP-TEN-QUESTIONS) AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Statisches Scheduling Festlegen von „WAS wird WANN WIE gesichert?“ z.B.: Montag bis Donnerstag: inkrementelle Backups (level 1) = Tagesbänder Freitag : volles Backup (level 0) = Wochenbänder Voraussetzungen : AMANDA - gleichbleibende Plattenbelegung - keine Fehler bei den Bandwechseln - genaue Planung durch den Administrator (manuelles Scheduling) oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Dynamisches Scheduling Das Festlegen von „Innerhalb welchen Zeitraums wird zumindest EIN volles Backup durchgeführt?“ Begriff des dumpcycle: Zeitraum, in dem zumindest EIN volles Backup durchgeführt werden muß. „amanda will do a level 0 on everything in the disklist "at some time during the dumpcycle days specified".“ - Gene Heskett. AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Scheduling-Parameter Vorgaben: dumpcycles, allgemein oder pro DLE. ● Grösse des Zielmediums. ● Anzahl der verfügbaren Medien. ● Aktuelle Belegung der DLEs (estimate-Lauf). ● Statistik (der erfolgten Läufe): Wie stark liessen sich die DLEs komprimieren? ● Veränderung der DLE-Belegungen. ● Füllgrad der Medien. ● AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Konfigurationsdateien Organisation in Konfigurationen, jede enthält: ● amanda.conf Legt Geräte, Verzeichnisse, und dumptypes fest. ● disklist Liste der zu sichernden DLEs. ● tapelist Liste der tapes in der Rotation. Von AMANDA geführt. AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger disklist Liste der zu sichernden Partitionen und Verzeichnisse. Format: hostname diskname [ diskdevice ] dumptype [ spindle [ interface ] ] z.B.: myhost testbox oops1 AMANDA /home hda3 //oops2/Daten root-tar comp-root-tar nt-tar 1 2 3 # Verzeichnis # Partition # SMB-Freigabe oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger dumptype Jeder Eintrag in der disklist verweist auf einen dumptype. Der dumptype definiert: index compression dumpcycle holdingdisk excludes priority ...etc... AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger dumptypes define dumptype always-full { comment "Dieses filesystem immer komplett sichern" compress none priority high dumpcycle 0 } define dumptype root-tar { program "GNUTAR" comment "Sichern von root-Partitionen mit tar" compress none index yes exclude list "/usr/local/lib/amanda/exclude.gtar" priority low dumpcycle 5 } AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Ablauf amlabel kennzeichnet Bänder und fügt sie der tapelist hinzu. amcheck prüft auf Durchführbarkeit. amdump: estimate-Läufe stellen Belegungen fest, Grössen von lev0, lev1, ... planner erstellt den Tagesplan dumper-Prozesse lesen Daten parallel ein, schreiben auf holdingdisk taper-Prozess schreibt von holdingdisk auf tape report-mail an admin Bei falschem/geschütztem Tape: degraded mode : nur lev1 auf holdingdisk amflush leert holdingdisk auf tape AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Optimieren ● holdingdisk Parallele dumps (Geschwindigkeit) Schonung der Hardware (kein Stop-Rewind-Go ...) Fehlertoleranz (amflush, autoflush) ● compression Wahlweise auf Server oder Client ● balance Gleichbleibende Auslastung der tapes Gleichbleibende Backup-Dauer AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger NEU: Dokumentation Vollständige Dokumentation liegt nun in Docbook/XML vor (inklusive manpages). ● Verschiedenste Ausgabeformate einfach generierbar: txt, ps, pdf, plucker, html, man, tex, ... ● Die Dokumentation wird komplett überholt, aktualisiert und erweitert. ● Update des Kapitels in „Unix Backup & Recovery“ (O'Reilly). ● Auf http://www.amanda.org/docs : html-, ps-, pdf-Versionen AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger NEU: AMANDA 2.4.5 ● Estimates : CLIENT, CALCSIZE, SERVER ● Docbook/XML - Dokumentation. ● Verfeinertes Bumping: Settings per DLE , neue Parameter ● Amoverview --skipmissed ● Parameter displayunit (für Reports etc.) ● Autoflush während estimate (Beschleunigung ...) ● .... many other small fixes .... AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Ressourcen ● http://www.amanda.org ● AMANDA FAQ-O-Matic ● mailinglist mailto://[email protected] ● O'Reilly's „Unix Backup & Recovery“ von W. Curtis Preston (ISBN: 1565926420), enthält ein Kapitel über AMANDA, geschrieben von John R. Jackson, core-member. AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger [email protected] >Thanks for all the answers, it's one of the most >quickly responding lists I ever saw !“ >This is one of the most information rich and forgiving >lists I've ever seen, and I've been subscribing to >mailing lists of all kinds since 1987.“ AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger oops! stefan g. weichinger - linux consulting & implementation [email protected] - www.oops.co.at AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Begriffe level-0-backup ... full backup Sichern ALLER Dateien der DLE. level-1-backup, level-2- ... level-n ... incremental backup Sichern aller veränderten Dateien seit letztem level(n-1)-backup. (level-1 sichert alle veränderten Dateien seit letztem level-0). DLE ... DiskList Entry Eintrag in der Datei disklist, kann Partition oder Verzeichnis sein. AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger Bestandteile amlabel amcheck amdump amflush amcleanup amadmin amoverview amplot amrecover amrestore ... AMANDA labeln von Tapes Prüflauf Sichern Transfer holdingdisk auf Tape Bereinigen Administration Übersicht über erfolgte Läufe Grafische Auswertung für Tuning Wiederherstellung mit Index-DB Wiederherstellung oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger These dumps were to tape daily09. The next tape Amanda expects to use is: daily10. STATISTICS: Total -------Estimate Time (hrs:min) 0:01 Run Time (hrs:min) 1:10 Dump Time (hrs:min) 0:20 Output Size (meg) 4666.9 Original Size (meg) 4666.9 Avg Compressed Size (%) -Filesystems Dumped 25 Avg Dump Rate (k/s) 4030.0 Tape Time (hrs:min) Tape Size (meg) Tape Used (%) Filesystems Taped Avg Tp Write Rate (k/s) USAGE BY TAPE: Label daily09 Time 1:00 1:00 4666.9 39.8 25 1322.2 Size 4666.9 Full -------- Daily -------- 0:18 4466.7 4466.7 -2 4309.4 0:02 200.2 200.2 -23 1646.9 0:57 4466.7 38.1 2 1332.1 0:03 200.2 1.8 23 1134.8 % 39.8 (level:#disks ...) (1:23) (level:#disks ...) (1:23) Nb 25 [...] DUMP SUMMARY: DUMPER STATS TAPER STATS HOSTNAME DISK L ORIG-KB OUT-KB COMP% MMM:SS KB/s MMM:SS KB/s ------------------------------- ------------------------------------- ------------backup -erver/Daten/-1989 1 40 40 -0:01 32.7 0:01 30.3 [...] backup -server/Daten/1999 1 4600 4600 -0:09 498.6 0:04 1075.1 backup -server/Daten/2000 1 7360 7360 -0:08 895.6 0:05 1602.8 backup -server/Daten/2001 0 1535820 1535820 -5:42 4491.0 18:02 1419.1 backup -server/Daten/2002 0 3038130 3038130 -11:59 4223.1 39:11 1292.0 backup -server/Daten/2003 1 4950 4950 -0:07 752.4 0:04 1249.0 backup -server/Daten/2004 1 1700 1700 -0:02 1008.6 0:02 705.2 backup -Daten/Allgemeines 1 680 680 -0:01 548.0 0:02 426.1 [...] (brought to you by oops! using Amanda version 2.4.4p2) AMANDA oops! linux consulting & implementation - www.oops.co.at - Stefan G. Weichinger