[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Backup method on Raq3 - whats best?
- Subject: Re: [cobalt-users] Backup method on Raq3 - whats best?
- From: "Filiberto Ricci" <filiberto@xxxxxxxxx>
- Date: Thu Mar 29 20:57:01 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
----- Original Message -----
From: "Steven Kidd" <skidd@xxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Friday, March 30, 2001 1:49 PM
Subject: RE: [cobalt-users] Backup method on Raq3 - whats best?
> Hi Filiberto,
>
> I got your list message at exactly the moment I was thinking about and
doing
> ftpback. I would love you to post your script. I'm sure I would learn
> something from it.
>
> Thanks
> Steve
>
#!/bin/sh
i=1
base=/home/sites/site
variab=`/bin/date +%U`
#careful: ` is not '
#this is for giving the tarball a different name each time see: #date --help
basestart="$base$i"
while (test -d "$base$i")
do
if (test $i -ne 3)
#this is to skip a site (if you have two server that backup each other you
have to skip backupping the site where you keep the backup of the other
server, otherwise you will backup your backup more and more)
then
if tar cf - "$base$i" | gzip | /usr/local/bin/ftpbackup -h
xxx.xxx.xxx.xxx -u USERNAME -p PASSWD -b "site$i.$variab.tar.gz";
then
echo "site$i backuppato"
else
echo "site$i NON backuppato"
fi
else
echo "site$i NON backuppato"
fi
i=`expr $i + 1`
done
tar cf - /home/spool | gzip | /usr/local/bin/ftpbackup -h xxx.xxx.xxx.xxx -u
USERNAME -p PASSWD -b spool.$variab.tar.gz
tar cf - /home/sites/home| gzip | /usr/local/bin/ftpbackup -h
xxx.xxx.xxx.xxx -u USERNAME -p PASSWD -b home.$variab.tar.gz
#change xxx.xxx.xxx.xxx to the target host
#changeUSERNAME and PASSWD to some low permission usernme and passwd.you can
also seti it to anonymous someone@xxxxxxxxx
#put it into /etc/cron.daily and set permission to 755
#chown to root
#Any comments would be appreciated
I'm everything but an expert on writing shell script...
This work with me
Filiberto