]> wagner.pp.ru Git - sites/csbook.git/commitdiff
just some changes...
authorvsl <vsl>
Sat, 21 Dec 2002 00:29:42 +0000 (00:29 +0000)
committervsl <vsl>
Sat, 21 Dec 2002 00:29:42 +0000 (00:29 +0000)
chapters/backups.tex

index 7ed696d94b779e29883b66b30e5b28a0130c7f32..e63d6649cf59d387592fa4651a216af854e7b4d6 100644 (file)
@@ -1,6 +1,9 @@
 
 \section{úÁÂÏÔÁ Ï ÓÏÈÒÁÎÎÏÓÔÉ ÄÁÎÎÙÈ}
 
+% ÔÕÔ ÎÁÄÏ ÂÙ ÏÂÝÉÈ ÓÌÏ× ÐÒÏ ÎÅÏÂÈÏÄÉÍÏÓÔØ backup--Ï×, ÓÔÒÁÛÉÌÏË ÐÒÏ
+% ÐÏÓÌÅÄÓÔ×ÉÑ ÏÔ ÐÏÔÅÒÉ ÄÁÎÎÙÈ, É ÔÏÍÕ ÐÏÄÏÂÎÏÅ.
+
  äÌÑ ÏÒÇÁÎÉÚÁÃÉÉ ÓÉÓÔÅÍÙ ÓÏÈÒÁÎÅÎÉÑ ÒÅÚÅÒ×ÎÙÈ ËÏÐÉÊ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÈ ÄÁÎÎÙÈ
 ÔÒÅÂÕÅÔÓÑ ÏÐÒÅÄÅÌÉÔØ:
 \begin{itemize}
 
  ðÅÒ×ÙÊ ÜÔÁРÒÅÁÌÉÚÕÅÔÓÑ ×ÅÓØÍÁ ÜÌÅÍÅÎÔÁÒÎÏ, Ó ÐÏÍÏÝØÀ ÕÔÉÌÉÔÙ 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}