From: vsl Date: Thu, 2 Jan 2003 17:24:07 +0000 (+0000) Subject: some changes X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=7ed2f39e9d95153c4971d1d8ff53b3128a7f6924;p=sites%2Fcsbook.git some changes --- diff --git a/chapters/backups.tex b/chapters/backups.tex index 330c4cb..c176152 100644 --- a/chapters/backups.tex +++ b/chapters/backups.tex @@ -1,8 +1,31 @@ \section{úÁÂÏÔÁ Ï ÓÏÈÒÁÎÎÏÓÔÉ ÄÁÎÎÙÈ} -% ÔÕÔ ÎÁÄÏ ÂÙ ÏÂÝÉÈ ÓÌÏ× ÐÒÏ ÎÅÏÂÈÏÄÉÍÏÓÔØ backup--Ï×, ÓÔÒÁÛÉÌÏË ÐÒÏ -% ÐÏÓÌÅÄÓÔ×ÉÑ ÏÔ ÐÏÔÅÒÉ ÄÁÎÎÙÈ, É ÔÏÍÕ ÐÏÄÏÂÎÏÅ. + éÚ×ÅÓÔÎÏ, ÞÔÏ ÐÏËÁ ÒÁË ÎÁ ÇÏÒÅ ÎÅ Ó×ÉÓÔÎÅÔ, ÍÕÖÉË ÎÅ ÐÅÒÅËÒÅÓÔÉÔÓÑ. +âÏÌØÛÉÎÓÔ×Ï ÐÏÌØÚÏ×ÁÔÅÌÅÊ ÐÏÎÉÍÁÅÔ ÎÅÏÂÈÏÄÉÍÏÓÔØ × ×ÅÄÅÎÉÉ ÁÒÈÉ×Á ÒÅÚÅÒ×ÎÙÈ +ËÏÐÉÊ ÌÉÛØ ÐÏÓÌÅ ÓÅÒØ£ÚÎÏÊ ÐÏÔÅÒÉ ×ÁÖÎÙÈ ÄÁÎÎÙÈ É ÐÏÌÕÞÅÎÎÏÇÏ × ÒÅÚÕÌØÔÁÔÅ +ÎÁÇÏÎÑÑ ÏÔ ÎÁÞÁÌØÓÔ×Á. éÎÏÇÄÁ ÜÔÏ ÂÙ×ÁÅÔ ×ÅÓØÍÁ ÂÏÌØÎÏ É ÏÂÉÄÎÏ. åÝ£ +ÂÏÌØÎÅÅ ÏÂÉÄÎÅÅ, ËÏÇÄÁ ÔÅÒÑÀÔÓÑ Ó×ÏÉ, ÌÉÞÎÙÅ ÄÁÎÎÙÅ - ÌÀÂÉÍÙÊ +ÆÏÔÏÁÌØÂÏÍ, ÁÒÈÉ× ÓÔÁÒÙÈ ÄÏÂÒÙÈ ÉÇÒÕÛÅË, ÐÏÞÔÏ×ÙÊ ÑÝÉË, ÇÄÅ +ÂÙÌÁ ÐÅÒÅÐÉÓËÁ Ó ×ÉÒÔÕÁÌØÎÏÊ ÌÀÂÏ×ÎÉÃÅÊ. ëÏÎÅÞÎÏ ÖÅ, ÈÏÞÅÔÓÑ ×Ó£ ÉÓÐÙÔÁÔØ ÎÁ +ÓÅÂÅ, É ÓÁÍÏÓÔÏÑÔÅÌØÎÏ ÕÂÅÄÉÔØÓÑ × ÎÅÎÁÄ£ÖÎÏÓÔÉ ÓÉÓÔÅÍ ÈÒÁÎÅÎÉÑ ÄÁÎÎÙÈ --- +ÎÏ ÍÙ ÂÙ ÎÅ ÓÏ×ÅÔÏ×ÁÌÉ. ðÒÏÝÅ ÕÞÉÔØÓÑ ÎÁ ÞÕÖÉÈ ÏÛÉÂËÁÈ. + + éÔÁË, ËÏÍÐØÀÔÅÒ --- ÓÉÓÔÅÍÁ ÄÁÌÅËÏ ÎÅ ÎÁÄ£ÖÎÁÑ, ÐÏÄ×ÅÒÖÅÎÎÁÑ ÄÅÊÓÔ×ÉÀ +ÚÁËÏÎÏ× íÅÒÆÉ, ËÁË É ×ÏÏÂÝÅ ÌÀÂÁÑ ÓÏÚÄÁÎÎÁÑ ÞÅÌÏ×ÅËÏÍ ÉÌÉ ÐÒÉÒÏÄÏÊ ÔÅÈÎÉËÁ. +ëÒÏÍÅ ÅÓÔÅÓÔ×ÅÎÎÙÈ ÐÒÉÞÉÎ, ÔÁËÉÈ, ËÁË ÆÉÚÉÞÅÓËÁÑ ÎÅÉÓÐÒÁ×ÎÏÓÔØ ÏÂÏÒÕÄÏ×ÁÎÉÑ, +ÐÒÑÍÏÅ ÐÏÐÁÄÁÎÉÅ ÍÅÔÅÏÒÉÔÁ × ÓÉÓÔÅÍÎÙÊ ÂÌÏË, ÔÅÒÒÏÒÉÓÔÉÞÅÓËÉÅ ÁËÔÙ, ÐÒÏÌÉÔÙÊ +ËÕÄÁ ÎÅ ÓÌÅÄÕÅÔ ÞÁÊ ÉÌÉ ÚÒÑ ÐÏÄ×ÅÒÎÕ×ÛÁÑÓÑ ÐÏÄ ÒÕËÕ × ÍÉÎÕÔÙ ÇÎÅ×Á ËÕ×ÁÌÄÁ, +ÅÓÔØ É ×ÎÕÔÒÅÎÎÉÅ ÐÒÅÄÐÏÓÙÌËÉ Ë ÐÏÒÞÅ É ÐÏÔÅÒÅ ÄÁÎÎÙÈ --- ÏÛÉÂËÉ ÉÌÉ +ÎÅÄÏÄÅÌËÉ × ÐÒÏÇÒÁÍÍÎÏÍ ÏÂÅÓÐÅÞÅÎÉÉ, ÎÅÏÓÔÏÒÏÖÎÙÅ ÄÅÊÓÔ×ÉÑ +ÐÏÌØÚÏ×ÁÔÅÌÑ, ÎÅËÏÒÒÅËÔÎÁÑ ÏÒÇÁÎÉÚÁÃÉÑ ÓÁÍÉÈ ÄÁÎÎÙÈ. áÂÓÏÌÀÔÎÏÊ ÓÏÈÒÁÎÎÏÓÔÉ +ÄÁÎÎÙÈ, ÎÁ ÕÒÏ×ÎÅ ``ÒÕËÏÐÉÓÉ ÎÅ ÇÏÒÑÔ'', ÇÁÒÁÎÔÉÒÏ×ÁÔØ ÎÅ ÍÏÖÅÔ ÎÉÞÔÏ, ÎÏ +ÓÔÏÉÔ ÈÏÔÑ ÂÙ ÎÅÍÎÏÇÏ ÐÏ×ÙÓÉÔØ ÎÁÄ£ÖÎÏÓÔØ ÓÉÓÔÅÍÙ É ÚÁÓÔÒÁÈÏ×ÁÔØ ÓÅÂÑ ÏÔ +ÎÁÉÂÏÌÅÅ ÞÁÓÔÙÈ ÓÌÕÞÁÊÎÏÓÔÅÊ. ïÄÉÎ ÉÚ ÏÓÎÏ×ÎÙÈ É ÎÁÉÂÏÌÅÅ ÐÒÏÓÔÙÈ ÓÐÏÓÏÂÏ× +ÐÏÄÏÂÎÏÊ ÓÔÒÁÈÏ×ËÉ --- ×ÅÄÅÎÉÅ ÁÒÈÉ×Á ÒÅÚÅÒ×ÎÙÈ ËÏÐÉÊ. äÁÌÅÅ ÍÙ ÒÁÓÓÍÏÔÒÉÍ +ÎÅËÏÔÏÒÙÅ ÏÂÝÉÅ ÐÒÉÎÃÉÐÙ É ÐÒÏÓÔÙÅ ÐÒÉÍÅÒÙ ÒÅÁÌÉÚÁÃÉÉ ÁÒÈÉ×Á. + +% .... äÌÑ ÏÒÇÁÎÉÚÁÃÉÉ ÓÉÓÔÅÍÙ ÓÏÈÒÁÎÅÎÉÑ ÒÅÚÅÒ×ÎÙÈ ËÏÐÉÊ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÈ ÄÁÎÎÙÈ ÔÒÅÂÕÅÔÓÑ ÏÐÒÅÄÅÌÉÔØ: @@ -122,7 +145,7 @@ BTARS=$BASE/btars/ BASENAME=$1--`date +%Y-%m-%d-%s` TARNAME=$BASENAME.tar LOGNAME=$BASENAME.log -LOG0NAME=$1--current.log +LOG0NAME=$1--current cp $ILOGS/$LOG0NAME $ILOGS/$LOGNAME @@ -152,7 +175,7 @@ tar --listed-incremental=$ILOGS/$1-initial.log \ -cjf $BTARS/$1-base.tar.bz2 \ $BASE/current/$1/ -cp $ILOGS/$1-initial.log $ILOGS/$1--current.log +cp $ILOGS/$1-initial.log $ILOGS/$1--current \end{verbatim} @@ -178,3 +201,29 @@ $INIT cvsroot $INIT archive \end{verbatim} + ôÅÐÅÒØ ÐÒÉÓÔÕÐÉÍ Ë ÚÁÐÏÌÎÅÎÉÀ ÂÏÌ×ÁÎÏË CDRW. + +%%% æÁÊÌ prepareiso.sh +\begin{verbatim} +#!/bin/sh + +BASE=/mnt/backups/user/ +ILOGS=$BASE/ilogs/ +ITARS=$BASE/itars/ +BTARS=$BASE/btars/ +CDCON=$BASE/cdcon/ +CD=$BASE/newcd/ +VOLUME=`cat $CDCON/nextvol` +SSN=`cat $CDCON/session` +OUT=$CD/vol$VOLUME +mkdir -p $OUT/btars/ +mkdir -p $OUT/itars/ +mkdir -p $OUT/ilogs/ +mv $BTARS/*.tar* $OUT/btars/ +mv $ITARS/*.tar* $OUT/itars/ +mv $ILOGS/*.log $OUT/ilogs/ +bzip2 $OUT/ilogs/*.log +mkisofs -r -M $CDCON/backup.iso -o $CD/nextsession.iso $OUT +rm -Rf $OUT +\end{verbatim} +