Topic 1 Question 17
You are creating a solution to remove backup files older than 90 days from your backup Cloud Storage bucket. You want to optimize ongoing Cloud Storage spend. What should you do?
Write a lifecycle management rule in XML and push it to the bucket with gsutil
Write a lifecycle management rule in JSON and push it to the bucket with gsutil
Schedule a cron script using gsutil ls ג€"lr gs://backups/** to find and remove items older than 90 days
Schedule a cron script using gsutil ls ג€"l gs://backups/** to find and remove items older than 90 days and schedule it with cron
ユーザの投票
コメント(17)
All four are correct answers. Google has built in cron job schduling with Cloud Schedule, so that would place "D" behind "C" in Google's perspective. Google also has it's own lifecycle management command line prompt gcloud lifecycle so "A" or "B" could be used. JSON is slightly faster than XML because of the "{" verse "<c>" distinguisher, with a Trie tree used for alphanumeric parsing. So between "A" and "B", choose "B". Between "B" and "A", "B" is slightly more efficient from the GCP operator perspective. So choose "B".
👍 33Eroc2019/10/24I'll go with B. A is not reasonable because life cycle policies are not written in XML. B is reasonable and is cloud native. C requires a cron script which needs something to run the script and is a non-cloud native approach. D requires a cron script which needs something to run the script and is a non-cloud native approach.
👍 14clouddude2020/05/09To remove backup files older than 90 days from a Cloud Storage bucket and optimize ongoing Cloud Storage spend, you should consider writing a lifecycle management rule in JSON and pushing it to the bucket with gsutil, as described in option B.
Lifecycle management rules allow you to automatically delete objects from a Cloud Storage bucket based on age or other criteria, such as the object's storage class. By writing a rule in JSON and pushing it to the bucket with gsutil, you can specify that objects older than 90 days should be deleted, ensuring that the bucket only contains current backup files and minimizing Cloud Storage spend.
Option A, C and D would not be suitable for this use case, as they do not allow you to specify lifecycle management rules that delete objects based on age.
👍 2omermahgoub2022/12/20
シャッフルモード