Conversation
vsellier
suggested changes
Mar 7, 2019
Contributor
vsellier
left a comment
There was a problem hiding this comment.
- This should be placed on a
backupdirectory, not directly undersrv/bin - The elasticsearch directory backup is missing
srv/exo/bin/_setenv.sh
Outdated
| EXO_MONGO_SERVER=${MONGO_SERVER} | ||
| EXO_USER=exo | ||
| #Database Backup | ||
| DB_DUMP_WORKING_DIR=/srv/backup |
Contributor
There was a problem hiding this comment.
You should not work directly on the final backup directory because you will erase the previous backup at the beginning. If several services are on the same server the last backuped service will erase the other service backup
srv/exo/bin/_stopElasticSearch.sh
Outdated
| ACTION=stop | ||
| sudo systemctl ${ACTION} elasticsearch | ||
| else | ||
| echo "[WARN] $(display_date) ElasticSearch not deployed. Cannot be stopped !!!" |
| pgrep -U $(id -u) soffice | xargs kill -9 | ||
| fi | ||
| else | ||
| echo "[WARN] ${PLF_NAME} not deployed. Cannot be stopped !!!" |
Co-Authored-By: bourasom <omar.bouras@exoplatform.com>
Co-Authored-By: bourasom <omar.bouras@exoplatform.com>
Co-Authored-By: bourasom <omar.bouras@exoplatform.com>
Co-Authored-By: bourasom <omar.bouras@exoplatform.com>
vsellier
suggested changes
Apr 8, 2019
Contributor
vsellier
left a comment
There was a problem hiding this comment.
- You should centralize the systemd services start and stop in a generic management script to have the same controls (service declaration, command and service status) for all of them
| @@ -0,0 +1,20 @@ | |||
| #!/bin/bash -eu | |||
Contributor
There was a problem hiding this comment.
Should be name _startDatabase.sh
|
|
||
| display_time mongodump -o ${BACKUP_WORKING_DIR}/tmp_mongo --db=${EXO_CHAT_MONGODB_NAME} | ||
| #display_time sudo chown -R exo:exo ${BACKUP_WORKING_DIR}/tmp_mongo | ||
|
|
Contributor
There was a problem hiding this comment.
You should create an tar of the backuped data and cleanup the wordking dir after
Member
Author
Done |
vsellier
reviewed
Apr 11, 2019
added 3 commits
April 11, 2019 20:01
- centralize the service detection on _functions.sh - Remove an unnecessary variable containing the action - Don't stop anymore tomcat if an error is detected during the startup - Rename _*PLF.sh _*eXo.sh
added 4 commits
April 12, 2019 00:48
- ensure we go back to the initial directory at the end - ensure the backup is made from the n-1 level and don't assume the data dir is name data
- use elasticsearch instead of elastic - respect the full path for the backup
- Rename database name paramter - Rename finale dump to respect usual template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.