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

Re: shell scripts



try excluding dev, i think you are hitting something like /dev/random or
/dev/zero

also use -v to make tar it more verbose so you can see what file it is
tar-ing up

lastly you can compress with tar, no need to tar then compress.  check
the man page for the -z and -j switches


hbrhodes wrote:
> can you guys look at my shell scripts i made?  i am having problems
> backing up my computer (full) and with my usb drive.  what is
> happening is that the drive only has 175mgs of information, yet when
> it tries to TAR the information it just keeps going and going and
> going.  i started it before i left for school and when i got back it
> was 45gigs.  i don't believe there are any files on that drive that
> are linked, but i thought TAR only backed up the link and not
> everything past it (dereferenced it).  i know the command for that is
> '-h' or '--dereference.'
>
> the other thing i'm trying to do is make my RAR folder owned by root
> (+rwx) and group'd by wheel (+r-w+x).  i stuck a file link in /bin/
> for access system wide.  now last time (few times i format a lot) i
> did this, it has alwasy worked fine.  but now it won't let me.
>
> i am using FC3 now.  i'm trying to TAR everything for backups.  here
> is the info.
>
> #!/bin/bash
> #backup of system information, backup-000
> tar -cf /1435/archive/`date +'%Y_%m%d'`-fc4backup.tar -pP
> --label="Fedora Core 4 Full Backup" --exclude=mnt --exclude=proc
> --exclude=var/spool/squid --exclude=1435 --exclude=*.iso
> --exclude=*.rpm --exclude=usr/local/games --exclude=cache / /.*
> gzip -9 /1435/archive/*.tar
>
> #!/bin/bash
> #backup of my personal files for college; backup-001
> tar -cf /1435/archive/`date +'%Y_%m%d'`-the.hole.tar -pP
> --label="SEMo_U Full Backup" --exclude=cache /1435/the.hole/
> tar -cf /1435/archive/`date +'%Y_%m%d'`-the.hole.tar -pP
> --label="SEMo_U Full Backup" --exclude=cache /1435/the.hole/.*
> gzip -9 /1435/archive/*.tar
>
> #!/bin/bash
> #USER OWNERSHIPS
> chown -cR hbrhodes /1435
> chown -cR hbrhodes /1435/the.hole
> chown -cR root /1435/the.hole/rar
> chown -cR root /1435/lost+found
> #GROUP OWNERSHIPS
> chgrp -cR wheel /1435
> chgrp -cR wheel /1435/the.hole/rar
> chgrp -cR root /1435/lost+found
> chgrp -cR root /1435/the.hole/lost+found
> #SET PERMISSIONS
> chmod -cR u+rwx,g+r-w+x,o-rwx /1435
> chmod -cR u+rwx,g-rwx,o-rwx /1435/pub/movies
> chmod -cR u+rwx,g+r-w+x,o-rwx /1435/the.hole
>


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