From owner-freebsd-questions@FreeBSD.ORG Sat Aug 27 21:09:50 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 EF58D16A41F for ; Sat, 27 Aug 2005 21:09:50 +0000 (GMT) (envelope-from ces.fci@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 533B043D46 for ; Sat, 27 Aug 2005 21:09:50 +0000 (GMT) (envelope-from ces.fci@gmail.com) Received: by wproxy.gmail.com with SMTP id i21so396626wra for ; Sat, 27 Aug 2005 14:09:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UZeA/vf7lOjcgRh67B/7KtHthhP7Yw/p8TKDLkmo1CZmwitZT8mFkaadmASD6YHEOmvBI6ge2hyTb7tLE2VepXiwoj47DDQNMZWc508a6cSrjAjNVagDzNAqe9mzg+wy6xPB1yV/w7rcxSKjPH1a0EK2ijRWP2UkS8jlThIbOYw= Received: by 10.54.102.5 with SMTP id z5mr866331wrb; Sat, 27 Aug 2005 14:09:49 -0700 (PDT) Received: by 10.54.114.19 with HTTP; Sat, 27 Aug 2005 14:09:49 -0700 (PDT) Message-ID: Date: Sat, 27 Aug 2005 16:09:49 -0500 From: fci To: Carstea Catalin In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Cc: freebsd-questions@freebsd.org Subject: Re: backup and restore mysql 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: Sat, 27 Aug 2005 21:09:51 -0000 On 8/27/05, Carstea Catalin wrote: > how to backup and restore mysql databases? http://dev.mysql.com/doc/mysql/en/mysqldump.html most relevent part of it ( you will need to do -u$username -p$password to l= ogin: - - snip - - The most common use of mysqldump is probably for making a backup of an entire database: shell> mysqldump --opt db_name > backup-file.sql You can read the dump file back into the server like this: shell> mysql db_name < backup-file.sql Or like this: shell> mysql -e "source /path-to-backup/backup-file.sql" db_name mysqldump is also very useful for populating databases by copying data from one MySQL server to another: shell> mysqldump --opt db_name | mysql --host=3Dremote_host -C db_name It is possible to dump several databases with one command: shell> mysqldump --databases db_name1 [db_name2 ...] > my_databases.sql If you want to dump all databases, use the --all-databases option: shell> mysqldump --all-databases > all_databases.sql - - snip - - >=20 > -- > Any help would be greatly appreciated. > regards, > Carstea Catalin > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >