Documentation ¶
Index ¶
- Constants
- Variables
- func Compose(w io.Writer, newReader NewReader, nsFilter NSFilterFn, concurrency int) error
- func DefaultDocFilter(string, bson.Raw) bool
- func DefaultNSFilter(string) bool
- func GenerateV1FromV2(ctx context.Context, stg storage.Storage, bcp, rs string) error
- func NSify(db, coll string) string
- func NewBackup(ctx context.Context, options BackupOptions) (*backupImpl, error)
- func ReadBSONBuffer(r io.Reader, buf []byte) ([]byte, error)
- func ReadMetadata(r io.Reader) (*archiveMeta, error)
- func SecureWrite(w io.Writer, data []byte) error
- type ArchiveMetaV2
- type BackupOptions
- type DocFilterFn
- type IndexSpec
- type NSFilterFn
- type Namespace
- type NamespaceV2
- type NewReader
- type NewWriter
Constants ¶
View Source
const MaxBSONSize = db.MaxBSONSize
View Source
const MetaFile = "metadata.json"
View Source
const MetaFileV2 = "meta.pbm"
Variables ¶
View Source
var RouterConfigCollections = []string{
"chunks",
"collections",
"databases",
"settings",
"shards",
"tags",
"version",
}
Functions ¶
func DefaultNSFilter ¶
func GenerateV1FromV2 ¶
func ReadBSONBuffer ¶
ReadBSONBuffer reads raw bson document from r reader using buf buffer
func ReadMetadata ¶
Types ¶
type ArchiveMetaV2 ¶
type ArchiveMetaV2 struct { Version string `bson:"version"` ServerVersion string `bson:"serverVersion"` FCV string `bson:"fcv"` Namespaces []*NamespaceV2 `bson:"specifications"` }
type BackupOptions ¶
type BackupOptions struct { Client *mongo.Client NewFile NewWriter NSFilter NSFilterFn DocFilter DocFilterFn ParallelColls int }
type DocFilterFn ¶
DocFilter checks whether a document is selected for backup. Useful when only some documents are selected for backup.
type NSFilterFn ¶
NSFilterFn checks whether a namespace is selected for backup. Useful when only some namespaces are selected for backup.
type Namespace ¶
type Namespace struct { *archive.CollectionMetadata `bson:",inline"` CRC int64 `bson:"crc"` Size int64 `bson:"size"` }
type NamespaceV2 ¶
type NamespaceV2 struct { DB string `bson:"db"` Name string `bson:"name"` Type string `bson:"type"` UUID string `bson:"uuid,omitempty"` Options bson.D `bson:"options,omitempty"` Indexes []*IndexSpec `bson:"indexes"` CRC int64 `bson:"crc"` Size int64 `bson:"size"` }
func (*NamespaceV2) IsBucketCollection ¶
func (s *NamespaceV2) IsBucketCollection() bool
func (*NamespaceV2) IsCollection ¶
func (s *NamespaceV2) IsCollection() bool
func (*NamespaceV2) IsSystemCollection ¶
func (s *NamespaceV2) IsSystemCollection() bool
func (*NamespaceV2) IsTimeseries ¶
func (s *NamespaceV2) IsTimeseries() bool
func (*NamespaceV2) IsView ¶
func (s *NamespaceV2) IsView() bool
func (*NamespaceV2) NS ¶
func (s *NamespaceV2) NS() string
Click to show internal directories.
Click to hide internal directories.