0.0.1 • Published 6 years ago

nodejs-backup-checker v0.0.1

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

Node.js Backup Checker Build Status Coverage Status

Read-only verification: it does not change your backup content.

Installation

$ npm install -g nodejs-backup-checker

Usage

Generate the configuration file for an backup file:

$ nodejs-backup-checker generate /path/to/backup.tar.gz

Compare backup file with expected content stored in configuration file:

$ nodejs-backup-checker compare /path/to/backup.json

Example of configuration file:

{
  "files": [
    {
      "access": "rwxrwxrwx",
      "group": "pierre",
      "path": "/home/pierre/backup.tar.gz",
      "size": 100,
      "user": "pierre",
      "sha1": null
    }
  ]
}
FieldDescriptionRequiredType
accessExpected file accesstruestring
groupExpected owner grouptruestring
pathAbsolute path to concerned filetruestring
sizeMinimum expected file size in Mofalseinteger
userExpected user nametruestring
sha1TODOfalsestring

TODO

  • sha1 for compare command
  • Check config file integrity before compare
  • Write log file to report compare
  • generate command must take -c option to provide configuration file path
  • Improve test isolation (related to filesystem)