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?
AWS-User-6294425
asked 3 days ago1 views
1 Answers
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 Snapshots0.State === 'completed'
before creating a volume from the snapshot can ensure t
AWS-User-6294425
answered 3 days ago
Relevant questions
Problem with enlarge a non root filesystem
ebsllcasked a year agoebs volume - can't read data
katmaiasked 4 years agoAttaching EBS Volume fails: Thinks it is attached to another instance but is not.
AWS-User-9447521asked 4 months agoStorage Gateway migration between accounts
Accepted AnswerAWS-User-3965566asked 2 years agoWhy snapshot file are 0 bytes. Files exist when mounted but take up no space on disk and have no content.
AWS-User-6294425asked 3 days ago[errno 28] no space left on disk
Waqarasked a month agoInternalError creating EBS snapshot
AWS-User-7877084asked 12 days agoHow to resolve the issue with the disk space of EC2 Linux machine?
maxkholmyanskyasked 2 years agoWhy don't I get en event with binlog information when I create a snapshot?
Accepted Answerj4nd3r53nasked 8 months agoCloudFront behaviour Path pattern matching
MGasked 4 months ago