Verified lab · 25 min · Module 8, lesson 4 of 530 min left in this module
Module 8 · Backups and availabilityLesson 4 of 5
Self-checked for now. Automatic checking arrives with sign-in; until then, tick off each item under Check your work yourself.
Goal: Copy a file off a SphereFiles volume, change the data, copy the file back, and read the first value back.
You neednotes Running with the notes-data volume mounted at /data, from lab 5.5.4, and csph pointed at your lab environment (csph context).
Haven't done lab 5.5.4?
Do it first: it deploys the notes app, creates the volume and mounts it. The notes app keeps one note in /data/note.txt: POST /note saves the request body, GET /note returns it. Because the whole volume is mounted at /data, that file is note.txt at the top of the volume.
SphereFiles doesn't take restore points, so the copy that saves you is one you made. This lab makes one with csph files cp, breaks the data, and puts the copy back.
Save the value to keep
curl -X POST --data "before backup" https://<your-notes-url>/note
curl https://<your-notes-url>/note
You should seeNo error from curl, and the second command prints your note.