1.1.1 • Published 3 years ago

backup-manager v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

backup-manager

It's a simple library to manage backups for various services

Install

npm i --save backup-manager

You can also clone this repository and make use of it yourself.

git clone https://github.com/Dvs-Bilisim/backup-manager.git
cd backup-manager
npm i
npm test

Configuration

  • debug : Debug mode. It's disabled by default.
  • filename : Name of backup file.
  • min : Minimum number of backup files should be kept.
  • overwrite : Flag for overwriting an existing backup file.
  • path : Backup folder.
  • size : Maximum amount of total back up files. If we reach that value, an old backup will be removed.

Backup Example for MongoDB

const MongoDB = require('backup-manager').MongoDBPlugin;

// path should be created before creating an instance
const mongo = new MongoDB({ debug: true, path: '/tmp/backup' });
mongo.backup([ '--host localhost', '--db test', '--gzip' ], error => console.log(error));

Restore Example for MongoDB

const MongoDB = require('backup-manager').MongoDBPlugin;

// path should exist and contain backup files
const mongo = new MongoDB({ debug: true, path: '/tmp/backup' });
mongo.restore([ '--host localhost', '--db test', '--gzip' ], error => console.log(error));

Backup Example for MySQL

const MySQL = require('backup-manager').MySQLPlugin;

// path should be created before creating an instance
const mysql = new MySQL({ debug: true, path: '/tmp/backup' });
mysql.backup([ '-h localhost', '-uroot', '--databases backup_test' ], error => console.log(error));

TODO

  • Backup and restore for folders
  • Backup and restore for MySQL
  • Backup and restore for PostgreSQL
1.1.1

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.1.2

3 years ago

1.0.3

3 years ago

0.6.8

5 years ago

0.6.7

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.5.0

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.2.1

4 years ago