Backups - AIX
Sauvegarde du système
mksysb
La méthode habituelle sous AIX pour faire une sauvegarde du système est "mksysb". Cette commande sauvegarde le volume group "rootvg", qui contient les partitions système. On peut soit le lancer en ligne de commande, soit avec un menu interractif en passant par smitty.
mksysb en ligne de commande
Taper la commande :
mksysb -i /dev/rmt0 2> /tmp/mksysb.err
Et c'est tout.
Infos sur l'option "-i" : Calls the mkszfile command, which generates the /image.data file. The /image.data file contains information on volume groups, logical volumes, file systems, paging space, and physical volumes. This information is included in the backup for future use by the installation process. Note: Before running the mkszfile command, ensure that enough space is available in the /tmp file to store a boot image. This space is needed during both backup and installation.
Exemple de résultat :
<uirgs36-root- /home/root > mksysb -i /dev/rmt0 2> /tmp/mksysb.err Creating information file (/image.data) for rootvg. Creating tape boot image....... Creating list of files to back up.. Backing up 82530 files.............................. 29028 of 82530 files (35%).............................. 57826 of 82530 files (70%).............................. 76559 of 82530 files (92%)..... 82530 of 82530 files (100%)0512-038 mksysb: Backup Completed Successfully. <uirgs36-root- /home/root >
Quand c'est fini, vérifier dans /tmp/mksysb.err s'il y a des erreurs, et éjecter manuellement la bande.
mksysb depuis smitty
Taper la commande :
smitty mksysb
Exemple :
<uirgs36-root- /home/root > smitty mksysb Back Up the System Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] WARNING: Execution of the mksysb command will result in the loss of all material previously stored on the selected output medium. This command backs up only rootvg volume group. * Backup DEVICE or FILE [/dev/rmt0] +/ Create MAP files? no + EXCLUDE files? no + List files as they are backed up? no + Verify readability if tape device? no + Generate new /image.data file? yes + EXPAND /tmp if needed? yes + Disable software packing of backup? no + Backup extended attributes? yes + Number of BLOCKS to write in a single output [] # (Leave blank to use a system default) F1=Help F2=Refresh F3=Cancel F4=List F5=Reset F6=Command F7=Edit F8=Image F9=Shell F10=Exit Enter=Do
Se placer sur la ligne "Backup DEVICE or FILE" et taper F4 pour choisir le lecteur. Se placer sur la ligne "EXPAND /tmp if needed?" et appuyer sur Tabulation pour mettre à "yes". Laisser les autres options par défaut et valider (appuyer sur Entrée).
Exemple de résultat :
COMMAND STATUS Command: OK stdout: yes stderr: no Before command completion, additional instructions may appear below. Creating information file (/image.data) for rootvg. Creating tape boot image..... bosboot: Boot image is 39074 512 byte blocks. Creating list of files to back up.. Backing up 82530 files.............................. 29085 of 82530 files (35%).............................. 68279 of 82530 files (82%)............................ 82530 of 82530 files (100%)0512-038 mksysb: Backup Completed Successfully. bosboot: Boot image is 39074 512 byte blocks. F1=Help F2=Refresh F3=Cancel F6=Command F8=Image F9=Shell F10=Exit /=Find n=Find Next
Quand c'est fini, quitter avec F10 et éjecter manuellement la bande.
Sauvegarde des données
Comme on vient de le voir, mksysb sauvegarde le volume group "rootvg", qui contient les partitions système. Nous allons donc voir ici comment sauvegarder les autres volumes group sur bande.
Pour voir la liste des volumes group existant :
<uirgs36-root- /home/root > lsvg rootvg datavg
On voit qu'il n'existe qu'un seul autre volume goup : "datavg".
savevg en ligne de commande
Pour sauvegarder "datavg", taper la commande :
savevg -f'/dev/rmt0' -i datavg
Exemple :
<uirgs36-root- /home/root > savevg -f'/dev/rmt0' -i datavg Creating information file for volume group datavg. Creating list of files to back up............................................ Backing up 1891640 files.............................. 26952 of 1891640 files (1%).............................. 56212 of 1891640 files (2%).............................. 69493 of 1891640 files (3%).............................. 109077 of 1891640 files (5%).............................. 121746 of 1891640 files (6%).............................. 329339 of 1891640 files (17%).............................. 339203 of 1891640 files (17%).............................. 354071 of 1891640 files (18%).............................. 356221 of 1891640 files (18%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............................. 520302 of 1891640 files (27%).............. 1891640 of 1891640 files (100%)0512-038 savevg: Backup Completed Successfully. <uirgs36-root- /home/root >
savevg avec smitty
Taper la commande :
smitty savevg
Exemple :
<uirgs36-root- /home/root > smitty savevg Back Up a Volume Group to Tape/File Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] WARNING: Execution of the savevg command will result in the loss of all material previously stored on the selected output medium. * Backup DEVICE or FILE [/dev/rmt0] +/ * VOLUME GROUP to back up [datavg] + List files as they are backed up? no + Generate new vg.data file? yes + Create MAP files? no + EXCLUDE files? yes + EXPAND /tmp if needed? no + Disable software packing of backup? no + Backup extended attributes? yes + Number of BLOCKS to write in a single output [] # (Leave blank to use a system default) Verify readability if tape device? no + Back up Volume Group information files only? no + F1=Help F2=Refresh F3=Cancel F4=List F5=Reset F6=Command F7=Edit F8=Image F9=Shell F10=Exit Enter=Do
Se placer sur la ligne "Backup DEVICE or FILE" et taper F4 pour choisir le lecteur. Se placer sur la ligne "VOLUME GROUP to back up" et taper F4 pour choisir le vg à sauvegarder. Se placer sur la ligne "EXPAND /tmp if needed?" et appuyer sur Tabulation pour mettre à "yes". Laisser les autres options par défaut et valider (appuyer sur Entrée).
Exemple de résultat : COMMAND STATUS Command: OK stdout: yes stderr: no Before command completion, additional instructions may appear below. [TOP] Creating information file for volume group datavg. Creating list of files to back up........................................... Backing up 1891640 files.............................. 27162 of 1891640 files (1%).............................. 58047 of 1891640 files (3%).............................. 76353 of 1891640 files (4%).............................. 109297 of 1891640 files (5%).............................. 122083 of 1891640 files (6%).............................. 329339 of 1891640 files (17%).............................. 339203 of 1891640 files (17%).............................. 354071 of 1891640 files (18%).............................. 359899 of 1891640 files (19%).............................. 545116 of 1891640 files (28%).............................. 545116 of 1891640 files (28%).............................. [MORE...27] F1=Help F2=Refresh F3=Cancel F6=Command F8=Image F9=Shell F10=Exit /=Find n=Find Next