Re: Backup script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12:11 13/03/2006, you wrote:

bernd pinter wrote:
i have the same problem half a year ago: you need a blank in the first row of the script!
use:
#! /bin/bash
that should work...

Having a space there shouldn't make any difference. Try it with a simple script for yourself.

Paul.

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



#!/bin/bash

SVNREPOSPATH=/var/www/html/svnrepos/
HOTCOPIESPATH=/root/temphotcopies/
TARGETSERVERADDRESS=192.168.127.250
TARGETSERVERPATH=/home/svnserverdumps/daily

for reponame in $(ls --format=single-column $SVNREPOSPATH)
do
  if [ -d $SVNREPOSPATH$reponame ]
  then
    echo $SVNREPOSPATH$reponame
    rm -rf $HOTCOPIESPATH*
    mkdir $HOTCOPIESPATH$reponame
    svnadmin hotcopy $SVNREPOSPATH$reponame $HOTCOPIESPATH$reponame
svnadmin dump $HOTCOPIESPATH$reponame > /home/davef/svn/dumpfiles/daily/$reponame".svndump"
    rm -rf $HOTCOPIESPATH*
  else
    echo $SVNREPOSPATH$reponame not dumped
  fi
done

# For what it's worth this works for me. Runs as a cron job each night.
# Replace the subversion bits with tar bits and use at your peril!

# Dave Fletcher


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux