mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Remove '--database=neo4j' and '--expand-commands' from all the database commands
This commit is contained in:
parent
af1de3d4a2
commit
0b8407ccff
@ -30,7 +30,7 @@ ${SCRIPT_DIR}/cluster.neo4j.sh maintenance on
|
||||
echo "Dumping database ..."
|
||||
kubectl --kubeconfig=${KUBECONFIG} -n default exec -it \
|
||||
$(kubectl --kubeconfig=${KUBECONFIG} -n default get pods | grep ocelot-neo4j | awk '{ print $1 }') \
|
||||
-- neo4j-admin dump --database=neo4j --to=/var/lib/neo4j/$BACKUP_DATE-neo4j-dump
|
||||
-- neo4j-admin dump --to=/var/lib/neo4j/$BACKUP_DATE-neo4j-dump
|
||||
# copy neo4j backup to local drive
|
||||
echo "Coping database ..."
|
||||
kubectl --kubeconfig=${KUBECONFIG} cp \
|
||||
|
||||
@ -137,7 +137,7 @@ $ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-neo4j
|
||||
# bash: enter bash of Neo4j
|
||||
$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-neo4j | awk '{ print $1 }') -- bash
|
||||
# generate Dump
|
||||
neo4j% neo4j-admin dump --database=neo4j --to=/var/lib/neo4j/$(date +%F)-neo4j-dump
|
||||
neo4j% neo4j-admin dump --to=/var/lib/neo4j/$(date +%F)-neo4j-dump
|
||||
# exit bash
|
||||
neo4j% exit
|
||||
|
||||
@ -145,6 +145,8 @@ neo4j% exit
|
||||
$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-neo4j | awk '{ print $1 }') -- ls
|
||||
```
|
||||
|
||||
If you need a specific database name, add the option `--database=<name>` to the command `neo4j-admin dump`.
|
||||
|
||||
Lets copy the dump backup
|
||||
|
||||
```bash
|
||||
|
||||
@ -67,7 +67,7 @@ To create a dump in Neo4j running in a Docker container:
|
||||
# connect to the Docker containers Neo4j terminal
|
||||
$ docker exec -it neo4j bash
|
||||
# generate Dump
|
||||
neo4j% neo4j-admin dump --database=neo4j --to=/var/lib/neo4j/$(date +%F)-neo4j-dump
|
||||
neo4j% neo4j-admin dump --to=/var/lib/neo4j/$(date +%F)-neo4j-dump
|
||||
# exit bash
|
||||
neo4j% exit
|
||||
# copy the dump out of the running Docker container
|
||||
@ -89,7 +89,7 @@ $ docker cp <local-folder-path>/neo4j-dump <docker-image-name('neo4j')>:/var/lib
|
||||
# connect to the Docker containers Neo4j terminal
|
||||
$ docker exec -it neo4j bash
|
||||
# to load the dump into the database we need the following command in this terminal
|
||||
neo4j% neo4j-admin load --expand-commands --database=neo4j --from /var/lib/neo4j/$(date +%F)-neo4j-dump --force
|
||||
neo4j% neo4j-admin load --from /var/lib/neo4j/$(date +%F)-neo4j-dump --force
|
||||
# leave the terminal by entering
|
||||
neo4j% exit
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user