Fixed the general post/pre exec documentation

This commit is contained in:
Nico Schottelius 2006-01-27 22:06:00 +01:00
parent 199d81b0ef
commit 8be1535793
3 changed files with 57 additions and 9 deletions

View file

@ -1,3 +1,6 @@
0.3.1 to 0.3.2:
* added ?
0.3 to 0.3.1: 0.3 to 0.3.1:
* added support for printing a summary * added support for printing a summary
* some cosmetic changes * some cosmetic changes

View file

@ -328,6 +328,11 @@ for rebuilding the generated documentation: additionally <tt>asciidoc</tt>
</li> </li>
<li> <li>
<p> <p>
<tt>date</tt>
</p>
</li>
<li>
<p>
<tt>rsync</tt> <tt>rsync</tt>
</p> </p>
</li> </li>
@ -768,7 +773,8 @@ srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03</tt></pre>
<h3>7.2. Using hard-links requires less disk space</h3> <h3>7.2. Using hard-links requires less disk space</h3>
<div class="listingblock"> <div class="listingblock">
<div class="content"> <div class="content">
<pre><tt>[10:53] srsyg01:sources% du -sh ~/backupdir <pre><tt># du (coreutils) 5.2.1
[10:53] srsyg01:sources% du -sh ~/backupdir
4.6M /home/nico/backupdir 4.6M /home/nico/backupdir
[10:53] srsyg01:sources% du -sh ~/backupdir/* [10:53] srsyg01:sources% du -sh ~/backupdir/*
4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456
@ -784,11 +790,30 @@ srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/*
147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312
147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588</tt></pre> 147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588</tt></pre>
</div></div> </div></div>
<p>Newer versions of du also detect the hardlinks, so we can even compare
the sizes directly with du:</p>
<div class="listingblock">
<div class="content">
<pre><tt>[8:16] eiche:~# du --version | head -n 1
du (GNU coreutils) 5.93
[8:17] eiche:schwarzesloch# du -slh hydrogenium/*
19G hydrogenium/durcheinander.0
18G hydrogenium/durcheinander.2006-01-17-00:27.13820
19G hydrogenium/durcheinander.2006-01-25-23:18.31328
19G hydrogenium/durcheinander.2006-01-26-00:11.3332
[8:22] eiche:schwarzesloch# du -sh hydrogenium/*
19G hydrogenium/durcheinander.0
12G hydrogenium/durcheinander.2006-01-17-00:27.13820
1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328
200M hydrogenium/durcheinander.2006-01-26-00:11.3332</tt></pre>
</div></div>
<p>In the second report the sizes include the space the inodes of
the hardlinks allocate.</p>
</div> </div>
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Version 0.3.1<br /> Version 0.3.1<br />
Last updated 25-Jan-2006 00:15:41 CEST Last updated 27-Jan-2006 22:01:39 CEST
</div> </div>
</div> </div>
</body> </body>

View file

@ -123,16 +123,15 @@ If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or
will start `pre_exec` before the whole backup process and will start `pre_exec` before the whole backup process and
`post_exec` after backup of all sources is done. `post_exec` after backup of all sources is done.
Example: The following Example describes how to report free disk space in
human readable format before and after the whole backup process:
------------------------------------------------------------------------- -------------------------------------------------------------------------
[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ [13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/
[13:00] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec [13:00] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec
[13:01] hydrogenium:~# echo '' > /etc/ccollect/defaults/pre_exec [13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec
[13:01] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec [13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec
[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec
[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec
[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec [13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec
[13:01] hydrogenium:~# cp /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec [13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec
------------------------------------------------------------------------- -------------------------------------------------------------------------
Source configuration Source configuration
@ -513,6 +512,7 @@ Using hard-links requires less disk space
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------------------------------------- -------------------------------------------------------------------------
# du (coreutils) 5.2.1
[10:53] srsyg01:sources% du -sh ~/backupdir [10:53] srsyg01:sources% du -sh ~/backupdir
4.6M /home/nico/backupdir 4.6M /home/nico/backupdir
[10:53] srsyg01:sources% du -sh ~/backupdir/* [10:53] srsyg01:sources% du -sh ~/backupdir/*
@ -529,3 +529,23 @@ srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/*
147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312
147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588
------------------------------------------------------------------------- -------------------------------------------------------------------------
Newer versions of du also detect the hardlinks, so we can even compare
the sizes directly with du:
-------------------------------------------------------------------------
[8:16] eiche:~# du --version | head -n 1
du (GNU coreutils) 5.93
[8:17] eiche:schwarzesloch# du -slh hydrogenium/*
19G hydrogenium/durcheinander.0
18G hydrogenium/durcheinander.2006-01-17-00:27.13820
19G hydrogenium/durcheinander.2006-01-25-23:18.31328
19G hydrogenium/durcheinander.2006-01-26-00:11.3332
[8:22] eiche:schwarzesloch# du -sh hydrogenium/*
19G hydrogenium/durcheinander.0
12G hydrogenium/durcheinander.2006-01-17-00:27.13820
1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328
200M hydrogenium/durcheinander.2006-01-26-00:11.3332
-------------------------------------------------------------------------
In the second report the sizes include the space the inodes of
the hardlinks allocate.