Blog

SSH, Linux, and production operations — page 7

Practical runbooks for servers, containers, databases, cloud hosting, incident response, and safe AI-assisted operations.

Measure Redis key memory without running an unbounded key dump

MEMORY USAGE estimates bytes allocated for one key and can sample nested values, while aggregate overhead and allocator fragmentation appear elsewhere.

The Tryssh team · July 29, 2026 →

Test a Redis RDB restore without overwriting production

An RDB file is a point-in-time dataset snapshot loaded at server startup; a meaningful test uses a separate instance and validates data semantics.

The Tryssh team · July 29, 2026 →

Find large Redis keys without blocking the server with KEYS

SCAN incrementally iterates the keyspace with limited work per call but may return duplicates and does not provide a transactionally stable snapshot.

The Tryssh team · July 29, 2026 →

Use Redis SLOWLOG to find server-side command latency

SLOWLOG records commands whose execution time exceeds a threshold, excluding network I/O, so it identifies server work rather than total client latency.

The Tryssh team · July 29, 2026 →

Enable Redis TLS and verify every communication channel

Redis can protect client, replication, and cluster-bus traffic with TLS, but certificates, ports, trust, and client configuration must converge together.

The Tryssh team · July 29, 2026 →

Use Redis WAIT without claiming strong consistency

WAIT blocks a client until earlier writes are acknowledged by a requested number of replicas or timeout, but acknowledged copies can still be lost during failover.

The Tryssh team · July 29, 2026 →

Resize an ext4 filesystem after verifying the device boundary

Ext4 can grow online when its containing block device is already larger, but partition, LVM, encryption, and filesystem sizes must be distinguished.

The Tryssh team · July 29, 2026 →

Grow an XFS filesystem from its mount point, not a guessed device

Xfs_growfs operates on a mounted XFS filesystem and grows within the already expanded underlying device; XFS does not support shrinking.

The Tryssh team · July 29, 2026 →

Build a restic backup with reviewed excludes and searchable tags

Restic walks selected paths, applies exclude rules, chunks changed content, and records a snapshot with host, path, time, and optional tags.

The Tryssh team · July 29, 2026 →

Schedule restic repository checks that eventually read all data

Restic check validates repository structure and indexes; read-data or read-data-subset additionally downloads and verifies stored pack contents.

The Tryssh team · July 29, 2026 →

Copy restic snapshots between repositories and verify independence

Restic copy transfers snapshot metadata and referenced data to another repository, reusing destination data when possible while preserving separate encryption domains.

The Tryssh team · July 29, 2026 →

Preview a restic retention policy before forgetting snapshots

Restic forget groups snapshots by host, path, tags, and policy filters, then selects which snapshot records to remove; data remains until prune.

The Tryssh team · July 29, 2026 →

Restore restic data into an isolated directory before cutover

Restic reconstructs selected snapshot paths under a target directory, preserving stored metadata where the platform permits.

The Tryssh team · July 29, 2026 →

Use restic mount for read-only file discovery before restore

Restic mount exposes repository snapshots through a FUSE filesystem for browsing; it is a recovery view, not the application cutover target.

The Tryssh team · July 29, 2026 →

Run restic prune only after capacity and recovery checks

Prune repacks repository data and deletes unreferenced objects after forget, requiring temporary space, backend writes, and uninterrupted credential scope.

The Tryssh team · July 29, 2026 →

Initialize a restic repository and prove the backend identity

Restic init creates repository configuration and keys at one backend location; credentials and repository URL together select the target.

The Tryssh team · July 29, 2026 →

Select the exact restic snapshot before restore or retention

Restic filters snapshots by ID, host, path, tag, and time; latest is relative to those filters and repository visibility.

The Tryssh team · July 29, 2026 →

Remove a restic stale lock only after proving no writer is active

Restic creates repository locks to coordinate operations; unlock removes stale locks but cannot safely resolve a genuinely concurrent writer.

The Tryssh team · July 29, 2026 →

rsync --partial vs --inplace: choose by recovery and reader behavior

--partial retains an incomplete temporary transfer for reuse, while --inplace writes directly into the destination file and changes atomicity, snapshots, and reader visibility.

The Tryssh team · July 29, 2026 →

Repair SELinux file contexts persistently with semanage and restorecon

SELinux path labeling policy maps pathname patterns to expected contexts; restorecon applies that policy while chcon creates a local label that relabeling may erase.

The Tryssh team · July 29, 2026 →

Use SFTP batch mode with explicit failure and atomic-file behavior

Sftp -b reads commands from a file and aborts on selected command failures; remote application consistency and final-name publication remain separate concerns.

The Tryssh team · July 29, 2026 →

Build SLO burn-rate alerts from good and total events

Burn rate compares observed bad-event ratio to the error budget rate; multi-window alerts combine fast detection with evidence that impact persists.

The Tryssh team · July 29, 2026 →

Use ss to identify the process listening on a Linux port

Ss reads kernel socket state and can show local addresses, ports, processes, queues, and TCP details without probing the network path itself.

The Tryssh team · July 29, 2026 →

Use SSH BatchMode so automation fails instead of waiting for input

BatchMode disables interactive prompts, making missing credentials, host-key decisions, and keyboard-interactive requirements surface as bounded failures.

The Tryssh team · July 29, 2026 →