Sauvegarde de configuration d'un environement RAF.

Attention !! Seul les scopes node et dmgr sont supportés.
Si vous ne précisé pas de scope (noeud,serveur ou autre), la sauvegarde partira en échec
  • Infrastructure.

  • +------------------------------+                                        +-----------------------------+ 
    | Serveur RAFW                 |                                        | Serveur WebSphere 8.5       | 
    | Hostname : saturn            |--(installe l'environement DMGR+NODE)-->| Hostname : arecibo          | 
    | Os : Linux 2.6.32            |                                        | Os : Linux                  | 
    |                              |                                        | DMGR : areciboNetwork       | 
    |                              |                                        | NODE : areciboNode          | 
    +------------------------------+                                        +-----------------------------+ 
    
  • Création d'espace sur le serveur distant (dans notre exemple arecibo).

  • Dans la configuration de RAF nous avons défini un répertoire de travail pour les serveurs distant en fonction de leur OS.
    Ce répertoire est défini dans le fichier configure.properties du $RAFW_HOME.
    Le répertoire défini ne doit pas être plein (FS à 100%), ce qui pourrait causer des erreurs dans notre cas.
    Le répertoire RAF de la machine distante est défini dans la variable "$LINUX_RAFW_HOME=/apps/Rational/RAFW".
    root@arecibo:/ # df -P /apps/Rational/RAFW
    Filesystem         1024-blocks      Used Available Capacity Mounted on
    /dev/mapper/rootvg-apps   3612384   3428696       188     100% /apps
    root@arecibo:/apps/Rational/RAFW# lvextend -L+1G /dev/rootvg/apps
      Extending logical volume apps to 4.50 GiB
      Logical volume apps successfully resized
    root@arecibo:/ #
    root@arecibo:/ # lvextend -L+1G /dev/mapper/rootvg-apps
      Extending logical volume apps to 5.50 GiB
      Logical volume apps successfully resized
    root@arecibo:/ # resize2fs /dev/mapper/rootvg-apps
    resize2fs 1.41.12 (17-May-2010)
    Filesystem at /dev/mapper/rootvg-apps is mounted on /apps; on-line resizing required
    old desc_blocks = 1, new_desc_blocks = 1
    Performing an on-line resize of /dev/mapper/rootvg-apps to 1441792 (4k) blocks.
    The filesystem on /dev/mapper/rootvg-apps is now 1441792 blocks long.
    root@arecibo:/ # df -hP /apps/Rational/RAFW
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/rootvg-apps  5.5G  3.3G  1.9G  64% /apps
    root@arecibo:/ #
    
    
  • Lancement de la commande en omettant le scope afin de crééer une sauvegarde en échec.

  • Nous allons voir que la sauvegarde tombe en erreur, cette erreur est du à l'absence du paramétrage du scope.
    ./rafw.sh -e arecibo -c areciboNetwork -execute was_common_configure_backup_config

    root@saturn:/opt/IBM/RAFServer/rafw# /opt/IBM/RAFServer/rafw/bin/rafw.sh -e arecibo -c areciboNetwork -execute was_common_configure_backup_config
    CRWFW0026I A new run with the following ID 57pV is starting at Sep 17, 2013 10:03:10 CEST
    Rational Automation Framework version 3.0.0.5 build 20121029-1616
    Including the following modules:
         WebSphere Liberty Profile version 8.5.0.0
         Midvision Extension Module version 1.0.0.1
    
    CRWFW0104I Using the values defined for the properties OS_USER and OS_PASSWORD for the user 'was80'
    defined in the file user/environments/arecibo/cells/areciboNetwork/configure.properties
    CRWFW0103I Using the following value for OS_GROUP 'web' defined in the file
     user/environments/arecibo/cells/areciboNetwork/configure.properties
    CRWFW0015I A network connection has been made to 'arecibo'
    CRWFW0013I A list of files that are already on the target system is being created.
    Buildfile: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/build.xml
    
    default:
      [rafwlog] CRWFW0001I If an error occurs, check '/apps/Rational/RAFW//logs/arecibo/cells/areciboNetwork//was_common_configure_backup_config.log'
      [rafwlog] CRWFW0014I Beginning action was_common_configure_backup_config on host arecibo
         [echo] Apache Ant version 1.7.0 compiled on December 13 2006
    
    prepare_shell:
    
    change_directory_ownership:
    
    prepare_shell:
    
    change_directory_ownership:
    
    prepare_shell:
    
    change_directory_ownership:
    [querychangedfiles] CRWFW6009I Computing list of files modified during action execution for scope arecibo/cells/areciboNetwork
    
    BUILD FAILED
    /apps/Rational/RAFW/product/lib/core.xml:158: The following error occurred while executing this line:
    /apps/Rational/RAFW/product/lib/RAFW_lib_shared.xml:62: Action 'was_common_configure_backup_config' does not exist in the specified scope.
    
    Total time: 2 seconds
    CRWFW0059I The following file is being transferred from the target system to the framework server: logs/arecibo/cells/areciboNetwork/was_common_configure_backup_config.trace
    CRWFW0059I The following file is being transferred from the target system to the framework server: logs/arecibo/cells/areciboNetwork/was_common_configure_backup_config.log
    CRWFW7070I Disconnected from 'arecibo'
    root@saturn:/opt/IBM/RAFServer/rafw#
    
    
    
  • Relance de la sauvegarde sans erreur.

  • Après avoir fait de l'espace sur le serveur distant (dans notre exemple arecibo), nous relançons la sauvegarde en précisant le scope node cause de l'erreur.
    ./rafw.sh -e arecibo -c areciboNetwork -n areciboNode -execute was_common_configure_backup_config
    root@saturn:/opt/IBM/RAFServer/rafw/user/environments/arecibo/cells/areciboNetwork/nodes# /opt/IBM/RAFServer/rafw/bin/rafw.sh -e arecibo -c areciboNetwork -n areciboNode -execute was_common_configure_backup_config
    CRWFW0026I A new run with the following ID 57Sb is starting at Sep 17, 2013 11:40:03 CEST
    Rational Automation Framework version 3.0.0.5 build 20121029-1616
    Including the following modules:
         WebSphere Liberty Profile version 8.5.0.0
         Midvision Extension Module version 1.0.0.1
    
    CRWFW0104I Using the values defined for the properties OS_USER and OS_PASSWORD for the user 'was80'
    defined in the file user/environments/arecibo/cells/areciboNetwork/configure.properties
    CRWFW0103I Using the following value for OS_GROUP 'web' defined in the file
     user/environments/arecibo/cells/areciboNetwork/configure.properties
    CRWFW0015I A network connection has been made to 'arecibo'
    CRWFW0013I A list of files that are already on the target system is being created.
    Buildfile: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/build.xml
    
    default:
      [rafwlog] CRWFW0001I If an error occurs, check '/apps/Rational/RAFW//logs/arecibo/cells/areciboNetwork/nodes/areciboNode/was_common_configure_backup_config.log'
      [rafwlog] CRWFW0014I Beginning action was_common_configure_backup_config on host arecibo
         [echo] Apache Ant version 1.7.0 compiled on December 13 2006
    
    only_execute:
    
    scope_init:
    
    prepare_shell:
    
    decode_password:
    
    was_init:
    
    was_common_configure_backup_config:
        [mkdir] Created dir: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/backup
         [echo] Backing up profile node
    
    prepare_shell:
    
    execute:
         [echo] Working Dir: .
         [echo] /apps/WebSphere/profiles80/node/bin/backupConfig.sh /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/backup/node_20130917.zip -profileName node -logfile /apps/Rational/RAFW//logs/arecibo/cells/areciboNetwork/nodes/areciboNode/backup_config.txt -user admwas -password K3u5;mZto558 -nostop
         [exec] ADMU0116I: Tool information is being logged in file
         [exec]            /apps/Rational/RAFW/logs/arecibo/cells/areciboNetwork/nodes/areciboNode/backup_config.txt
         [exec] ADMU0128I: Starting tool with the node profile
         [exec] ADMU5001I: Backing up config directory /apps/WebSphere/profiles80/node/config
         [exec]            to file
         [exec]            /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/backup/node_20130917.zip
         [exec] ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
         [exec] ADMU5002I: 1,490 files successfully backed up
    
    prepare_shell:
    
    change_directory_ownership:
    
    prepare_shell:
    
    change_directory_ownership:
    
    prepare_shell:
    
    change_directory_ownership:
    [querychangedfiles] CRWFW6009I Computing list of files modified during action execution for scope arecibo/cells/areciboNetwork
    
    BUILD SUCCESSFUL
    Total time: 12 seconds
    CRWFW0059I The following file is being transferred from the target system to the framework server: user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/backup/node_20130917.zip
    CRWFW0059I The following file is being transferred from the target system to the framework server: logs/arecibo/cells/areciboNetwork/nodes/areciboNode/was_common_configure_backup_config.trace
    CRWFW0059I The following file is being transferred from the target system to the framework server: logs/arecibo/cells/areciboNetwork/nodes/areciboNode/was_common_configure_backup_config.log
    CRWFW0059I The following file is being transferred from the target system to the framework server: logs/arecibo/cells/areciboNetwork/nodes/areciboNode/backup_config.txt
    CRWFW7070I Disconnected from 'arecibo'
    root@saturn:/opt/IBM/RAFServer/rafw/user/environments/arecibo/cells/areciboNetwork/nodes#
    
    
  • Vérification de la sauvegarde.

  • La sauvegarde est située sur le serveur sauvegarder (dans notre exemple arecibo), mais également sur le serveur RAF (dans notre exemple saturn)
    root@arecibo:/# ls -l /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/backup/node_20130917.zip
    -rw-rw-r-- 1 was80 web 2073324 Sep 17 11:40 /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/backup/node_20130917.zip
    root@arecibo:/#
    
    root@saturn:/opt/IBM/RAFServer/rafw/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/backup# ls -lrt
    total 2032
    -rw-rw-r-- 1 root root 2073324 Sep 17 11:40 node_20130917.zip
    root@saturn:/opt/IBM/RAFServer/rafw/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/backup#
    
  • Url IBM de la documentation

  • Documentation de la commande was_common_configure_backup_config