From: vsl Date: Sat, 21 Dec 2002 00:29:42 +0000 (+0000) Subject: just some changes... X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=b46c5cbfeacab2ffbdd6a5f983d7ffd8f7826108;p=sites%2Fcsbook.git just some changes... --- diff --git a/chapters/backups.tex b/chapters/backups.tex index 7ed696d..e63d664 100644 --- a/chapters/backups.tex +++ b/chapters/backups.tex @@ -1,6 +1,9 @@ \section{úÁÂÏÔÁ Ï ÓÏÈÒÁÎÎÏÓÔÉ ÄÁÎÎÙÈ} +% ÔÕÔ ÎÁÄÏ ÂÙ ÏÂÝÉÈ ÓÌÏ× ÐÒÏ ÎÅÏÂÈÏÄÉÍÏÓÔØ backup--Ï×, ÓÔÒÁÛÉÌÏË ÐÒÏ +% ÐÏÓÌÅÄÓÔ×ÉÑ ÏÔ ÐÏÔÅÒÉ ÄÁÎÎÙÈ, É ÔÏÍÕ ÐÏÄÏÂÎÏÅ. + äÌÑ ÏÒÇÁÎÉÚÁÃÉÉ ÓÉÓÔÅÍÙ ÓÏÈÒÁÎÅÎÉÑ ÒÅÚÅÒ×ÎÙÈ ËÏÐÉÊ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÈ ÄÁÎÎÙÈ ÔÒÅÂÕÅÔÓÑ ÏÐÒÅÄÅÌÉÔØ: \begin{itemize} @@ -70,4 +73,33 @@ ðÅÒ×ÙÊ ÜÔÁÐ ÒÅÁÌÉÚÕÅÔÓÑ ×ÅÓØÍÁ ÜÌÅÍÅÎÔÁÒÎÏ, Ó ÐÏÍÏÝØÀ ÕÔÉÌÉÔÙ rsync. +%%% ÆÁÊÌ homesync.sh +\begin{verbatim} +#!/bin/sh + +mkdir -p /mnt/backups/user/current/$1 +/usr/bin/rsync -qrlHptS --delete-after \ + /home/user/$1 /mnt/backups/user/current/$1 +\end{verbatim} + +%%%ÆÁÊÌ backup0.sh +\begin{verbatim} +#!/bin/sh + +SYNC=/home/user/homesync.sh + +$SYNC cvsroot +$SYNC mail +$SYNC downloads +$SYNC archive +$SYNC work +\end{verbatim} + + åÓÔÅÓÔ×ÅÎÎÏ, ÓÉÎÈÒÏÎÉÚÁÃÉÑ ÄÏÌÖÎÁ ÐÒÏÉÓÈÏÄÉÔØ ÒÅÇÕÌÑÒÎÏ. ÷ÙÂÅÒÅÍ ÐÅÒÉÏÄ × 1 +ÞÁÓ, É ÓÏÓÔÁ×ÉÍ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÕÀ ÚÁÐÉÓØ × ÆÁÊÌ +{\tt /home/user/crontab-backups}: +\begin{verbatim} +# run 1st backup sequence every hour +0 * * * * /home/user/backup0.sh > /dev/null 2>&1 +\end{verbatim}