mongodb-backupper
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

mongodb-backupper

This package is similar to mongodump but as an extensible library, which allows for more flexibility.

Example

import MongoDBBackupper, { bsonSerializer, fileBackup } from 'mongodb-backupper';

const backupper = new MongoDBBackupper('mongodb://localhost:27017/db', await fileBackup('./backup', { clean: true }), {
  collections: ['users'],
  // Just an example, no need to specify this since this is the default value
  serializerStream: [bsonSerializer({ checkKeys: false })],
});

const results = await backupper.backup();

await backupper.restore();

Features

  • 🔒 Encryption support
  • 🗜️ Compression support
  • 🚀 Low memory usage (everything is streamed)
  • 🔌 Extensible

Readme

Keywords

none

Package Sidebar

Install

npm i mongodb-backupper

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

47.4 kB

Total Files

29

Last publish

Collaborators

  • jdgjsag67251