Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Linux Administration - Second Edition

You're reading from  Mastering Linux Administration - Second Edition

Product type Book
Published in Mar 2024
Publisher Packt
ISBN-13 9781837630691
Pages 764 pages
Edition 2nd Edition
Languages
Authors (2):
Alexandru Calcatinge Alexandru Calcatinge
Profile icon Alexandru Calcatinge
Julian Balog Julian Balog
Profile icon Julian Balog
View More author details

Table of Contents (24) Chapters

Preface 1. Part 1:Basic Linux Administration
2. Chapter 1: Installing Linux 3. Chapter 2: The Linux Shell and Filesystem 4. Chapter 3: Linux Software Management 5. Chapter 4: Managing Users and Groups 6. Chapter 5: Working with Processes, Daemons, and Signals 7. Part 2:Advanced Linux Administration
8. Chapter 6: Working with Disks and Filesystems 9. Chapter 7: Networking with Linux 10. Chapter 8: Linux Shell Scripting 11. Chapter 9: Securing Linux 12. Chapter 10: Disaster Recovery, Diagnostics, and Troubleshooting 13. Part 3:Server Administration
14. Chapter 11: Working with Virtual Machines 15. Chapter 12: Managing Containers with Docker 16. Chapter 13: Configuring Linux Servers 17. Part 4:Cloud Administration
18. Chapter 14: Short Introduction to Cloud Computing 19. Chapter 15: Deploying to the Cloud with AWS and Azure 20. Chapter 16: Deploying Applications with Kubernetes 21. Chapter 17: Infrastructure and Automation with Ansible 22. Index 23. Other Books You May Enjoy

Disaster Recovery, Diagnostics, and Troubleshooting

In this chapter, you will learn how to do a system backup and restore in a disaster recovery scenario, and how to diagnose and troubleshoot a common array of problems. These are skills that each Linux system administrator needs to have if they wish to be prepared for worst-case scenarios such as power outages, theft, or hardware failure. The world’s IT backbone runs on Linux and we need to be prepared for anything that life throws at us.

In this chapter, we’re going to cover the following main topics:

  • Planning for disaster recovery
  • Backing up and restoring the system
  • Introducing common Linux diagnostic tools for troubleshooting

Technical requirements

No special technical requirements are needed for this chapter, just a working installation of Linux on your system or even two different working systems on your local network for some of the examples used. Ubuntu and Fedora are equally suitable for this chapter’s exercises, but in this chapter, we’ll be using Ubuntu 22.04.2 LTS Server and Desktop editions.

Planning for disaster recovery

Managing risks is an important asset for every business or individual. The responsibility of this is tremendous for everyone involved in system administration. For all businesses, managing risks should be part of a wider risk management strategy. There are various types of risks in IT, starting from natural hazards directly impacting data centers or business locations, all the way up to cyber security threats. IT’s footprint inside a company has exponentially grown in the last decade. Nowadays, there is no activity that does not involve some sort of IT operations being behind it, be it inside small businesses, big corporations, government agencies, or the health and education public sectors, just to give a few examples. Each activity is unique in its own way, so it needs a specific type of assessment. Unfortunately, with regard to the information security field, risk management has largely evolved into a one-size-fits-all practice, based on checklists...

Backing up and restoring the system

Disasters can occur at any time. Risk is everywhere. In this respect, backing up your system is of utmost importance and needs to be done regularly. It is always better to practice good prevention than to recover from data loss and learn this the hard way.

Backup and recovery need to be done based on a well-thought-out strategy and need to take the RTO and RPO factors into consideration. The RTO should answer basic questions such as how fast to recover lost data and how this will affect the business operations, while the RPO should answer questions such as how much of your data you can afford to lose.

There are different types and methods of backup. The following are some examples:

Figure 10.1 – Backup methods and types

Figure 10.1 – Backup methods and types

When doing a backup, keep the following rules in mind:

  • The 321 rule means that you should always have at least three copies of your data, with two copies on two different media at...

Introducing common Linux diagnostic tools for troubleshooting

The openness of Linux is one of its best assets. This opened the door to an extensive number of solutions that can be used for any task at hand. Hence, many diagnostic tools are available to Linux system administrators. Depending on which part of your system you would like to diagnose, there are several tools available. Troubleshooting is essentially problem-solving based on diagnostics generated by specific tools. To reduce the number of diagnostic tools to cover, we will narrow down the issues to the following categories for this section:

  • Boot issues
  • General system issues
  • Network issues
  • Hardware issues

There are specific diagnostic tools for each of these categories. We will start by showing you some of the most widely used ones.

Tools for troubleshooting boot issues

To understand the issues that may affect the boot process, it is important to know how the boot process works. We have not...

Summary

In this chapter, we emphasized the importance of disaster recovery planning, backup and restore strategies, and troubleshooting various system issues. Every system administrator should be able to put their knowledge into practice when disaster strikes. Different types of failures will eventually hit the running servers, so solutions should be found as soon as possible to ensure minimal downtime and to prevent data loss.

This chapter represented the culmination of the Advanced Linux Administration section of this book. In the next chapter, we will introduce you to server administration, with emphasis on KVM virtual machine management, Docker containers, and different types of Linux server configuration.

Questions

Troubleshooting is problem-solving at its best. Before we dive into the server section, let’s test your troubleshooting knowledge:

  1. Try to draft a DRP for your private network or small business.
  2. Back up your entire system using the 321 rule.
  3. Find out what your system’s top 10 processes are that use CPU the most.
  4. Find out what your system’s top 10 processes are that use RAM the most.

Further reading

lock icon The rest of the chapter is locked
You have been reading a chapter from
Mastering Linux Administration - Second Edition
Published in: Mar 2024 Publisher: Packt ISBN-13: 9781837630691
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}