# Free CV0-004 practice questions

> 10 free CV0-004 practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/comptia-cv0-004/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/comptia-cv0-004/

### Question 1 of 10

An e-commerce application must keep serving customers if a single data center within the provider's region loses power. The team wants the lowest added latency between application instances. Which design meets these requirements?

- A. Deploy instances in a single availability zone using a spread placement group across racks
- B. Deploy one large instance with dedicated host tenancy and automatic instance recovery
- C. Deploy instances across multiple availability zones in the same region behind a load balancer
- D. Deploy instances in two different regions and use DNS failover with a long TTL value

**Answer:** C

**Explanation:** Availability zones are physically separate data centers in one region connected by low-latency links, so spreading instances across zones survives a single-facility outage with minimal latency. A spread placement group in one zone protects against rack failures but not a zone-wide power loss. A second region adds inter-region latency and a long TTL slows failover. A single instance, even with auto recovery, cannot survive the loss of its data center.

### Question 2 of 10

Compliance rules require that audit logs be retained for seven years, but the logs are almost never read after the first 90 days. The company wants to MINIMIZE storage cost without manual work. Which solution should the architect implement?

- A. Store logs on provisioned-IOPS block volumes and take a monthly snapshot
- B. Configure an object lifecycle policy that moves logs to an archive tier after 90 days
- C. Copy logs to a file share each quarter and delete the copies after seven years
- D. Keep all logs in the hot object tier and enable versioning on the bucket

**Answer:** B

**Explanation:** A lifecycle policy automatically transitions objects to an inexpensive archive tier once they age past 90 days, minimizing cost with no manual effort. Provisioned-IOPS block volumes are among the most expensive storage options for rarely read data. Keeping everything in the hot tier with versioning increases cost. A quarterly manual copy to file storage adds operational work and file storage costs more than archive object storage.

### Question 3 of 10

A database is moving from a commercial engine to an open-source engine in the cloud. Stored procedures and data types differ between the two. Which step should be planned BEFORE moving the data?

- A. Convert the schema and code objects into the target engine's SQL dialect
- B. Enable cross-region read replicas on the source to reduce migration load
- C. Disable all foreign key constraints permanently on the target database
- D. Increase the target instance size so procedures run faster after the move

**Answer:** A

**Explanation:** A heterogeneous migration needs the schema, data types and stored procedures converted to the target dialect before data is loaded. A larger instance does not make incompatible code run. Source read replicas do not address engine incompatibility. Constraints may be disabled temporarily during load, but permanently removing them harms data integrity.

### Question 4 of 10

An administrator manually changed a security group in production, and the next infrastructure-as-code plan shows differences from the template. What is this condition called, and what is the BEST response?

- A. State locking; wait until the lock expires and then run the plan a second time
- B. Template versioning; tag the change in the repository and leave production as is
- C. Configuration drift; update the template or reapply it so code remains the source of truth
- D. Resource sprawl; delete the security group and recreate it manually from the console

**Answer:** C

**Explanation:** A difference between deployed resources and the IaC definition is configuration drift; the fix is to fold the change into code or reapply the template. Resource sprawl refers to unmanaged, unused resources. State locking prevents concurrent runs and is unrelated to manual edits. Tagging the repository does not reconcile production with the template.

### Question 5 of 10

A healthcare company must keep backups of patient records for seven years, and auditors require that backups cannot be altered or deleted by anyone, including administrators, during that period. Which configuration meets this requirement?

- A. Backups replicated to a second region with a lifecycle rule that moves them to archive
- B. Object storage with a WORM retention lock in compliance mode set to seven years
- C. Object storage with versioning enabled and an MFA requirement for deleting objects
- D. Backups encrypted with a customer-managed key whose deletion is disabled by policy

**Answer:** B

**Explanation:** A write-once-read-many lock in compliance mode prevents any user, including privileged administrators, from deleting or overwriting objects until retention expires. Versioning with MFA delete can still be bypassed by an administrator who holds the MFA device. Encryption protects confidentiality, not immutability. Replication and archiving add durability and lower cost but do not prevent deletion.

### Question 6 of 10

