Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jun 2000 12:06:15 +1000
From:      Danny <dannyh@idx.com.au>
To:        freebsd-questions@freebsd.org
Subject:   shell scripting and Samba
Message-ID:  <00061712140108.00338@desktop.freebsd.org>

next in thread | raw e-mail | index | archive | help
-Hello
- I am trying to automate my backup instead of manually tar cvf whatever

What the script should do is the following ;-
1) make a tar file of the user home directory
2) copies it to the backup directory
4) This tar file should rotate like so in the backup directory

       $username1.tar.gz
       $username2.tar.gz
       $username3.tar.gz
       $username1.tar.gz (overwritting username1 from the beginning)    

3) in smb.conf in [home] root postexec /usr/local/etc/backup.sh

Here is the copy of my script:-

#!/bin/sh
# Danny 15/6/00

# Checks if /home/backup exists

if [ ! -f /home/backup ]; then
cd /home/$user/
tar cvf $user.tar *
gzip $user.tar
cp $user.tar.gz /home/backup/

fi
     
- Sadly, the above script doesn't work and I need some kind of direction or
assistance to make it work.



--

------------------------------------------------------------

You are not authorized to use my email address for spam or any purpose
whatsoever. Remove my email address from your databases immediately and do
not attempt to email me in any way.

------------------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00061712140108.00338>