Hi!
I want to write a shell script which will take the backup of individual user home dirs existing in /home partition. I am using the following script but it is continuing to be in loop and it is taking all the backup in a single tar file.
#!/bin/sh
# thsi script is used to take the backup of individual folders
# this script is userd to take the complete backup of the /home users and /apps user
# AUTHOR : - Veer Kumar
clear
cd /home/
for files in *
do
set $files
OF=/data/home/`hostname`_$1_bkp_$(date +%d%m%Y).tar.gz
#echo $OF
tar -czvf $OF *
done # exiting for loop
unset $files # un setting set variables
exit 0 # exititng shell script
can any one help me to take the backup of all users in /home partition.
Thanks,
Veer Kumar.

Reply With Quote
