Removing xcatdb from PostgreSQL and restoring data into SQLite

To remove xcatdb completely from the PostgreSQL database and restore xCAT data into SQLite:

  1. Run a backup of the database to save any information that is needed:

    mkdir -p ~/xcat-dbback
    dumpxCATdb -p ~/xcat-dbback
    
  2. Stop the xcatd daemon on the management node.

    service xcatd stop

  3. Remove the xatdb from PostgreSQL:

    su - postgres
    

    drop the xcatdb:

    dropdb xcatdb
    

    remove the xcatadm database owner :

    dropuser xcatadm
    

    clean up the postgresql files (necessary if you want to re-create the database):

    cd /var/lib/pgsql/data
    rm -rf *
    exit
    
  4. Move, or remove, the /etc/xcat/cfgloc file as it points xCAT to PostgreSQL. (without this file, xCAT defaults to SQLite):

    mv /etc/xcat/cfgloc /etc/xcat/cfgloc.postgres
    
  5. Restore the PostgreSQL database into SQLite:

    XCATBYPASS=1 restorexCATdb -p ~/xcat-dbback
    
  6. Restart xcatd:

    service xcatd start