Comments (4)
That's an interesting problem @yangzan66. Could you provide the full output of mongorestore --version
?
It may be possible to work around this by doing a single-database restore passing --db=config
to mongorestore (instead of an "all" databases restore). Config servers should only have that single-database anyways.
from mongodb_consistent_backup.
Hello,
thanks for you reply. the source mongo cluster and the target mongo cluster are the same one. is it the reason?
must I restore the data to a new cluster?
I really want to restore only one database, but it alway report that it's conflict with --oplogReplay .
[root@dbsrvm-mongobackup latest]# mongorestore --host 172.17.11.218 --port 27017 --oplogReplay --db=config --gzip --dir /mongobackup/172.17.11.218/default/latest/configRS/dump/
2019-05-29T18:30:32.698+0800 the --db and --collection args should only be used when restoring from a BSON file. Other uses are deprecated and will not exist in the future; use --nsInclude instead
2019-05-29T18:30:32.698+0800 Failed: cannot use --oplogReplay with includes specified
[root@dbsrvm-mongobackup latest]# mongorestore --version
mongorestore version: r3.4.19
git version: a2d97db8fe449d15eb8e275bbf318491781472bf
Go version: go1.10.7
os: linux
arch: amd64
compiler: gc
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
[root@dbsrvm-mongobackup latest]#
from mongodb_consistent_backup.
@timvaillancourt
besides above,my mongo version is 3.4.19
[root@dbsrvm-mongotest03 pkg]# mongo --version
MongoDB shell version v3.4.19
git version: a2d97db8fe449d15eb8e275bbf318491781472bf
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: none
build environment:
distmod: rhel70
distarch: x86_64
target_arch: x86_64
[root@dbsrvm-mongotest03 pkg]#
from mongodb_consistent_backup.
###I create a new mongo cluster(172.17.1.88) as the target cluster, but the problem are the same.
[root@dbsrvm-mongobackup mongobackup]# mongorestore --host 172.17.1.88 --port 27017 --oplogReplay --gzip --dir /mongobackup/172.17.11.218/default/latest/configRS/dump/
2019-05-30T09:28:50.379+0800 preparing collections to restore from
2019-05-30T09:28:50.379+0800 Failed: cannot do a full restore on a sharded system - remove the 'config' directory from the dump directory first
[root@dbsrvm-mongobackup mongobackup]#
###if add --db option:
[root@dbsrvm-mongobackup mongobackup]# mongorestore --host 172.17.1.88 --port 27017 --oplogReplay --db=config --gzip --dir /mongobackup/172.17.11.218/default/latest/configRS/dump/
2019-05-30T09:31:15.841+0800 the --db and --collection args should only be used when restoring from a BSON file. Other uses are deprecated and will not exist in the future; use --nsInclude instead
2019-05-30T09:31:15.841+0800 Failed: cannot use --oplogReplay with includes specified
###when I only restore the shard1, it reports error " applyOps not allowed through mongos",as follows:
mongorestore --host 172.17.1.88 --port 27017 --oplogReplay --gzip --dir /mongobackup/172.17.11.218/default/latest/shard1/dump/
2019-05-30T18:18:27.924+0800 [########################] test1.person2 454MB/454MB (100.0%)
2019-05-30T18:18:27.924+0800 no indexes to restore
2019-05-30T18:18:27.924+0800 finished restoring test1.person2 (50256414 documents)
2019-05-30T18:18:27.924+0800 replaying oplog
2019-05-30T18:18:27.957+0800 Failed: restore error: error applying oplog: applyOps: applyOps not allowed through mongos
###is that what I did wrong? the culster doesn't uses Authentication, my backup command and config file as follows:
mongodb-consistent-backup -H 172.17.11.218 --config /etc/mongodb-consistent-backup.conf
[root@dbsrvm-mongobackup mongobackup]# grep -v "#" /etc/mongodb-consistent-backup.conf
production:
port: 27017
log_dir: /var/log/mongodb-consistent-backup
backup:
method: mongodump
name: default
location: /mongobackup/172.17.11.218/
archive:
method: tar
notify:
method: none
upload:
method: none
[root@dbsrvm-mongobackup mongobackup]#
could you give some advice? thank you very much
from mongodb_consistent_backup.
Related Issues (20)
- Upload Rsync prepare_dest_dir prepares wrong location
- Tailer csReplSet/ra1svlrp4i:27019 received NetworkTimeout exception: ra1svlrp4k:27019: timed out. Attempting retry HOT 3
- Encryption for zbackup failed when there is existing encrypted zbackup folder
- Urgent: Oplog Resolver Intermittently doesn't Complete Resolving HOT 4
- New Bugfix Release HOT 4
- Backup failed: Could not acquire lock on file: /var/lib/.../mongodb-consistent-backup_META.lock HOT 2
- cannot dump with oplog if admin.system.version is modified HOT 3
- docker install problem HOT 1
- get CRITICAL error
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5: ordinal not in range(128) HOT 1
- Mongodump problem with large deployments HOT 1
- [v1.4.1] Backup to s3 not read from config file HOT 2
- can we backup two mongo cluster at the same time? HOT 1
- Unrecognized field snapshot HOT 4
- error reading oplog bson input: unexpected EOF
- the mongodb-consistent-backup is blocked
- Failed to execute PEX file, missing linux_x86_64-cp-27-cp27mu compatible dependencies for:
- Failed to execute PEX file, missing linux_x86_64-cp-27-cp27mu compatible dependencies for: HOT 1
- installation with errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodb_consistent_backup.