Skip to content

Commit

Permalink
Backup-related fixes and improvements (#83)
Browse files Browse the repository at this point in the history
* INITED was calculated wrong in the entrypoint
* we need to put both manticore.conf.sh and just manticore.conf to MANTICORE_CONFIG
  • Loading branch information
sanikolaev authored Feb 24, 2024
1 parent b695056 commit 4f0c280
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ EXPOSE 9308
EXPOSE 9312
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV MANTICORE_CONFIG="/etc/manticoresearch/manticore.conf.sh"
ENV MANTICORE_CONFIG="/etc/manticoresearch/manticore.conf.sh|/etc/manticoresearch/manticore.conf"
CMD ["searchd", "-c", "/etc/manticoresearch/manticore.conf.sh", "--nodetach"]

# How to build manually:
Expand Down
7 changes: 1 addition & 6 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,9 @@ _main() {
fi

BACKUP_INIT_FOLDER="/docker-entrypoint-initdb.d"
INITED=""
for f in /var/lib/manticore/*; do
INITED=1
break
done

if [ -f "${BACKUP_INIT_FOLDER}/versions.json" ]; then
if [ -n "$INITED" ]; then
if [ -f /var/lib/manticore/manticore.json ]; then
echo "Warning: Backup is available for restore, but it's being skipped because it's already initialized or the data directory is not empty."
else
if [ ! -s "/usr/bin/manticore-executor" ]; then
Expand Down

0 comments on commit 4f0c280

Please sign in to comment.