shevchenkos / DynamoDbBackUp

46 stars 23 forks source link

Undo changes made in commit 448db76 (PR #20) #24

Closed tonytamps closed 7 years ago

tonytamps commented 7 years ago

So I thought it best to just undo.

There are 2 things that PR #20 did and I don't think you want either of them.

  1. It stopped sending deletes to DynamoDB. So pushToDynamoDb never gets into it's else block. Which stops you from restoring to the table you're backing up from because now a restore never can remove deleted records at the version you've selected.

  2. It only restores the record if it's the latest version, skipping any data that has been changed in the future.

I can kinda see why you would want this, if you had a table purely for current live data snapshots that you're taking periodically. Like a staging database built of the current live version or something...

Unfortunately it completely ruins the purpose of the restore: disaster recovery.

Tomorrow when I'm back at work I might look at writing a couple tests around this but for now an undo seemed safest.