restic Backup Tutorial: Encrypted, Deduplicated Server Backups
Back up a Linux server with restic: S3, SFTP or local repositories, backups and excludes, forget and prune retention, restores, checks, automation.
Blog
Linux server administration: Debian, Ubuntu, AlmaLinux, storage, performance and troubleshooting.
Back up a Linux server with restic: S3, SFTP or local repositories, backups and excludes, forget and prune retention, restores, checks, automation.
Manage packages on AlmaLinux, Rocky Linux, RHEL and Fedora with dnf: install, update, search, groups, modules, EPEL, history and rollback, and version locks.
Use head and tail to show the first or last lines of files, follow logs live with tail -f and -F, follow several logs at once and extract a range of lines.
Linux namespaces explained: PID, network, mount, UTS, IPC and user namespaces, how containers use them, lsns, unshare and nsenter, and security notes.
Fixes for common Debian server errors: apt locks, broken packages, GPG keys, full disks, read-only filesystems, failed services, DNS and SSH lockouts.
A practical backup and recovery plan for Debian: what to back up, the 3-2-1 rule, database dumps, encrypted off-site restic backups and restore tests.
Check file integrity on Linux: generate and verify SHA-256 and MD5 checksums, check downloads, verify many files at once, and confirm authenticity with GPG.
Linux streams and redirection explained: stdin, stdout, stderr, >, >>, 2>&1, here-docs, pipes, tee and /dev/null, with practical examples for logs and cron.
How networking works on Debian servers: find interfaces, set static IPs in /etc/network/interfaces, configure DNS, add IPs and troubleshoot.
Create symbolic and hard links with ln, understand the difference, update and remove links, find broken links, and use symlinks for releases and configs.
Stop specific packages from upgrading: apt-mark hold, APT preferences and pin priorities, pinning third-party repos, dnf versionlock, and when to unpin.
Manage users and groups on Debian, grant sudo safely, understand permissions and ownership, use shared folders and ACLs, and audit accounts.
Tune Debian for heavy traffic: find the bottleneck, then adjust file limits, kernel network settings, swap, disk I/O, Nginx and the database.
Run Linux commands in the background with &, manage jobs with bg, fg and jobs, survive SSH logout with nohup and disown, and know when to use tmux or systemd.
Install Debian 12 or 13 and configure it properly: updates, sudo user, SSH keys, firewall, time, swap, Fail2ban and automatic security updates.
Learn tmux for server work: sessions that survive disconnects, windows and panes, the key shortcuts, copy mode, a practical tmux.conf and common workflows.
Make your bash prompt useful: PS1 escape codes, colors, user, host and path, a red prompt for root or production, exit codes, git branch, and Starship.
Use rsync to copy and sync files locally and over SSH: archive mode, trailing slashes, --delete, excludes, dry runs, bandwidth limits, resume and backups.
Follow a Linux server from power-on to login: BIOS/UEFI, GRUB, kernel, initramfs and systemd, plus systemd-analyze to speed up and debug boots.
See who logged in to a Linux server and when: last and lastb, lastlog, SSH entries in auth.log and the journal, failed logins, reboots, and suspicious access.
What zombie (defunct) processes are, finding them with ps, identifying the parent that is not reaping them, clearing them, and preventing them in Docker.
Work with core dumps on Linux: ulimit and systemd-coredump, coredumpctl list and debug, analysing crashes with gdb, limiting or disabling dumps, disk space.
Use cat to print files, number lines, show hidden characters, concatenate files, write files with heredocs, and know when less, head or tail are better.
Write Bash conditionals: if/elif/else, [ ] vs [[ ]], file, string and number tests, combining conditions, checking command success, and case statements.