Version 4


    This document outlines the process and steps for On-Premise customers to perform a data refresh from a Production instance to a UAT instance. Please note that this will remove any existing data in UAT.

    Disclaimer: This document is for guidance purposes only. The procedure outline was designed around the Jive-Hosting infrastructure. A technical evaluation of this process should be performed prior to engaging in the activity, to address any system configuration differences. This is not a Jive Supported process but we will try to answer questions as we can. If you modify the process to fit your needs, please keep this document updated to aid us in assisting you.



    This has been tested and confirmed on Jive version 4.0-7.0 and should work on any environment using Postgres. Communities running 4.0-4-5 do not have an EAE database, so the steps regarding EAE can be ignored.


    This process is based on the following assumptions:

    • Using postgres.
    • You have access to all required systems, including SSH access to all servers.
    • There is enough space for the database dumps and data backups.
    • The mounts of Jive binstore and temporary directories are generic to Jive.
      • Please make sure to use your equivalent directories.


    This outline includes a Task # column so that you can can assign a numbering system that will work for your team. You can use this to assign tasks and track progress when performing this process. The Notes column is intended for you to make any notes about a particular step that are specific to your community. We recommend copying this document into your own community so that you can interact with it internally.


    Please note that the examples in the process below use 'acme' as the instance name; this would need to be replaced with your instance name.


    Task #

    Manual Process


    Special Considerations & Preparation

    • Static Content
      • If this exists, it is usually loaded in /usr/local/jive/var/www/___sbsstatic___ , but please substitute this with the correct location (if required) for the the instance being refreshed. The location will almost never be different.
    • Apache Configurations
      • These are not included in this process.
    • Avatars and Status Level Icons
      • These are normally located in one or both of these places:
        • /usr/local/jive/applications/acme/www/images
        • /usr/local/jive/var/www/resources/images/status
      • Please make sure that when doing a refresh that they are located in the second place.  The first place has significant limitations and problems associated with it.
    • SAML settings on the UAT Webapp
      • Only needed if you are using SAML.
    $ mkdir /mnt/jive_temp/samlbackup/
    $ find /mnt/jive_binstore/jiveSBS/ -name *lmas* -exec cp {} /mnt/jive_temp/samlbackup/ \;

    Production Instance Data Capture

    The scripts below need to be populated with the following where called out:

    • DATE = The current date of your backup
    • INST = The name of the database

    Log onto the first webapp node and proceed as follows:

    $ sudo su - jive
    $ export DATE="current_date"
    $ export INST="acme"
    $ mkdir /mnt/jive_temp/refresh$DATE && mkdir /mnt/jive_temp/refresh$DATE/static && mkdir /mnt/jive_temp/refresh$DATE/images
    $ cd /mnt/jive_temp/refresh$DATE
    $ tar czf static/ -C ~/var/www/___sbsstatic___ .
    $ tar czf images/ -C ~/applications/$INST/www/images .


    Log onto the database server and proceed as follows:

    $ sudo su - jive
    $ export DATE="current_date"
    $ export INST="acme"
    $ mkdir /mnt/jive_temp/refresh$DATE
    $ cd !$
    $ pg_dump -v -O -U postgres -Fc -f $INST'_'$DATE.dmp $INST
    $ pg_dump -v -O -U postgres -Fc -f $INST'_analytics_'$DATE.dmp $INST'_analytics' -p 5434


    Log onto the EAE Database server and proceed as follows:

    $ sudo su - jive
    $ export DATE="current_date"
    $ export INST="acme"
    $ mkdir /mnt/jive_temp/refresh$DATE
    $ cd !$
    $ pg_dump -v -O -U postgres -Fc -f $INST'_eae_'$DATE.dmp $INST'_eae' -p 5433

    UAT Instance Data Capture

    • This step is for Backup purposes only (Backup of UAT prior to the refresh).
    • Follow the same steps from the Production data capture section, with the following difference: Instead of using the Production names, you will be using the UAT names. (eg, acme is now acmeuat)

    Stop the UAT instance

    Once the UAT data has been captured, then:

    1. Stop the UAT instance.
      • You can manually stop the application by logging into each webapp node and running the command "appstop".
    2. You will also want to stop the cache and eae services.

    Transfer the backup data from Production to UAT

    Copy the gzipped tar balls and database dumps to the relevant areas on the UAT environment.

    Binstore Sync

    You will want to copy the binstore from Production to UAT.

    • Note: This will depend on how your network is setup.

    Log into the Source 
    $ cd /mnt/jive_binstore/jiveSBS 
    $ rsync -arvht --progress --delete /mnt/jive_binstore/jiveSBS/* destination.server:/mnt/jive_binstore/jiveSBS/ 
    The --delete option is used for deleting new files not found on the source from the destination server. Use it if you want to make sure all binary data on the destination server is to be exactly like the source.

    SAML/SSO Key

    In general, the database dump is not taken at the exact moment the filesystem binary storage is copied over (usually this is not possible due to a somewhat large amount of binary content).

    1. If you saved the SSO key as noted above, restore it now.
    2. After the binstore rsync, restore the file pairs (.key and .bin) matching their first 3 letters/numbers in the binstore directory structure.
      • cp /mnt/jive_temp/samlbackup/erotsyek64lmas.* /mnt/jive_binstore/jiveSBS/e/r/o/
        cp /mnt/jive_temp/samlbackup/213386333533154atadatem64pdi64lmas.* /mnt/jive_binstore/jiveSBS/2/1/3/  

    Refreshing Static Data

    If you have any static data in Production, you will want to replicate it in UAT.

    • Regular locations of static data in the default Jive build:
      • /usr/local/jive/var/www/___sbsstatic___/*
      • /usr/local/jive/var/www/resources/*

    Refreshing Databases

    1. Log into the UAT database server.
    2. Retrieve the script from the attachment on this document
    3. RSYNC to UAT DB then give it appropriate privileges via:
      • $ sudo chmod 775
    4. Take a backup of the UAT database before continuing.
      • $ cd /mnt/jive_temp/refresh$DATE
        $ pg_dump -Fc -U postgres -Z4 <uat_databasename> -f <uat_databasename>.dmp
    5. Next, run the getprops script to save the UAT specific properties:
      • $ pwd
        $ /mnt/jive_temp/refresh$DATE
        $ vi
        $ chmod 775
        $ ./ <databasename>  
    6. Next, refresh the databases. The following commands will be repeated for Application, Analaytics and EAE databases:
      • $ pwd  
        $ /mnt/jive_temp/refresh$DATE
        $ dropdb -U postgres <databasename>
        $ createdb -U postgres  <databasename> -E UTF-8 -O  <databasename>  
        $ createlang -U  <databasename> -d  <databasename> plpgsql 
        $ pg_restore -U  <databasename> -O -d  <databasename> <databasename>.dmp  
    7. Once this is complete, check that the correct cache server is listed.
    8. Now you will want to restore the properties of UAT into the refreshed database via:
      • $ psql -U postgres -d $INST < post_copy.sql

    Datebase Default Ports

    Jive uses the noted ports for the following databases:

    • System: 5432
    • Analytics: 5434
    • EAE: 5433

    For example, to recreate the Analytics database, please use the appropriate port:

    createdb -U postgres -p 5434 $INST_uat_analytics -E UTF -8 -O $INST_uat_analytics  


    Compare Source and Destination Jive Properties table

    To confirm the success of the application DB restore, compare the jiveproperty table of the source and destination.

    • All properties should not match.
    • Make sure the EAE, Analytics, and webapp nodes are correct for the respective installation.


    To take a dump of the jiveproperty table:

    pg_dump -U postgres -O -v --inserts --table jiveproperty DATABASE -f file1.sql


    The following grep will grab the pertinent rows of the dumps:

    • Note: All 3 lines are one long command - it's simply broken up to fit in this doc
    grep 'cache.clustering.enabled\|jiveInstanceId\|jiveReportingInstanceId\|jiveURL\|jive.cluster.jgroup.servers.address\|jive.cache.voldemort.servers.address\|\
    |master\|saml.\|bobj\|sharepoint\|jms\|twitter\|outlook.mail.alias\|\|jive.auth.forceSecure\|saml.keystore.password' file1.sql file2.sql

    Restart UAT

    To put the above changes into effect, perform a full restart of the UAT instance.

    • You can manually start the application by logging into each webapp node and running the command "appstart".
    • You will also want to start the cache and EAE services.

    Clearing the filesystem cache

    Run this on each webapp:

    $ sudo su - jive
    $ rm -rf /usr/local/jive/var/work/<installationname>
    $ cd /usr/local/jive/applications/<installationname>
    $ sudo rm -f home/attachments/*.txt
    $ sudo rm -f home/attachments/cache/*
    $ sudo rm -f home/images/*.bin
    $ sudo rm -f home/images/cache/*
    $ sudo rm -f home/documents/*
    $ sudo rm -f home/documents/cache/*
    $ sudo rm -f home/cache/jiveSBS/*
    $ sudo rm -rf home/jms/*

    Refreshing Themes and Plugins

    You can redeploy to your UAT the themes and plugins that you have deployed to your Production environment.

    Post-Refresh Checks

    Verify the following:

    1. The Cache and Cluster settings are correct.
    2. Analytics is configured correctly.
    3. The correct theme is in use.
    4. Rebuild the Content and user Search Indexes.
      • Note: The Content Index rebuild starts automatically for 5x+ instances.
    5. The Recommender (EAE) is working.


    If the Recommender does not start:

    These are the directions in the sbs.out log when the error occurs.

    1. On the main database server, connect to the database and proceed as follows :
      • delete from jiveproperty where name = 'jive.master.eae.key.node';  
        delete from jiveproperty where name = 'jive.master.encryption.key.node';
    2. Stop all webapp nodes, and run the following on each one and restart:
      • $ cd ~jive/applications/<installationname>/home/crypto/ 
        $ rm -f default* eae*