From owner-freebsd-questions Thu Jun 15 19: 5:23 2000 Delivered-To: freebsd-questions@freebsd.org Received: from pop.idx.com.au (pop.idx.com.au [203.14.30.10]) by hub.freebsd.org (Postfix) with ESMTP id 04CBC37B68C for ; Thu, 15 Jun 2000 19:05:18 -0700 (PDT) (envelope-from dannyh@idx.com.au) Received: from desktop.freebsd.org (idxwc07-40.idx.com.au [203.166.2.40]) by pop.idx.com.au (8.9.3/8.9.3) with SMTP id MAA12490 for ; Fri, 16 Jun 2000 12:05:14 +1000 From: Danny To: freebsd-questions@freebsd.org Subject: shell scripting and Samba Date: Sat, 17 Jun 2000 12:06:15 +1000 X-Mailer: KMail [version 1.0.21] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00061712140108.00338@desktop.freebsd.org> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -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