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

Re: bashing

i'm coming back tomorrow to re-read what you wrote. i'm gong to try and 
restate what i said, exactly how i meant it.  sometimes i write things 
down in a 'round about way' without actually saying what i want ... k?  
here goes

i have a USB disk (two of them).  it has my college files on it, i've 
learned how to make LVM and i made those two files into an LVM
pvcreate /dev/sda1 /dev/sdb1
vgcreate VolGroup01 /dev/sda1 /dev/sdb1
#pvdisplay /dev/sda1 /dev/sdb1
vgdisplay VolGroup01 | grep "Total PE"
#lvcreate -l736 -nLogVol00 VolGroup01
lvcreate -l 181 VolGroup01 -nLogVol00
vgchange -a y VolGroup01
mkfs.ext3 /dev/VolGroup01/LogVol00
mount /dev/VolGroup01/LogVol00 /BloomCounty/Binkley/


okay .... so now i have my working LVM,  and i have put all my files on 
it from about two years or so back.  i want to back it up to my archive 
directory /BloomCounty/archive.  i also want to back up some other stuff 
so i make a shell script to do that (or a bash/ batch file).
###backup of system information
tar -cvpf /BloomCounty/archive/`date +'%Y_%m%d'`_fc4backup.tar 
--label="Fedora Core 4 Full Backup" --exclude=mnt --exclude=proc 
--exclude=var/spool/squid --exclude=BloomCounty --exclude=*.iso 
--exclude=*.rpm --exclude-caches --exclude=usr/local/games /
gzip -9 ~/archive/*.tar
###backup of my personal files for college
tar -cvpf /BloomCounty/archive/`date +'%Y_%m%d'`_SEMo_U.tar 
--exclude-caches --label="SEMo_U Full Backup" /BloomCounty/Binkley/
gzip -9 ~/archive/*.tar
###backup of RPM's from yum
tar -cvpf /BloomCounty/archive/`date +'%Y_%m%d'`_RPMs.tar 
--exclude-caches /var/cache/yum/
gzip -9 ~/archive/*.tar

rather than tar a file, and gzip it, tar a file and gzip it (at 9 mind 
you), i thought i could tar all the files mentioned above, and then have 
a bash script that would say take each file above:
and make each of them into a gzip file at compression 9 without .... 
having to type it all in, like:
gzip -9 /BloomCounty/archive/2006*FC4.tar   (and so on for each file).

i was wondering if i could tar all the files, and then if there was some 
nifty way to compress each of them automagically without me having to 
hit any buttons.  i can have crontab call the script to life that tars 
everything (making backups) and then gzips it for me.
gzip $NAME

To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.