A file server holds 4 TB of data, and about 2% changes each day. Full backups run on Sunday. The administrator wants the fastest possible restore on any weekday while keeping storage lower than daily full backups. Which backup type should run Monday through Saturday?

- A. Differential backups that capture all changes made since Sunday's full backup
- B. Synthetic full backups that are rebuilt from the previous full backup each night
- C. Incremental backups that capture changes made since the previous day's backup
- D. Snapshot copies that are deleted after each backup job completes successfully

**Answer:** A

**Explanation:** A differential restore needs only Sunday's full backup plus the latest differential, which is faster than replaying a chain of incrementals, and it uses less storage than daily fulls. Incrementals use the least space but require every backup in the chain during a restore. Deleting snapshots after each job leaves nothing to restore from. Synthetic fulls give fast restores but consume close to a full backup's storage each night.

### Question 7 of 10

A multinational company must ensure that personal data about EU residents is stored and processed only within the EU, even during disaster recovery. The application runs in a single EU region today. Which design BEST satisfies this requirement while still providing regional disaster recovery?

- A. Replicate backups to a second EU region and limit deployments to EU regions by organization policy
- B. Encrypt all backups with customer-managed keys and store them in a low-cost region outside the EU
- C. Keep backups in the same EU region but in a different availability zone with versioned storage enabled
- D. Replicate backups to the nearest region on any continent to minimize recovery time during an outage

**Answer:** A

**Explanation:** Data sovereignty requires the data to stay in EU jurisdictions, so DR replicas must go to another EU region, and an organization policy that restricts allowed regions prevents accidental deployment elsewhere. The nearest region could be outside the EU, violating the requirement. A second availability zone in the same region does not provide regional disaster recovery. Encryption does not change where data is stored, so copies outside the EU still breach residency rules.

### Question 8 of 10

A SaaS provider's application stores customer records in a shared multitenant database. A penetration test showed that changing a tenant ID in an API request returned another tenant's records. Which remediation BEST addresses the root cause?

- A. Encrypt the database with a separate customer-managed key per tenant and rotate keys annually
- B. Move every tenant to an isolated database instance and keep the API code unchanged
- C. Place a web application firewall rule that blocks requests containing unexpected tenant IDs
- D. Enforce server-side authorization that scopes every query to the tenant bound to the session

**Answer:** D

**Explanation:** The flaw is broken object-level authorization: the server trusts a client-supplied tenant ID. Scoping every query to the tenant tied to the authenticated session fixes the root cause. Per-tenant encryption keys do not help if the application decrypts data for the wrong caller. A WAF rule cannot reliably know which tenant ID is valid for each user. Separate databases are costly and, with unchanged code, the API could still route a request to another tenant's database.

### Question 9 of 10

Which term describes the practice of developers merging code into a shared main branch frequently, with each merge verified by an automated build and tests?

- A. Continuous integration
- B. Continuous compliance
- C. Continuous deployment
- D. Continuous configuration automation

**Answer:** A

**Explanation:** Continuous integration is the frequent merging of code with automated builds and tests on each merge. Continuous deployment automatically releases passing changes to production. Continuous configuration automation manages system configuration through tooling rather than verifying code merges. Continuous compliance checks environments against policy on an ongoing basis.

### Question 10 of 10

An administrator attached a new security group to a database VM that allows TCP 5432 from the application subnet. The application still cannot connect, and a packet capture on the database VM shows the SYN packets arriving but no SYN-ACK leaving. What should the administrator check NEXT?

- A. Whether the application subnet's route table points at an internet gateway
- B. Whether the PostgreSQL service listens on the VM's private interface address
- C. Whether the security group also needs an outbound rule for return traffic
- D. Whether the load balancer in front of the application has a valid health check

**Answer:** B

**Explanation:** Packets reaching the VM with no reply means the cloud firewall passed them, so the OS-level listener (for example, a service bound only to localhost) or a host firewall is the next suspect. Routing to an internet gateway is irrelevant for intra-network traffic that already arrives. Security groups are stateful, so return traffic is allowed automatically. The application load balancer does not affect database connections.

Ready for a timed run? Take the free 15-question CV0-004 mini exam: https://devopscodelab.com/app/exams/comptia-cv0-004/mini/

DevOpsCode Lab is not affiliated with CompTIA. CV0-004 and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
