Mongodbrestore not working don't know what to do with subdirectory

2,407 views
Skip to first unread message

Idar Borlaug

unread,
Jun 17, 2016, 6:34:58 AM6/17/16
to mongodb-user
Hi

I am taking backup in production with this command mongodump -h ${node}:27017 --oplog --gzip --archive=$BACKUPDIR/mongo-local-$node-backup$DATE.archive.gz
This is with version 3.2.5

When i try to restore this file in mongodb 3.2.7 or 3.2.5 with command:  mongorestore --drop --objcheck --oplogReplay --gzip --archive=mongo-local-node-backup2016-05-29-02-31.archive.gz
I get this output: 
016-06-17T12:30:57.723+0200 creating intents for archive
2016-06-17T12:30:57.899+0200 don't know what to do with subdirectory "kssusvarut03_manuellPrintProjection", skipping...
2016-06-17T12:30:57.899+0200 don't know what to do with subdirectory "kssusvarut03_statusStatestikk", skipping...
2016-06-17T12:30:57.899+0200 don't know what to do with subdirectory "kssusvarut03_SnapshotRepository", skipping...
2016-06-17T12:30:57.899+0200 don't know what to do with subdirectory "kssusvarut03_forsendelseInfoProjection", skipping...
2016-06-17T12:30:57.899+0200 don't know what to do with subdirectory "oppsyn", skipping...
2016-06-17T12:30:57.899+0200 don't know what to do with subdirectory "", skipping...
2016-06-17T12:30:58.024+0200 reading metadata for kssusvarut03_statusStatestikk.lestStatistikk_03 from archive 'mongo-local-kssusvarut03-backup2016-05-29-02-31.archive.gz'
2016-06-17T12:30:58.030+0200 restoring kssusvarut03_statusStatestikk.lestStatistikk_03 from archive 'mongo-local-kssusvarut03-backup2016-05-29-02-31.archive.gz'
2016-06-17T12:30:58.337+0200 reading metadata for kssusvarut03_statusStatestikk.sendtStatistikk_03 from archive 'mongo-local-kssusvarut03-backup2016-05-29-02-31.archive.gz'
2016-06-17T12:30:58.342+0200 restoring kssusvarut03_statusStatestikk.sendtStatistikk_03 from archive 'mongo-local-kssusvarut03-backup2016-05-29-02-31.archive.gz'

I want mongorestore to restore all the databases not just skip them.
Anyone know if i am doing something wrong?


Kevin Adistambha

unread,
Jun 28, 2016, 12:26:50 AM6/28/16
to mongodb-user

Hi Idar,

2016-06-17T12:30:57.899+0200 don’t know what to do with subdirectory “kssusvarut03_manuellPrintProjection”, skipping…
2016-06-17T12:30:57.899+0200 don’t know what to do with subdirectory “kssusvarut03_statusStatestikk”, skipping…
2016-06-17T12:30:57.899+0200 don’t know what to do with subdirectory “kssusvarut03_SnapshotRepository”, skipping…
2016-06-17T12:30:57.899+0200 don’t know what to do with subdirectory “kssusvarut03_forsendelseInfoProjection”, skipping…
2016-06-17T12:30:57.899+0200 don’t know what to do with subdirectory “oppsyn”, skipping…

It may be an erroneous error message. Could you verify that all the restored collections (i.e. kssusvarut03_manuellPrintProjection, kssusvarut03_statusStatestikk, kssusvarut03_SnapshotRepository, kssusvarut03_forsendelseInfoProjection, and oppsyn) contains all the expected data?

Best regards,
Kevin

Akshay Awasthy

unread,
Jun 28, 2016, 6:43:08 AM6/28/16
to mongodb-user
Hi Idar

These subdirectories that are causing an issue are created within the dump directory.
To execute your cmd you will have to mention the exact path where the file is present.
Eg:: If the dump file is present in /data/db/dump/db_name/dump_file.bson

You need to provide the file name as :: /data/db/dump/db_name/dump_file.bson

dump_file.bson is actually your database dump even if you do not exactly provide the above path dump directory creates a database name directory inside which collection backup is present.

If you still have issue check you dump directory it will give you more closure.

Regards
Akshay
Reply all
Reply to author
Forward
0 new messages