Hosting Operations
Changes system stateRollback a Release Symlink in a Sandbox
You need to rehearse a symlink-style rollback by pointing current at the previous stable release directory.
Command
cd /lab/git-recovery-rollback && ln -sfn 2026-06-25-1000 releases/current
Before you run this
System impact: Changes system or application state. Needs inspection, scoping, and rollback notes before production use.
When not to use it: Do not run this against a real production releases directory unless your deployment process explicitly calls for it.
Expected output
The current symlink resolves to 2026-06-25-1000 and its VERSION status is stable.
System impact
Changes system state. The releases/current symlink inside the disposable fixture points to 2026-06-25-1000.
When to use it
Use in a sandbox or controlled deploy path when rollback is implemented by moving a current symlink.
When not to use it
Do not run this against a real production releases directory unless your deployment process explicitly calls for it.
Recovery / rollback
Point releases/current back to 2026-06-25-1030 or recreate the fixture.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ cd /work/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION
2026-06-25-1030
release=2026-06-25-1030
status=suspect
$ cd /work/git-recovery-rollback && ln -sfn 2026-06-25-1000 releases/current
$ cd /work/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION
2026-06-25-1000
release=2026-06-25-1000
status=stable
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
cd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSIONcd /lab/git-recovery-rollback && ln -sfn 2026-06-25-1000 releases/currentcd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION
next steps
Related commands
Check the Active Release Symlink
Git may say one thing while the release pointer serves another.
cd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION
Exclude the Current Release from Cleanup
Release cleanup should prove what current points to before listing old directories.
current=$(readlink -f /lab/disk-inode-cleanup/home/deploy/current); find /lab/disk-inode-cleanup/home/deploy/releases -mindepth 1 -maxdepth 1 -type d ! -samefile "$current" -printf '%TY-%Tm-%Td %p\n' | sort
Snapshot Git Status Before Recovery
Before rollback commands, capture the branch and dirty files.
cd /lab/git-recovery-rollback && git status --short --branch
Map Recent Release Commits
A rollback is easier when the last few release tags are visible.
cd /lab/git-recovery-rollback && git log --oneline --decorate --graph --all -8
Revert the Suspect Release Commit
Undo a bad release with a new commit instead of rewriting history.
cd /lab/git-recovery-rollback && git restore -- app/config.yml && git revert --no-edit release-2026-06-25-1030
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Useful for
- LPIC-1 style command-line practice
- LFCS style performance tasks
- Linux+ style troubleshooting review
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.