Good Morning All,

I found this script on a newbie site.
The intent is to show one manner in which to backup your system;
and actually the backing up was just to provide an example of things that 
one can do with shell scripting.
I see that it backs up the /etc and /home directories....(actually just one 
users home directory in this case)  and I see that it could be extended to 
back up anything provided that
the user did an su first so that there would not be a rights issue encountered.
Also, it seems to assume that a full system backup has been successfully 
completed at some time in the relatively recent past.
Either that or it is assuming that the administrator would perform a fresh 
install and then restore the files to the new existing directories and 
overwrite everything.

My question is twofold:

What is your opinion of this method, and if you feel that is it lacking 
then how would you improve it?

and

Are there other vital directories that have been left out that are 
needed?  This would probably apply to doing a fresh install and then 
restoring the backed up directories.
I'm making the assumption by my description of a "full system backup in the 
relatively recent past" that this describes a full backup that has been 
performed after the latest software has been installed but probably not 
since the latest configuration change (hopefully only changing the details 
of files contained within the /etc directory)

Anyone care to bite this one and chew for a while?

<----------below this line is the script---------->

#/bin/bash
mkdir /tmp/backups
cp -rpvf /etc/ /tmp/backups
cp -rpvf /home/newbie /tmp/backups
tar -cvzf /tmp/saveme.tar.gz /tmp/backups
rm -rf /tmp/backups
echo your new backup file is complete....it is /tmp/saveme.tar.gz
echo please place it somewhere nice and safe like a CDR
exit

<---------above this line is the script---------->

TIA for any ideas, insights, and opinions,
Cleve 

Reply via email to