⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lsg22.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 3 页
字号:


<P>This backup cycle has one major advantage over a simple daily cycle. When the entire cycle is underway, there are 10 daily backups, which cover a two-week period. The biweekly tapes extend back over four complete daily cycles, or eight weeks. You can then recover a file or group of files from the filesystem as it was two months ago, instead of just two weeks. This backup method gives you a lot more flexibility in recovering information that was not noticed as missing or corrupt right away. If even more tapes are available, you can extend either the daily or biweekly cycle, or add monthly backups.







<BR>







<BR>







<A NAME="E68E121"></A>







<H3 ALIGN=CENTER>







<CENTER>







<FONT SIZE=5 COLOR="#FF0000"><B>Keeping Backup Logs</B></FONT></CENTER></H3>







<BR>







<P>Many system administrators begin their careers by making regular backups, as they should. However, when they get to the point where they have to restore a file from a backup tape, they have no idea which tapes include the file or which tapes were used on what days. Some system administrators get by this problem by placing a piece of paper or stick note on each tape with the date and contents on it. This solution means you have to flip through the tapes to find the one you want, though, which can be awkward when you have lots of tapes. For this reason, you should keep a backup log. (A log is a good idea for backups on other operating systems as well.)







<BR>







<P>Whenever you make a backup, you should update the backup log. A backup log doesn't have to be anything complex or elaborate. You can use the back of a notebook with a couple of vertical columns drawn in, use a form on the computer itself (which you should print out regularly, of course), or keep a loose-leaf binder with a few printed forms in it. A typical backup log needs the following information:







<BR>







<UL>







<LI>The date of the backup







<BR>







<BR>







<LI>The name of the backup tape (Daily 1, for example)







<BR>







<BR>







<LI>The filesystem being backed up







<BR>







<BR>







<LI>Whether a full or partial backup was performed, and if partial, which directories were backed up







<BR>







<BR>







</UL>







<P>You can record these four bits of information in a few seconds. For larger systems, you can add a few other pieces of information to complete a full backup record:







<BR>







<UL>







<LI>Who made the backup







<BR>







<BR>







<LI>Whether the backup was automatic (cron) or manual







<BR>







<BR>







<LI>Storage location of the tape







<BR>







<BR>







</UL>







<P>The dates of the backup help you keep track of when the last backup was performed and also act as an index for file recovery. If one of your system users knows they deleted a file by accident a week ago, you can determine the proper backup tape for the file restoration from the backup log dates.







<BR>







<P>For convenience, keep the backup log near the system. Some administrators prefer to keep the log in the same location as the backup media storage instead. Some system administrators also keep a duplicate copy of the backup log in another site, just in case of catastrophe. Do what is appropriate for your system.







<BR>







<BR>







<A NAME="E68E122"></A>







<H3 ALIGN=CENTER>







<CENTER>







<FONT SIZE=5 COLOR="#FF0000"><B>Using tar for Backups</B></FONT></CENTER></H3>







<BR>







<P>The tar (tape archiver) program is usually the command you use to save files and directories to an archive medium and recover them later. The tar command works by creating an archive file, which is a single large entity that holds many files within it (much like PKZIP does in DOS, for example). The tar command only works with archives it creates.







<BR>







<P>The format of the command is a little awkward and takes some getting used to, but fortunately most users only need a few variations of the commad. The format of the tar command is as follows:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">tar switch modifiers files</FONT></PRE>







<P>The files section of the command indicates which files or directories you want to archive or restore. You probably want to archive a full filesystem such as /usr. In the case of recovery, you may want a single file such as /usr/tparker/big_file.







<BR>







<P>The switch controls how tar reads or writes to the backup media. You can use only one switch with tar at a time. The valid switches are as follows:







<BR>















<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







c







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Creates a new archive media</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







r







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Writes to end of existing archive</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







t







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Lists names of files in an archive</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







u







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Adds files that are not already modified or archived</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







x







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Extracts from the archive</FONT>







</TABLE><P>You can add a number of modifiers to the tar command to control the archive and how tar uses it. Valid modifiers include the following:







<BR>















<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







A







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Suppresses absolute filenames</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







b







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Provides a blocking factor (1-20)</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







e







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Prevents splitting files across volumes</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







f







</FONT>



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -