UnifiedPush Server
  • Documentation
  • GitHub
  • Help

›Maintaining Unified Push

Introduction

  • Overview
  • Useful Terminology
  • Push Notifications
  • How the UnifiedPush Server works
  • Use-cases and scenarios

Running Unified Push

  • Running Unified Push
  • JMS Broker Configuration

Configuring Variants

  • Getting Started
  • Android Variant
  • iOS Variant
  • WebPush Variant

Configuring Clients

  • Android Client
  • iOS Client
  • Webpush Client
  • React Native Client
  • Cordova Client

Unified Push Server SDK

  • Java Sender API
  • Node Sender API
  • RESTful Sender API

Maintaining Unified Push

  • Maintaining Unified Push

Maintaining Unified Push

Backup

All the data required to run the UnifiedPush Server is stored inside its database instance so that's all you need to backup. Currently supported databases are:

  • PostgreSQL
  • MySQL

Since the UnifiedPush Server runs on WILDFLY we can easily get information about the database by inspecting the standalone.xml file:

UnifiedPush running in docker
UnifiedPush running standalone

If you are running UnifiedPush Server from one of the provided docker images, the server is installed into the opt folder.

To get the content of the standalone.xml file, first we need to get the docker container id, then we must ask the content of the file to docker:

CONTAINER_ID={YOUR CONTAINER ID}
READ_CONF="docker exec -it $CONTAINER_ID cat /opt/jboss/wildfly/standalone/configuration/standalone.xml"
bash -c "$READ_CONF"

The container must be up and running for this to work.
To get the CONTAINER_ID, use the docker ps command and search for the UnifiedPush container.

If you are running UnifiedPush Server standalone in your own WILDFLY instance, then we just need to jump into the WILDFLY home to read the standalone.xml file:

WILDFLY_HOME=/path/to/your/wildfly
READ_CONF="cat $WILDFLY_HOME/standalone/configuration/standalone.xml"
bash -c "$READ_CONF"
note

We assigned the command to the READ_CONF variable because it will comes handy to use it later. The command can, however, be run directly.

Now that we have the configuration file, we can get all the connection details. You can manually search for a datasource named UnifiedPushDS or you can use a tool like xmlstarlet:

  • Connection URL:
    CONNECTION_URL=`bash -c "$READ_CONF" | xmlstarlet sel -N x="urn:jboss:domain:datasources:5.0" -t -m "//x:datasource[@pool-name='UnifiedPushDS']//x:connection-url/text()" -c .`
    
  • Username:
    DB_USERNAME=`bash -c "$READ_CONF" | xmlstarlet sel -N x="urn:jboss:domain:datasources:5.0" -t -m "//x:datasource[@pool-name='UnifiedPushDS']//x:user-name/text()" -c .`
    
  • Password:
    DB_PASSWORD=`bash -c "$READ_CONF" | xmlstarlet sel -N x="urn:jboss:domain:datasources:5.0" -t -m "//x:datasource[@pool-name='UnifiedPushDS']//x:password/text()" -c .`
    

Values are now stored into the CONNECTION_URL, DB_USERNAME and DB_PASSWORD environment variables:

printf "CONNECTION_URL=$CONNECTION_URL \nUSERNAME=$DB_USERNAME \nPASSWORD=$DB_PASSWORD\n" 

For detailed instructions on how to backup the database, look at the official documentation"

  • MySQL: https://dev.mysql.com/doc/refman/8.0/en/backup-and-recovery.html
  • PostegreSQL: https://www.postgresql.org/docs/12/backup.html
← RESTful Sender API
  • Backup
Docs
Getting Started
Community
HelpAeroGear mailing listStack Overflow
Social
UnifiedPush Server
Follow @aerogears
Copyright © 2020 the AeroGear team