#-- Description:
#--   This script is designed to create and 'rotate' the backup files for the cvs repository
#--   on the 'local server' which is located in the 'local' in calle blanqueria, barcelona
#--   . This script is probably being automatically run by the 'cron' daemon
#--   at a frequency as specified in the /etc/crontab file.
#--
#--
# See Also:
#--   backup-vanessa-.sh, backup-ella-web.sh
# Author:
#   m.j.bishop

 if [ "$1" = "" ]
 then
   echo "usage: $0 go"
   cat $0 | sed -n "/^[ ]*#/p" 
   exit 1;
 fi

cd /var/backups/the-cvs-repository/

for i in $(seq 12 -1 1);
do 
  let j=$i+1; 
  cp cvs-repository.tar.gz.$i cvs-repository.tar.gz.$j; 
done; 



cd /var/lib/
tar -zcvf cvs-repository.tar.gz cvs
cd /var/backups/the-cvs-repository/
cp cvs-repository.tar.gz cvs-repository.tar.gz.1
cp /var/lib/cvs-repository.tar.gz .