forked from ungleich-public/ccollect
Requirements added
This commit is contained in:
parent
2a331446a7
commit
ea4afb014f
3 changed files with 41 additions and 1 deletions
3
README
3
README
|
@ -46,6 +46,9 @@ $CCOLLECT_CONF/
|
||||||
|
|
||||||
If this file exists in the source specification -v will be passed to rsync.
|
If this file exists in the source specification -v will be passed to rsync.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
exclude - a new line seperated list of paths to exclude
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
destination - a link to the destination directory
|
destination - a link to the destination directory
|
||||||
|
|
||||||
|
|
11
REQUIREMENTS
Normal file
11
REQUIREMENTS
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
ccollect.sh, Nico Schottelius, 2005-12-06
|
||||||
|
Requirements
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
You need at least:
|
||||||
|
|
||||||
|
- rsync
|
||||||
|
- cp with support for hard links
|
||||||
|
- ssh if you want to use rsync over ssh
|
||||||
|
- a bourne shell (/bin/sh) compatible shell
|
28
ccollect.sh
28
ccollect.sh
|
@ -40,7 +40,7 @@ errecho()
|
||||||
#
|
#
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "$(basename $0): [args] <sources to backup>"
|
echo "$(basename $0): [args] <intervall name> <sources to backup>"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Nico Schottelius (nico-linux-ccollect schottelius.org) - 2005-12-06"
|
echo " Nico Schottelius (nico-linux-ccollect schottelius.org) - 2005-12-06"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -135,6 +135,12 @@ while [ "$i" -lt "$no_shares" ]; do
|
||||||
c_dest="$backup/destination"
|
c_dest="$backup/destination"
|
||||||
c_exclude="$backup/exclude"
|
c_exclude="$backup/exclude"
|
||||||
|
|
||||||
|
#
|
||||||
|
# standard rsync options
|
||||||
|
#
|
||||||
|
VERBOSE=""
|
||||||
|
EXCLUDE=""
|
||||||
|
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
|
|
||||||
echo "Beginning to backup \"$name\" ..."
|
echo "Beginning to backup \"$name\" ..."
|
||||||
|
@ -166,7 +172,27 @@ while [ "$i" -lt "$no_shares" ]; do
|
||||||
if [ -f "$c_exclude" ]; then
|
if [ -f "$c_exclude" ]; then
|
||||||
errecho "Destination $c_dest does not link to a directory. Skipping."
|
errecho "Destination $c_dest does not link to a directory. Skipping."
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
while read tmp; do
|
||||||
|
EXCLUDE="$EXCLUDE --exclude \"$tmp\""
|
||||||
|
done < "$c_exclude"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# clone the old directory with hardlinks
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# the rsync part
|
||||||
|
#
|
||||||
|
echo rsync --delete $VERBOSE $EXCLUDE
|
||||||
done
|
done
|
||||||
|
|
||||||
|
#
|
||||||
|
# Be a good parent and wait for our children, if they are running wild parallel
|
||||||
|
#
|
||||||
|
if [ "$PARALLEL" = 1 ]; then
|
||||||
|
wait
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f "$TMP"
|
rm -f "$TMP"
|
||||||
|
|
Loading…
Reference in a new issue