Restoring AWS S3 bucket using s3-pit-restore

Viewed 639

When trying to perform a point-in-time restore of an S3 bucket to another bucket using s3-pit-restore, I get a syntax error pointing to the name of the source bucket. Here is my command, issued at a Python prompt on Windows 7:

s3-pit-restore -b mybucketeu -d mybucketeubak -t "11-27-2017 11:00:00 -6"

The syntax error prompt points to the final character of mybucketeu.

I am not very experienced with AWS CLI but got it installed and configured so that I can get a list of buckets including the two buckets above. Python 3.6 and s3-pit-restore installed without apparent issues

Our ultimate goal is to be able to roll back everything in an S3 bucket to a point in time with exactly the same contents as existed then.

Thank you!

2 Answers

The url that you have provided is not working, though I found another one here.

If you are following the above link, then it clearly states

With this tool you can easily restore a repository to a point in time with a simple command like:

To local file-system:

 $ s3-pit-restore -b my-bucket -d restored-bucket-local -t "06-17-2016 23:59:50 +2"

To s3 bucket:-

 $ s3-pit-restore -b my-bucket -B restored-bucket-s3 -t "06-17-2016 23:59:50 +2"

So in your case use -B

s3-pit-restore -b mybucketeu -B mybucketeubak -t "11-27-2017 11:00:00 -6"

I was experiencing the same problem as I was running the command from within my AWS Sagemaker notebook. The problem was fixed by adding an ! to the beginning of the command. So for you it could be:

!s3-pit-restore -b mybucketeu -d mybucketeubak -t "11-27-2017 11:00:00 -6"
Related