From owner-freebsd-questions Wed Feb 12 12: 7:11 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3436737B401 for ; Wed, 12 Feb 2003 12:07:10 -0800 (PST) Received: from ra.dweebsoft.com (ra.dweebsoft.com [209.237.40.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8EEE43F75 for ; Wed, 12 Feb 2003 12:07:09 -0800 (PST) (envelope-from daxbert_news@dweebsoft.com) Received: from daxhome (anubis.dweebsoft.com [64.81.58.36]) by ra.dweebsoft.com (8.12.6/8.12.3) with SMTP id h1CK7947045778; Wed, 12 Feb 2003 12:07:09 -0800 (PST) (envelope-from daxbert_news@dweebsoft.com) Message-ID: <042501c2d2d2$52f5f0d0$0a0aa8c0@dweebsoft.com> From: "Daxbert" To: "Brian Henning" , "freebsd" References: Subject: Re: backup Date: Wed, 12 Feb 2003 12:07:09 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4920.2300 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Hello- > I would like to backup my cvs repository in case my system goes down or incase i > want to move the repository. can i tar up the files in the root directory and > save it on a cd? > > I would also like to back up my mysql databases for the same reasons. can i tar > those up for later use? > Not sure about cvs... However, for mysql, you should use mysqldump. # mysqldump -u {username} -p{password} {database} > ./{database}.`date +%Y%m%d-%H%M`.sql This will give you a nice datestamped sql script to rebuild your database. However, this will only contain your database information and structure. You will also need a backup of the mysql database (users, permissions, etc). # mysqldump -u root -p mysql > ./mysql.`date +%Y%m%d-%H%M`.sql A final option is too just backup all of the databases in one shot. # mysqldump -u root -p --all-databases > ./FULL.`date +%Y%m%d-%H%M`.sql --daxbert To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message