Skip to content

Commit

Permalink
Fixed an issue where the S3Copy app was attempting to restore "S3
Browse files Browse the repository at this point in the history
Glacier Instant Retrieval" objects before downloading. This isn't
needed.
  • Loading branch information
u0028003 committed Nov 29, 2023
1 parent 55f8c96 commit 7eee2da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/main/java/edu/utah/hci/aws/apps/copy/CopyJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ public String toString() {
public String restoreCopy(CopyJobWorker cjw) throws Exception {
if (complete) return "Complete";

//does it need to be restored? archived?
if (source.getStorageClass().equals("STANDARD") == false) {
//does it need to be restored? GLACIER and DEEP_ARCHIVE only
String sc = source.getStorageClass();
if (sc.equals("GLACIER") || sc.equals("DEEP_ARCHIVE")) {
//if (source.getStorageClass().equals("STANDARD") == false) {
//pull meta data
ObjectMetadata metaData = cjw.tryGetObjectMetadata(source.getBucketName(), source.getKey(), copyRequest.getSourceRegion());

Expand Down
4 changes: 1 addition & 3 deletions src/main/java/edu/utah/hci/aws/apps/copy/S3Copy.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.amazonaws.services.s3.iterable.S3Objects;
import com.amazonaws.services.s3.model.AmazonS3Exception;
import com.amazonaws.services.s3.model.HeadBucketRequest;
import com.amazonaws.services.s3.model.HeadBucketResult;
import com.amazonaws.services.s3.model.ObjectMetadata;
import com.amazonaws.services.s3.model.S3ObjectSummary;
import com.amazonaws.services.s3.model.Tier;
Expand Down Expand Up @@ -534,7 +532,7 @@ public static void printDiffAccountInstructions() {
public void printDocs(){
pl("\n" +
"**************************************************************************************\n" +
"** S3 Copy : Feb 2023 **\n" +
"** S3 Copy : Nov 2023 **\n" +
"**************************************************************************************\n" +
"SC copies AWS S3 objects, unarchiving them as needed, within the same or different\n"+
"accounts or downloads them to your local computer. Run this as a daemon with -l or run\n"+
Expand Down

0 comments on commit 7eee2da

Please sign in to comment.