why reinvent the wheel? Go to freshmeat.net and type cd backup into the
search. cdbkup is the one I picked, it seems to work. I only use it for
my MP3 repository though, everything else is just rsynced to multiple
systems.

On Sun, 2003-06-08 at 21:51, Michael Holt wrote:
> Hey,
> I'm looking for some help on my little backup script for my server.  I'm
> not a real savvy scripter so please bare with me :)
> I googled around awhile back and put together a bu script that has served
> my purpose well until now.  It's just a few lines as you will see and I
> use it with cron to make a cdrw every morning at 3am.
> 
> Now the info on my server is starting to outgrow just on cdrw (jpgs and
> such) so I would like to know how I can modify my script to be able to
> exclude either certain files or directories.  I imagine that sed would be
> involved, but I don't completely understand that tool so I'm hoping that
> someone might be able to give me some pointers and maybe even explain how
> the code will work in that setting.  Well, here's what I've got now:
> 
> 
> #!/bin/bash
> #
> # create daily backup of essential files
> #
> DATA="/var"
> CONFIG="/etc"
> #
> set $(date)
> #
> # daily full backup:
> #
> tar -cvf "/mnt/backup/data/df$2$3.tgz" $DATA
> #
> tar -cvf "/mnt/backup/config/cf$2$3.tgz" $CONFIG
> #
> # make iso image and burn it to disk:
> mkisofs -o /tmp/backup.iso /mnt/backup/*
> #
> cdrecord -v blank=fast dev=0,2,0 speed=2 -eject /tmp/backup.iso
> rm -f /tmp/backup.iso
> rm -f /mnt/backup/data/*
> rm -f /mnt/backup/config/*
> 
> 
> In this setting, I can just add all the directories that I want to back
> up, but it would be much simpler to add just the parent directories and
> then exclude *.jpg for example or maybe a whole child directory.
> 
> Thanks a bunch for any help!  Mike
> 
> 
> --
> Michael Holt
> Snohomish, WA                      (o_
> [EMAIL PROTECTED]    (o_  (o_  //\
> www.holt-tech.net        (/)_ (/)_ V_/_    www.mandrake.com
> ============================================================<
> 
> 
> 
> 
> ______________________________________________________________________
> 
> Want to buy your Pack or Services from MandrakeSoft? 
> Go to http://www.mandrakestore.com
-- 
Jack Coates
Monkeynoodle: A Scientific Venture...
http://www.monkeynoodle.org/resume.html


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to