× Warning! This forum is in archival status. New contributions may not work.
backup e restore - elasticdump
  • Gentlemen,
    I am using the scripts described below to
    To back up a Moneda base from Superedesk and
    Restore on another machine,
    But Restore does not
    Is working as it should, that is,
    Restore does not update the colletions in the mongo ..

    Error Messages: Duplicate Keys

    what is missing ?

    Someone could give me some help. About this problem

    Backup Script================
    #!/bin/bash
    mongodump
    elasticdump \
    --output=/var/lib/mongodb/index_mapping.json \
    --type=mapping

    elasticdump \
    --output=/var/lib/mongodb/index_data.json \
    --type=data 


    Script do Restore
    =================
    #!/bin/bash
    mongorestore dump
    elasticdump \
    --input=/var/lib/mongodb/index_mapping.json \

    elasticdump \
    --input=/var/lib/mongodb/index_data.json

  • 2 Comments sorted by
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    Try to install another version of "mongodump"

    apt install mongodb-org-tools

    it should be something like:

    # mongodump --version
    mongodump version: r3.2.12
    git version: aa57de98d94e086fb44608a6d29ab8323613abea
    Go version: go1.7
       os: linux
       arch: amd64
       compiler: gc
    OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
  • Thanks Grisha
    I will do according to your orientation ... and as soon as I have the results, I will post it here in the forum ..