From owner-freebsd-questions@FreeBSD.ORG Tue Sep 30 23:22:35 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75B3A106568B for ; Tue, 30 Sep 2008 23:22:35 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: from mx1.identry.com (on.identry.com [66.111.0.194]) by mx1.freebsd.org (Postfix) with ESMTP id 152838FC0C for ; Tue, 30 Sep 2008 23:22:34 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: (qmail 91051 invoked by uid 89); 30 Sep 2008 23:22:34 -0000 Received: from unknown (HELO ?192.168.1.110?) (jalmberg@75.127.142.66) by mx1.identry.com with ESMTPA; 30 Sep 2008 23:22:34 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <7F7FCA1B-E46C-4A44-9569-D6638A550FCE@hughes.net> References: <835F48BA-494E-44A0-8D2B-D9F139AB2125@identry.com> <7F7FCA1B-E46C-4A44-9569-D6638A550FCE@hughes.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: John Almberg Date: Tue, 30 Sep 2008 19:22:33 -0400 To: freebsd-questions@freebsd.org X-Mailer: Apple Mail (2.752.3) Subject: Re: Best way to back up mysql database X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2008 23:22:35 -0000 > > DATE=`date +%a` > # > echo $DATE > # > echo Backup Mysql database > mysqldump -h localhost -u YOURSQLUSERID -pYOURPASSWORD YOURDATABASE > >/usr/somedirectory/somefile_$DATE.backup > gzip -f /usr/somedirectory/somefile_$DATE.backup > /usr/bin/at -f /usr/somedirectory/mysqlbackup.sh midnight Ah, a much simpler solution than my ruby script. I hadn't thought to zip up the file before transferring it. That's an improvement I must add. Thanks: John