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.
Selectively backup databases
You can backup any of the following databases individually or in combination with other databases:
- MongoDB (-mongo)
- MySQL (-mysql)
- 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.
- 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
-redis
to backup the MongoDB 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>
- Redis
./restore.sh -redis <backup_dir_containing_redis.tgz>
./restore.sh -mongo -redis <backup_dir_containing_tgz_archives_for_all_databases>
to restore the MongoDB and Redis databases simultaneously.