One of my databases is unresponsive. How do I selectively backup and restore individual Planning Analytics Workspace Distributed databases?

If one of your Planning Analytics Workspace Distributed databases is unresponsive, a normal backup and restore cannot be executed. In this case, you can selectively backup and restore only the databases that are responsive.

CAUTION:
In most circumstances, backup and restore of Planning Analytics Workspace Distributed databases should be performed using the procedures described in Back up and restore Planning Analytics Workspace Distributed. Use the selective backup and restore options only when a database is unresponsive. Using the selective options when all databases are responsive can result in unsynchronized databases and unexpected behavior.

Selectively backup databases

You can backup any of the following databases individually or in combination with other databases:

  • MongoDB (-mongo)
  • MySQL (-mysql)
  • CouchDB (-couchdb)
  • Redis (-redis)

To backup an individual database, run the backup.sh script and specify the database you want to back up.

The script creates a folder that is called backup in the current working directory and stores the backup data in a folder with a name generated based on the current date and time.

MongoDb
./backup.sh -mongo

When backup is complete, the backup folder contains a mongo.tgz archive with your backup data.

MySQL
./backup.sh -mysql

When backup is complete, the backup folder contains a mysql.tgz archive with your backup data.

CouchDB
./backup.sh -couchdb

When backup is complete, the backup folder contains a couchdb.tgz archive with your backup data.

Redis
./backup.sh -redis

When backup is complete, the backup folder contains a redis.tgz archive with your backup data.

You can also backup multiple databases simultaneously by passing multiple database parameters to the the backup.sh script. For example, use ./backup.sh -mongo -couchdb -redis to backup the MongoDB, CouchDB, and Redis databases simultaneously. The backup directory contains a separate archive for each database you backup, using the names described above.

Selectively restore databases

You can restore any of the databases individually. If multiple databases were backed up simultaneously to the same backup directory, you can also restore those multiple databases simultaneously.

To restore an individual database, run the restore.sh script and specify the database you want to back up along with the directory that contains the archive you want to restore.

MongoDb
./restore.sh -mongo <backup_dir_containing_mongo.tgz>
MySQL
./restore.sh -mysql <backup_dir_containing_mysql.tgz>
CouchDB
./restore.sh -couchdb <backup_dir_containing_couchdb.tgz>
Redis
./restore.sh -redis <backup_dir_containing_redis.tgz>
You can also restore multiple databases simultaneously if they were backed up simultaneously to the same directory by passing multiple database parameters to the restore.sh script. For example, use
./restore.sh -mongo -couchdb -redis <backup_dir_containing_tgz_archives_for_all_databases>
to restore the MongoDB, CouchDB, and Redis databases simultaneously.