Last active
September 8, 2022 11:00
-
-
Save corrupt952/b4fe9a67e3524ef9f74b599badd466ad to your computer and use it in GitHub Desktop.
Revisions
-
corrupt952 revised this gist
Sep 8, 2022 . No changes.There are no files selected for viewing
-
corrupt952 revised this gist
Sep 8, 2022 . 3 changed files with 38 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ FROM python:3.7 RUN useradd -m app USER app WORKDIR /app RUN pip3 --no-cache-dir install s3-pit-restore ENV PATH /home/app/.local/bin:$PATH This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,19 @@ # s3-pit-restore example Recover s3 objects using [s3-pit-restore](https://github.com/angeloc/s3-pit-restore). ## Run ```sh # Recover all objects docker compose run -e AWS_PROFILE=default --rm -t app s3-pit-restore -b example-bucket -d ./objects -t "2022/08/10 10:00:00 +9" # Recover any objects by specifying prefix docker compose run -e AWS_PROFILE=default --rm -t app s3-pit-restore -b example-bucket -d ./objects -p prefix/path/to -t "2022/08/10 10:00:00 +9" ``` ## Tips ### If you get the error `s3-pit-restore: error: unrecognized arguments: 20:00:00 +09:00` If you get the error `s3-pit-restore: error: unrecognized arguments: 20:00:00 +09:00`, try switching to bash and running the shell. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ services: app: build: . volumes: - .:/app secrets: - source: aws target: /home/app/.aws secrets: aws: file: ~/.aws -
corrupt952 created this gist
Sep 8, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ test