Ability to restore S3 incremental backups to DynamoDb to any point in time.
JavaScript
Latest commit 14cc891 Nov 15, 2016 @JoshuaToth JoshuaToth Updating readme

README.md

dynamo-incremental-restore

NPM version Build Status Dependency Status Coverage Status

Restore DynamoDb data from S3 incremental backups

Install

$ npm install --save dynamo-incremental-restore

Usage

Example Files

example-restore-to-point.js

var dynamoIncrementalRestore = require('../');

console.log(dynamoIncrementalRestore.logbuildList({
    Prefix: "ServiceFolder/TableFolder/ClientID",  // Where the files sit. Use parent folders and it should recursively find all child document/files e.g. Formsmith/Formsmith.Blue.FormSchema/543
    DestinationTableName: "Example Table Name" ,// e.g. Formsmith.Blue.FormSchema
    Bucket: "au-backup-bucket-name", // e.g. pageup-dynamo-backup
    restoreToPointInTime: new Date('2020-11-14T23:50:32.000Z'), //the last point in time you want to update a version
    region: "ap-southeast-2" //Dynamo Region. Change for each datacenter
}));

This will be fine to run both on your local environment (for testing the dev datacenter) or uploaded into an EC2 instance with the appropriate permissions to access client data for backing up. Clone the repository into a machine you want to perform the task on and use node to run the script.

TODO

  1. Batch writes to Dynamo in blocks of 25, and handle unprocessed items
  2. Break process into three steps (Build Version List, Build Dynamo Requests, Send Requests to Dynamo)

API

See index.js

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using gulp.

License

Copyright (c) 2016 Abhaya Chauhan. Licensed under the MIT license.