How to Check and Repair a Linux Filesystem (fsck for ext4, xfs_repair for XFS)
Linux

How to Check and Repair a Linux Filesystem (fsck for ext4, xfs_repair for XFS)

Find the device and its filesystem type with lsblk -f. For ext4, unmount it and run fsck -n /dev/DEVICE to check, then fsck -y /dev/DEVICE to repair. For XFS, the default on AlmaLinux and Rocky Linux, use xfs_repair -n and xfs_repair instead, because fsck does nothing on XFS. The root filesystem cannot be unmounted, so repair it from rescue mode or force a check at the next boot.

Read article 4 min read
Backups

How to Back Up and Restore a cPanel Account Over SSH (pkgacct and restorepkg)

As root, run /scripts/pkgacct USERNAME /backup to package one cPanel account (files, databases, email and settings) into /backup/cpmove-USERNAME.tar.gz. Copy the file off the server. To restore it on the same or another cPanel server, put the file in /home and run /scripts/restorepkg /home/cpmove-USERNAME.tar.gz. Restoring over an existing account replaces its data, so test first.

Read article 4 min read
UnderHost Blog

Guides, security notes and news for modern hosting.

Practical, real-world articles on offshore hosting, Linux and cPanel administration, server security and the technology behind our network, written by the UnderHost team.

Popular topics

Quick actions