Professional Documents
Culture Documents
Chapter 3 Risk Management and Future Expansion of Linux Server
Chapter 3 Risk Management and Future Expansion of Linux Server
RISK
MANAGEMENT AND FUTURE
EXPANSION OF LINUX SERVER
DFN50303 SESI II 2021/2022
+
3.0 Risk Management And Maintenance
Of Linux Server
OBJECTIVE
Able to recover from data loss in all situation like hard drive
failure, virus attacks, theft, accidental deletes or data entry errors,
sabotage, fire, flood, earth quakes and other natural disasters.
Able to recover to an earlier state if necessary like due to data
entry errors or accidental deletes.
Able to recover as quickly as possible with minimum effort, cost
and data loss.
Require minimum ongoing human interaction and maintenance
after the initial setup. Hence able to run automated or semi-
automated.
Definition, advantages, disadvantages, time consumption –to backup and to restore, storage requirement, comparison to
other backup.
Restores are the fastest and easy to manage as the entire list of files and
folders are in one backup set.
Disadvantages (-)
Changes in files
Full backup
Incremental Backup
Diff B/up
Disadvantages
Full restore is the slowest compared to other backup types (you need the
first full backup and all increments since then)
The backup is clean and does not contain old and obsolete files
Allows for rapid full system restores including the operating system on
the same or very similar hardware.
Disadvantages
The tar command stands for tape achieve, which is the most
commonly used tape drive backup command used by the
Linux/Unix system
Used to create a collection of files and directories into a highly
compressed archive.
An archive is putting many files together into a single file on a
single tape or disk.
The tar command on Linux is often used to create .tar.gz
or .tgz archive files, also called “tarballs.”
Options in tar
-c: create an archive.
-z: Compress the archive with gzip.
-v: Display progress in the terminal while creating the
archive, also known as “verbose” mode.
-f: Allows you to specify the filename and location of the
archive.
-- directory : tells tar to switch to the root of the file
system before starting the backup.
A. AMANDA
B. Bacula
C. Dirvish
D. Mondo
E. BackupPC
Job Scheduling
Job scheduling is a feature that allows a user to submit a
command or program for execution at a specified time in
the future.
On a Linux server, it is important that certain tasks run at
certain times
The execution of the command or program could be one
time or periodically based on a pre-determined time
schedule.
* * * * * directory/script.sh
stars represent different date parts in the following order:
minute of hour (from 0 to 59)
hour of day 24hr format (from 0 to 23)
day of month (from 1 to 31)
Month of year (from 1 to 12)
day of week (from 0 to 6) (Sunday = 0 or 7)
Command or script to execute
Example
0 1 * * 1-5 /bin/tempt/script.sh
Script.sh in ‘/bin/temp/’ is executed when the system clock hits:
minute: 0
of hour: 1
of day of month: * (every day of month)
of month: * (every month)
and weekday: 1-5 (=Monday until Friday)
Schedule the script to Monday till Friday at 1 AM
Most Linux distributions are equipped with tons of monitoring. These tools provide
metrics which can be used to get information about system activities.
You can use these tools to find the possible causes of a performance problem. The
commands discussed below are some of the most basic commands when it comes to
system analysis and debugging server issues such as:
Finding out bottlenecks.
Disk (storage) bottlenecks.
CPU and memory bottlenecks.
Network bottlenecks.
Server Monitoring tools
ps – display current running processes
Lsof –find list of open file
Ntop – display network – web based tools
Parted – utility report
The ps command has several options that you can use to display
additional process information.
• -a: Prints information about all processes most frequently requested,
except process group leaders and processes not associated with a
terminal
• -e: Prints information about every process currently running
• -f: Generates a full listing
• -l: Generates a long listing
• -o format: Writes information according to the format specification
given in a format. Multiple -o options can be specified. The format
specification is interpreted as the space-character-separated
concatenation of all the format option arguments.
web based tool - ntop is the best tool to see network usage
in a way similar to what top command does for processes
i.e. it is network traffic monitoring software.
You can see network status, protocol wise distribution of
traffic for UDP, TCP, DNS, HTTP and other protocols.
Using parted with print to see the disk partitions, it will also
display the hard disk information and model
Htop
an interactive system-monitor process-viewer and process-manager. It is designed as an
alternative to the Unix program top. It shows a frequently updated list of the processes
running on a computer, normally ordered by the amount of CPU usage
Kill
command used to send a signal to a process. By default, the message sent is the termination
signal, which requests that the process exit.
There are four ways which you can quickly and easily speed
up your system to get the best performance possible out of
it.
Change GRUB Timeout - GRUB (GRand Unified
Bootloader) is a boot loader package developed to support
multiple operating systems and allow the user to select
among them during boot-up.
Startup Applications - uncheck those applications that
don’t absolutely need to be run when you first log in.