Back to commands

Hosting Operations

Changes system state

Rollback 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.

demo@lab:~$

$ 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

  1. cd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION
  2. cd /lab/git-recovery-rollback && ln -sfn 2026-06-25-1000 releases/current
  3. cd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION

next steps

Related commands

Hosting Operations Read-only

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
Hosting Operations Can be slow

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
Hosting Operations Read-only

Snapshot Git Status Before Recovery

Before rollback commands, capture the branch and dirty files.

cd /lab/git-recovery-rollback && git status --short --branch
Hosting Operations Read-only

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
Hosting Operations State change

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.

  • lfcs:operations-deployment
  • lfcs:services-logs
  • linuxplus:provisional
  • linuxplus:troubleshooting
  • risk:production-state-change

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.