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?

gefragt vor 2 Jahren479 Aufrufe
1 Antwort
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

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen