npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

nibu

0.4.8 • Public • Published

NIBU - Newicon Backup

Warning: This package is not production-ready and is being frequently updated with new features that may not be backwards compatible.

If in doubt, wait for the v1.0.0 release!

Repo

https://bitbucket.org/newicon/nibu/overview

Installation

  • Install globally:

    npm install nibu -g

  • Add configuration file ~/.nibu/config.json

    You can find an example file in this package called "config.example.json"

Usage

Basic usage:

nibu command [params]

List of commands:

nibu media [method] [days]

By default, a 'media' directory will be created in the bucket and used as the root directory for all media uploads

  • [method] : 'all' or 'updated' (default)

  • [days] : used with method, number of days to check back

    nibu mysql

Will backup all databases nibu has access to via its db user credentials specified in the configs db settings

nibu createBucket bucketName
  • bucketName : the name of the bucket you want to create

    nibu uploadFile fileName [remoteDir]

  • filePath : file to be uploaded (including local file path)

  • _[remoteDir] : if set, the file will use this as the aws S3 remote path; otherwise it will use a path similar to the filePath variable

    nibu decryptBackup fileName [outputDir]

  • fileName : the file to decrypt (including path)

  • [outputDir] : if set, the file will output to this directory; otherwise, it will use the original file's directory

    nibu importDb fileName dbName

  • fileName : file to import (including path)

  • dbName : the database to use for the import

    nibu importDbFromS3 objectKey dbName

  • objectKey : S3 object key to use for import (including path)

  • dbName : the database to use for the import

    nibu all

This is run without any options and uses the defaults only. Future releases may include options...

nibu config

Show current config options

nibu -V

Show the current nibu version

Configuration Options

  • s3 (all options for s3)

  • defaults (access credentials)

    • accessKeyId: your public access key
    • secretAccessKey: your private/secret access key
    • endpoint: the endpoint for your account e.g. 's3-eu-west-1.amazonaws.com'
    • region: the region for your account e.g. 'eu-west-1'
  • bucketName: your bucket name

  • maxBufferLength: the maximum file buffer size before multipart uploads kick in; default: '1073741824'

  • multipart: (options for multipart uploads)

  • partSize: size of each part or 'chunk' in bytes_; default: '5242880' (5mb)

  • maxUploadTries: the maximum number of upload attempts per part before it errors; default: 3

  • db (db configuration options)

    • username
    • password: if set, this is also used for backup encryptions
    • encrypt_backup: boolean; whether to use ssl encryption for your db backups. If set to true, you must use a db password, as this is used for the encryption key. Future releases may allow a different key...
  • media (options for media backups)

  • directories: list of directories to use as 'roots' for backing up media. Example:

    { "/path/to/local/directory/" : "path/to/remote/media/directory/", "/path/to/another/local/directory/" : "path/to/another/remote/media/directory/" }

  • excludedDirectories: array of directories to exclude, such as cache, assets etc Example:

    ["assets", "bundle", "cached-copy", "runtime"]

You can find an example configuration file in the root of this package, called config.example.json

newicon.net

Keywords

none

install

npm i nibu

Downloadsweekly downloads

5

version

0.4.8

license

none

repository

Gitbitbucket

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability