[plug] Urgent Help Required - Payment Expected

Brad Campbell brad at wasp.net.au
Mon Nov 17 21:19:05 WST 2003


Cameron Patrick wrote:

Lots of good advice..

> PS.  Now---or once you've got some of your data back---would be a good
> time to think seriously about backups...  If you have a couple of
> networked computers, a 'set and forget' way is to have a nightly cron
> job back up your home partition (or the important bits there of) using
> rsync[1] onto the other machine.  I've been using a system along those
> lines for a while and it's come in handy a few times ("No! Not rm -r! I
> meant mv you stupid machine! Aieeee!")  Though backups on CD-R/DVD-R or
> the like are also good to have.

This one has caught me a number of times.. You think I'd learn..

bklaptop:~>rm -r temp/ *
instead of
bklaptop:~>rm -r temp/*

That hurts, but it's a good way of cleaning out your homedir..

For interests sake, this is how I run incremental backups on my laptop
I have an authorized_keys login from machine to machine..

bklaptop:~>cat backup.sh
#!/bin/sh
DA=`date +%m%d%y-%H%M`
NAME=laptop/$DA-laptop
NOW=`date +%m/%d/%y`
DOW=`date +%w`
# Remove incremental file on Monday for a full backup

if [ $DOW = "1" ] ; then
rm ~/.backup
fi

echo Network Backup Script
echo Date - $DA
echo Compressing and sending data
tar --exclude-from=backup.excl \
         -g ~/.backup \
         -cvzf - \
         ~/pascal \
         ~/documents \
         ~/audio \
         ~/nsmail \
         ~/win/My\ Documents \
         ~/embeded \
         ~/mplab \
         ~/8051 \
         ~/src/wiccp \
         ~/evolution \
         ~/.thunderbird \
         | ssh brad at tv dd of=/raid/backup/$NAME.tgz


echo Done Compressing and Sending
echo Done!.. Bye Bye..

bklaptop:~>cat backup.excl
*.mp3
*.o
*.a
*.exe
*.dwg
*.wav
*.avi
Attach
/home/brad/embeded/files
/home/brad/embeded/files-devel
/home/brad/embeded/files-stable
/home/brad/embeded/src
/home/brad/8051/sdcc

I do tend to post lots of stuff that nobody has asked for, bits of 
script and that kind of guff, but I learn a lot from seeing other 
peoples scripts, perhaps someone may learn from seeing mine..

Wait till I post my script for watching/recording satellite TV! It's a 
perfect lesson on how to use bash for stuff I should be using perl for 
:p) ( I still have not learned perl )

Brad
_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list