Skip to content

restore data question #313

Open
Open
@yangzan66

Description

@yangzan66

when I restore the configRS ,why it reports the error?
mongorestore --host 172.17.11.218 --port 27017 --oplogReplay --gzip --dir /mongobackup/172.17.11.218/default/latest/configRS/dump/
2019-05-29T15:04:05.582+0800 preparing collections to restore from
2019-05-29T15:04:05.583+0800 Failed: cannot do a full restore on a sharded system - remove the 'config' directory from the dump directory first

how shoud I do when restore the data to a exist target mongo cluster? do I need to do the 4 command step by step as follows? if the target cluster has other data,does this have an effect?
thank you !
mongorestore --host 172.17.11.218 --port 27017 --oplogReplay --gzip --drop --dir /mongobackup/172.17.11.218/default/latest/configRS/dump/
mongorestore --host 172.17.11.218 --port 27017 --oplogReplay --gzip --drop --dir /mongobackup/172.17.11.218/default/latest/shard1/dump/ >> ${logFile} 2>&1
mongorestore --host 172.17.11.218 --port 27017 --oplogReplay --gzip --drop --dir /mongobackup/172.17.11.218/default/latest/shard2/dump/ >> ${logFile} 2>&1
mongorestore --host 172.17.11.218 --port 27017 --oplogReplay --gzip --drop --dir /mongobackup/172.17.11.218/default/latest/shard3/dump/ >> ${logFile} 2>&1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions