5.3 Upgrade

To upgrade Archive and Version Services to the OES 11 SP3 with PostgreSQL 9.x server, you must backup Archive database on the OES 11 SP2 server and restore the Archive database to the OES 11 SP3 server.

5.3.1 Before You Upgrade

Before you upgrade to OES 11 SP3, run the script to backup the Archive database on the OES 2 server. The user must have execute permissions to run the script. The script backs up the archive database to the /var/opt/novell/arkmanager/data/arkdatabackup.sql file.

  1. Save the following script to a file, then run the file on the terminal:

    #!/bin/bash
    set -e 
    echo 
    echo "Backing up Archive Versioning archive_database"
    echo
    
    ARKUSER=arkuser
    DATABASE=archive_database
    DATA_PATH=`cat /etc/opt/novell/arkmanager/conf/arkdatadir.conf`
    BACKUPFILE=$DATA_PATH/arkdatabackup.sql
    
    echo "Provide password for $ARKUSER"
    su $ARKUSER -c "cd /tmp; pg_dump --clean $DATABASE > $BACKUPFILE"
    

    You are prompted for the arkuser password.

    NOTE:If the arkdatabackup.sql file is empty, repeat Step 1 to generate the contents.

  2. Rename the database directory /var/opt/novell/arkmanager/data to /var/opt/novell/arkmanager/data_old.

5.3.2 Post-Upgrade

On upgrading to the OES 11 SP3 server, you must restore the Archive database for Archive and Version Service to be available. The user must have execute permissions to run the script. The script restores the archive database from the /var/opt/novell/arkmanager/data/arkdatabackup.sql file to the OES 11 SP3 server.

  1. Configure Archive Version and Services (postgresql 9.4) using the same credentials as used on the OES 11 SP3 server.

    1. Create a new database path and set arkuser as owner.

      install -d -o arkuser -m 700 /var/opt/novell/arkmanager/data
      
    2. Initialize the database using initdb.

      su arkuser -c 'cd /tmp; /usr/bin/initdb -D /var/opt/novell/arkmanager/data --pwprompt -A password'
      
    3. Start the database with the latest postgresql.

      su arkuser -c "cd /tmp; /usr/lib/postgresql94/bin/postmaster -D /var/opt/novell/arkmanager/data -h 127.0.0.1 -p 5432 -i &"
      
    4. Create a new database archive_database to restore the backup.

      su arkuser -c "cd /tmp; createdb archive_database"
      
  2. Save the following script to a file, then run the file on the terminal:

    #!/bin/bash
    set -e 
    echo 
    echo "Restoring Archive Versioning archive_database"
    echo
    
    ARKUSER=arkuser
    DATABASE=archive_database
    DATA_PATH=`cat /etc/opt/novell/arkmanager/conf/arkdatadir.conf`
    BACKUPFILE=$DATA_PATH/arkdatabackup.sql
    LOGFILE=$DATA_PATH/restorelog.txt
    PORT=543
    HOST=localhost
    
    if [ -z DATA_PATH ]
    then
      echo "Unable to locate $DATABASE location"
      exit 1;
    else
      echo "Provide password for $ARKUSER"
      su $ARKUSER -c "cd /tmp; psql -f $BACKUPFILE -d $DATABASE -h $HOST -p $PORT" >>$LOGFILE 2>&1
    fi
    

    You are prompted for the arkuser password.

    On successfully restoring the archive database, the file versions are available on the OES 11 SP3 server.

5.3.3 Caveats on Upgrading from OES 2 to OES 11 SP3

On upgrading the Archive and Version Services from the OES 2 server to OES 11 SP3 server, Archive server may fail to come up. The failure can be caused due to the following reasons:

  • The group id (gid) of both the novlxtier group (group in eDirectory tree) and the local user group (group on the local machine) are same.

  • Admin user is not listed as the part of the novlxtier group.

To resolve the group ids conflicts, perform the following steps, then restart the Archive server.

  1. To verify the groups of the admin, enter

    id admin

    For example, the output of the command is

    uid=600(admin) gid=600(admingroup) groups=600(admingroup) ,8(www) ,101(messagebus)
    

    The novlxtier group is not listed.

  2. The novlxtier gid must be 81. To verify if any object is using the same gid (81) of the novlxtier group, enter

    getent group | grep 81

  3. To change the gid of the novlxtier group to 81, enter

    namgroupmod -a adminname -w password -g 81 -o cn=novlxtier,servercontext

    On execution of the above command the gid of novlxtier group changes to 81.

    For more information on the namgroupmod utility, see namgroupmod in the OES 11 SP3: Novell Linux User Management Administration Guide.

  4. Changing the gid for novlxtier group may cause ownership issues on the files. To resolve the file ownership issues, execute the nssid.sh script.

    /opt/novell/oes-install/nssid.sh

    For more information, see The OES 1 Solution: The nssid.sh Script in the OES 11 SP3: Planning and Implementation Guide.

  5. To ensure that the admin user is part of the novlxtier group, enter

    id admin

    For example, the output of the command is

    uid=600(admin) gid=600(admingroup) groups=600(admingroup) ,8(www) ,81(novlxtier)
    

    The admin is part of the novlxtier group.

  6. To restart the Archive server, enter

    rcnovell-ark restart