[OLUG] can we talk backups?
Vincent
vraffensberger at home.com
Sun Mar 19 07:37:54 UTC 2000
I forgot to mention the trick to getting all your configuration files
from your home directory into the list with out listing them all out is
to use this as a path:
/home/name/\.??*
Otherwise you'll tar ".."
Vincent wrote:
>
> Just to get the subject fired up a little, here's a script I've made to
> do back-ups. I pasted it as a quote in case word-wrap mangles it...).
> I run rhis every night on two different machines and a copy of each is
> stored on each and deletes the old ones. My bu-list contains /etc
> /home/httpd /var/log and /home/name/\.* The tar file is typically 4MB.
> It could probably use some work, but it's better than nothing.
>
> > #!/bin/sh
> >
> > PC=`/bin/uname -n`
> > BIN=/root/bin
> > BLOC=/var/backup
> > JDATE=`/bin/date +%Y%j`
> > export PC BIN BLOC JDATE
> > BUF=${BLOC}/${PC}.daily_backup.${JDATE}.tar.gz
> > BLOG=${BLOC}/${PC}.daily_backup.${JDATE}.log
> > LIST=${BIN}/bu-list
> > OLD=`/usr/bin/expr $JDATE - 10`
> > export BUF BLOG OLD
> >
> > /bin/echo "Starting Back-up ..be patient"
> > /bin/date >> ${BLOG} 2>&1
> > /bin/df -hal >> ${BLOG} 2>&1
> > /bin/tar -czvf ${BUF} -T ${LIST} >> ${BLOG} 2>&1
> > /bin/rm -f ${BLOC}/*.daily_backup.${OLD}.* >> ${BLOG} 2>&1
> > /usr/bin/rcp ${BUF} mypc2:${BLOC}
> > /bin/sleep 5
> > /usr/bin/rsh mypc2 ls -lah ${BLOC} >> ${BLOG} 2>&1
> > /bin/sleep 3
> > /usr/bin/rsh mypc2 /bin/rm -f ${BLOC}/*.daily_backup.${OLD}.* >> ${BLOG} 2>&1
> > /bin/sleep 3
> > /usr/bin/rsh mypc2 df -hal >> ${BLOG} 2>&1
> > /bin/sleep 3
> > /usr/bin/rcp ${BLOG} mypc2:${BLOC}
> > /bin/sleep 5
> > /bin/df -hal >> ${BLOG} 2>&1
> > /bin/date >> ${BLOG} 2>&1
> > /bin/echo "Finished" >> ${BLOG} 2>&1
> > /bin/echo "Finished"
-------------------------------------------------------------------------
Sent by OLUG Mailing list Manager, run by ezmlm. http://olug.bstc.net/
To unsubscribe: `echo unsubsribe | mail olug-unsubscribe at bstc.net`
More information about the OLUG
mailing list