Versions in this module Expand all Collapse all v1 v1.4.3 Nov 17, 2021 v1.4.2 Nov 17, 2021 Changes in this version + const ArchiveOption + const BulkBufferSizeOption + const BypassDocumentValidationOption + const CollectionOption + const ConvertLegacyIndexesOption + const DBOption + const DirectoryOption + const DropOption + const DryRunOption + const ExcludedCollectionPrefixesOption + const ExcludedCollectionsOption + const FixDottedHashedIndexesOption + const GzipOption + const KeepIndexVersionOption + const MaintainInsertionOrderOption + const NSExcludeOption + const NSFromOption + const NSIncludeOption + const NSToOption + const NoIndexRestoreOption + const NoOptionsRestoreOption + const NumInsertionWorkersOption + const NumParallelCollectionsOption + const ObjcheckOption + const OplogFileOption + const OplogLimitOption + const OplogReplayOption + const PreserveUUIDOption + const RestoreDBUsersAndRolesOption + const Roles + const StopOnErrorOption + const TempRolesCollOption + const TempUsersCollOption + const Users + const WriteConcernOption + var Usage = ... + func ParseTimestampFlag(ts string) (primitive.Timestamp, error) + func SupportsCollectionUUID(sp *db.SessionProvider) (bool, error) + type FileType uint + const BSONFileType + const MetadataFileType + const UnknownFileType + type InputOptions struct + Archive string + Directory string + Gzip bool + Objcheck bool + OplogFile string + OplogLimit string + OplogReplay bool + RestoreDBUsersAndRoles bool + func (*InputOptions) Name() string + type Metadata struct + CollectionName string + Indexes []*idx.IndexDocument + Options bson.D + UUID string + type MongoRestore struct + InputOptions *InputOptions + InputReader io.Reader + NSOptions *NSOptions + OutputOptions *OutputOptions + ProgressManager progress.Manager + SessionProvider *db.SessionProvider + SkipUsersAndRoles bool + TargetDirectory string + ToolOptions *options.ToolOptions + func New(opts Options) (*MongoRestore, error) + func (restore *MongoRestore) ApplyOps(session *mongo.Client, entries []interface{}) error + func (restore *MongoRestore) Close() + func (restore *MongoRestore) CollectionExists(dbName, coll string) (bool, error) + func (restore *MongoRestore) CreateAllIntents(dir archive.DirLike) error + func (restore *MongoRestore) CreateCollection(intent *intents.Intent, options bson.D, uuid string) error + func (restore *MongoRestore) CreateIndexes(dbName string, collectionName string, indexes []*idx.IndexDocument) error + func (restore *MongoRestore) CreateIntentForCollection(db string, collection string, bsonFile archive.DirLike) error + func (restore *MongoRestore) CreateIntentForOplog() error + func (restore *MongoRestore) CreateIntentsForDB(db string, dir archive.DirLike) (err error) + func (restore *MongoRestore) CreateStdinIntentForCollection(db string, collection string) error + func (restore *MongoRestore) DropCollection(intent *intents.Intent) error + func (restore *MongoRestore) GetDumpAuthVersion() (int, error) + func (restore *MongoRestore) HandleInterrupt() + func (restore *MongoRestore) HandleNonTxnOp(oplogCtx *oplogContext, op db.Oplog) error + func (restore *MongoRestore) HandleOp(oplogCtx *oplogContext, op db.Oplog) error + func (restore *MongoRestore) HandleTxnOp(oplogCtx *oplogContext, meta txn.Meta, op db.Oplog) error + func (restore *MongoRestore) LegacyInsertIndex(dbName string, index *idx.IndexDocument) error + func (restore *MongoRestore) LoadIndexesFromBSON() error + func (restore *MongoRestore) MetadataFromJSON(jsonBytes []byte) (*Metadata, error) + func (restore *MongoRestore) ParseAndValidateOptions() error + func (restore *MongoRestore) PopulateMetadataForIntents() error + func (restore *MongoRestore) Restore() Result + func (restore *MongoRestore) RestoreCollectionToDB(dbName, colName string, bsonSource *db.DecodedBSONSource, file PosReader, ...) Result + func (restore *MongoRestore) RestoreIndexes() error + func (restore *MongoRestore) RestoreIndexesForNamespace(namespace *options.Namespace) error + func (restore *MongoRestore) RestoreIntent(intent *intents.Intent) Result + func (restore *MongoRestore) RestoreIntents() Result + func (restore *MongoRestore) RestoreOplog() error + func (restore *MongoRestore) RestoreUsersOrRoles(users, roles *intents.Intent) error + func (restore *MongoRestore) ShouldRestoreUsersAndRoles() bool + func (restore *MongoRestore) TimestampBeforeLimit(ts primitive.Timestamp) bool + func (restore *MongoRestore) UpdateAutoIndexId(options bson.D) + func (restore *MongoRestore) ValidateAuthVersions() error + type NSOptions struct + ExcludedCollectionPrefixes []string + ExcludedCollections []string + NSExclude []string + NSFrom []string + NSInclude []string + NSTo []string + func (*NSOptions) Name() string + type Options struct + TargetDirectory string + func ParseOptions(rawArgs []string, versionStr, gitCommit string) (Options, error) + type OutputOptions struct + BulkBufferSize int + BypassDocumentValidation bool + ConvertLegacyIndexes bool + Drop bool + DryRun bool + FixDottedHashedIndexes bool + KeepIndexVersion bool + MaintainInsertionOrder bool + NoIndexRestore bool + NoOptionsRestore bool + NumInsertionWorkers int + NumParallelCollections int + PreserveUUID bool + StopOnError bool + TempRolesColl string + TempUsersColl string + WriteConcern string + func (*OutputOptions) Name() string + type PosReader interface + Pos func() int64 + type Result struct + Err error + Failures int64 + Successes int64 + func NewResultFromBulkResult(result *mongo.BulkWriteResult, err error) Result