Why snapshot file are 0 bytes. Files exist when mounted but take up no space on disk and have no content.

0

I am making a Snapshot of a mounted volume to a path called /home/ec2-user/restore - when I use the web interface all works as expected.

When I use AWS CLI to create a new volume from the snapshot and mount the new volume to /home/ec2-user/restore again, the new volume from the snapshot has all the files that are supposed to be there, but the files have nothing in them.

Do you know why a snapshot would omit all the data within the files?

질문됨 2년 전479회 조회
1개 답변
0

The reason the files were 0 bytes was because the snapshot had not completed yet.

Doing first:

aws ec2 describe-snapshots --snapshot-id ${snapshotId}

and waiting for Snapshots[0].State === 'completed'

before creating a volume from the snapshot can ensure t

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