Back to commands

Hosting Operations

Read-only

Check the Active Release Symlink

A deployment uses release directories and a current symlink, and you need to confirm which release is active.

Command

cd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not assume Git HEAD and the active release symlink always match.

Expected output

The current symlink target and VERSION file for release 2026-06-25-1030.

System impact

Read-only. Nothing changes. The symlink target and release metadata are printed.

Recovery / rollback: no state is changed.

When to use it

Use during deploy or rollback triage when production is selected by a filesystem pointer.

When not to use it

Do not assume Git HEAD and the active release symlink always match.

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 && ls -l releases/current

lrwxrwxrwx 1 root root 15 Jun 26 00:27 releases/current -> 2026-06-25-1030

$ cd /work/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION

2026-06-25-1030
release=2026-06-25-1030
status=suspect
View commands shown

These are the commands shown in the sanitized transcript.

Commands shown

  1. cd /lab/git-recovery-rollback && ls -l releases/current
  2. cd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION

next steps

Related commands

Hosting Operations State change

Rollback a Release Symlink in a Sandbox

Practice the pointer switch where the blast radius is zero.

cd /lab/git-recovery-rollback && ln -sfn 2026-06-25-1000 releases/current
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

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

Restore One File From Last Good Release

Recover a config file without rolling back the whole branch.

cd /lab/git-recovery-rollback && git restore --source=release-2026-06-25-1000 -- app/config.yml
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
  • risk:read-only

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.