Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet216/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   212   213   214   215   216   217   218   219   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

Tape Number
Week
Usage
1
1
Full backup
2
1
Daily incremental backups for 3 days
3
1
Daily incremental backups for 3 days
4
2
Full backup
5
2
Daily incremental backups for 3 days
6
2
Daily incremental backups for 3 days
7
3
Full backup
2
3
Daily incremental backups for 3 days
3
3
Daily incremental backups for 3 days
5
4
Full backup
6
4
Daily incremental backups for 3 days
1
4
Daily incremental backups for 3 days


578

Linux with Operating System Concepts
files (and directories) that have been changed (modified, added to, and deleted) since the last 
backup and apply the option 
–g 
filename
or --
listed-incremental
=
filename
.
The more recent archiving programs are 
cpio
and 
dump
. Both cpio and tar have an 
advantage over dump in that you can select specific files or directories or both to archive 
with either cpio or tar. Additionally, tar allows you to specify criteria for file selection while 
cpio can use 
find
to obtain the files to backup. For instance, we might want to back up 
only text files or files created by a particular user.
Dump operates only on the level of file systems and so is unable to create an archive in a 
piecemeal manner. There is also a 
--newer
=
date
option available in tar that will backup 
files newer than the supplied 
date
(or alternatively, --
newer
=
file
where tar stores files 
newer than 
file
).
All three programs (dump, cpio, and tar) can perform incremental backups. Both cpio 
and tar have more primitive techniques for handling incremental backups though; so, we 
might prefer to use dump. For tar, we mentioned above using a file to compare against the 
stored files to determine recency. With cpio, you could use a find command as stated in 
the previous paragraph, but in this case, use 
–anewer
or 
–cnewer
resulting in much the 
same behavior.
Dump provides different levels of backup. A full backup is denoted as level 0. After mak-
ing a full backup, you can next specify a different level that then performs a backup of all 
changes to the file system up to the most recent incremental backup whose level is less than 
the current level number. For instance, a follow-up backup of level 1 would find anything 
new since the full backup. The next backup at level 2 would find all changes since the level 
1 backup.
In addition, dump has a feature superior to tar and cpio in terms of indexing the con-
tents of an archive. While both tar and dump allow you to view the contents of an archive, 
dump also lets you interactively find 
and
restore specific files.
14.3 TASK SCHEDULING
As a system administrator, you will most likely want to schedule processes in an attempt 
to further automate tasks. Scheduling may be for one-time execution or recurring in 
some pattern such as daily, weekly, or monthly. By automating tasks through scripts and 
scheduling them, you free your time up for other, more important tasks such as system 
monitoring, troubleshooting emergencies, and continuing education. There are many tools 
available to schedule tasks. We have already explored or mentioned some of these. Here, 
we will review them.
The earliest a task can be automated is when the system is initialized. Recall from 
Chapter 11 that during initialization, the scripts in /
etc/rc.d
are executed. The last 
script to execute during this process is 
rc.local
. In this script, the system administra-
tor is able to specify his or her own initialization tasks that were not performed by other 
start-up scripts.
For instance, imagine that your Linux machine is to run a Squid proxy server. You may 
wish to create the Squid caches and then start the proxy server. These start-up commands 
can be placed in the rc.d script.


Maintaining and Troubleshooting Linux

579
Another use of this script is to automatically mount remote file systems. This could be 
a critical step in the initialization process if you are using remote file systems as part of or 
all of /usr or /home.
There may be other tasks that you wish to run after initialization. These could include
• Log rotation
• Execution of scripts that obtain statistical information
• Data-mining analysis on log files
• Examination of user disk space for poorly protected files, users who are using too 
much space, files that have become corrupted, or files that might contain a virus
The next tool for scheduling activities is the 
anacron
service. Anacron will examine 
crontab
scheduled processes to see if any were supposed to execute during the downtime 
from which you have just booted. If any are found, then they are executed. Anacron and 
crontab are available to schedule recurring tasks. Additionally, 
at
and 
batch
are avail-
able to schedule one-time tasks.
For the remainder of this section, we will concentrate on how to use crontab and at for 
scheduling. We start with at, which is the easier of the two to understand.
14.3.1 The at Program
The at program is used for one-time scheduling. The command requires that you specify 
the time that the command should execute. The time includes both the date and the time 
on that date. Time and date are indicated by either absolute values or relative to when the 
command is being issued.
For an absolute specifier, the time format is 
HH:MM
, optionally followed by 
AM
or 
PM

If AM or PM is omitted, then the time is interpreted as being in 

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   212   213   214   215   216   217   218   219   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish