Routine Server Maintenance: Disk Inspection, Log Cleanup, and Backup Recovery Verification
This tutorial covers the basic actions most likely to go wrong in server maintenance: inspecting disks and resources with commands, configuring log rotation to prevent full disks, and verifying that backups can really be restored. When you finish, you will have a repeatable daily check routine that controls risk before it becomes an incident.
Steps
- Inspect resources and disks
Use df -h to check partition usage, du -sh to narrow down large directories step by step, and free -m and uptime for memory and load; record the baseline.
- Clean up and rotate logs
Confirm ownership of log directories, configure logrotate rotation and retention for fast-growing logs, and stop log files from growing without limit and filling the disk.
- Review the backup job
Check whether backup jobs run on schedule and backup files are complete, and confirm that the storage location and retention period meet business requirements.
- Run a recovery verification
Restore the most recent backup to a temporary environment, check the schema, key records, and readability, note the time and steps, and confirm the process is reproducible.
- Archive and improve
Record inspection values, backup status, and restore results in the maintenance register, list issues as to-dos with agreed times, and close the loop.
Practical tips
- Do not blindly delete large files you do not understand; confirm ownership and business purpose first.
- A backup job showing success does not mean it is restorable; only a recovery drill proves it.
- Inspection should watch trends; slow disk growth needs earlier attention than a sudden full disk.
FAQ
What is the emergency response when a disk suddenly fills up?
Use df -h to identify the partition, then du -sh to find the large directories and determine whether they are logs, backups, or business data. Logs can be archived first to free space, while business data must be backed up before handling; do not delete files of unknown ownership without asking an engineer to confirm.
Related news
Explain your case first, then confirm the scope
Tell us your entity, business model and current progress. We will confirm what we can assist with and what you need to do before discussing fees.
