-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,7 @@ | ||
#!/bin/bash | ||
|
||
dt=$(date '+%Y-%m-%d_%H-%M-%S'); | ||
BACKUP_FILE="/backups/neo4j_backup_$dt.dump" | ||
|
||
echo "Backup file is: $BACKUP_FILE" | ||
|
||
mkdir -p /backups/ | ||
|
||
neo4j stop | ||
retVal=$? | ||
if [ $retVal -ne 0 ]; then | ||
echo "Failed to stop the neo4j db" | ||
exit | ||
fi | ||
|
||
neo4j-admin database dump neo4j --to-stdout > $BACKUP_FILE | ||
retVal=$? | ||
if [ $retVal -ne 0 ]; then | ||
echo "Failed to create the backup file" | ||
fi | ||
|
||
sleep 2s | ||
/startup/docker-entrypoint.sh neo4j >& /dev/null& | ||
kill -USR1 1 | ||
sleep 10 | ||
while ! neo4j status 1>&2 2>/dev/null; do | ||
echo "Waiting for neo4j to be up..." | ||
sleep 5 | ||
done |
This file contains 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