Roll Back to the Right Release
/srv/lab/site keeps timestamped releases in releases/ (named YYYYMMDD-HHMM) and a symlink current to the one that is live. bin/rollback.sh is the emergency button.
Yesterday it switched the site to a release from last month instead of the previous one. Pressing it a second time did nothing, and bin/rollback.sh 20261131-0000 (a typo) left the site with a broken current link.
Fix bin/rollback.sh [RELEASE]. It uses $SITE_ROOT when set (default /srv/lab/site) and:
current to the release that comes just before the current one in name order; rolling back twice goes back two releases,releases/,current unchanged) when the release doesn't exist or there is no older release,<time> rollback <from> -> <to> to deploy.log (time as UTC YYYY-MM-DDTHH:MM:SSZ) and prints current: <release>.About this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.