Giter Site home page Giter Site logo

Comments (7)

33Fraise33 avatar 33Fraise33 commented on July 4, 2024

Can it be confirmed this is a bug? I don't want to put Orient to production without being sure I can restore a backup.

from orientdb-docker.

robfrank avatar robfrank commented on July 4, 2024

are you providing a volume to the container where to persist backups?

from orientdb-docker.

33Fraise33 avatar 33Fraise33 commented on July 4, 2024

Yes I am, I'm starting my docker container with ansible, my config is the following:

- name: setup orient docker container
  docker_container:
    name: orientdb
    image: orientdb:latest
    command: "/orientdb/bin/server.sh -Ddistributed=false"
    published_ports:
      - 2424:2424
      - 2480:2480
    network_mode: host
    volumes:
      - "/orientdb/config:/orientdb/config"
      - "/orientdb/databases:/orientdb/databases"
      - "/orientdb/backup:/orientdb/bin/backup"
    env:
      ORIENTDB_ROOT_PASSWORD: "<password here>"
      ORIENTDB_NODE_NAME: "{{ ansible_hostname }}"
      ORIENTDB_OPTS_MEMORY: "-Xms20G -Xmx20G"
    recreate: yes
    state: started

I had to change my mounting point for backups as the default as provided in the docs /orientdb/backup is not used for automated backups, /orientdb/bin/backup is.

from orientdb-docker.

33Fraise33 avatar 33Fraise33 commented on July 4, 2024

Any update on this? Can I provide more information?

from orientdb-docker.

33Fraise33 avatar 33Fraise33 commented on July 4, 2024

@robfrank Can I help any further with this? I'm not a docker expert but it's very odd behaviour though.

from orientdb-docker.

cuvelierm avatar cuvelierm commented on July 4, 2024

Any updates on this? I am having the same problem currently.

from orientdb-docker.

33Fraise33 avatar 33Fraise33 commented on July 4, 2024

I've been able to resolve this issue with the following commands.

To restore a backup, make sure your docker container is turned off. You will have to connect plocal to the database. Mount the volumes with the run command (as the server is not turned on you cannot use the docker exec method)

sudo docker run --rm -it -v /orientdb/databases:/orientdb/databases -v /orientdb/backup:/orientdb/bin/backup orientdb:<version tag> /orientdb/bin/console.sh

Now your container has access to the backup files while your actual container is turned off.
Connect plocal: CONNECT plocal:/orientdb/databases/<dbname>
Restore the database: RESTORE DATABASE /orientdb/bin/backup/<filename>.zip

from orientdb-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.