Koozali.org: home of the SME Server

mySQL Database Dump

Terry

mySQL Database Dump
« on: November 05, 2003, 01:14:57 AM »
OK, after a 2nd server restore I'm about to play with mySQL *again* to try and get my PostNuke site back online.  This time I'd like to dump my complete mysql database "before" I start, creating a file identical to the one in a Backup to Desktop file.  My question is, what is the mysqldump command and switches that will give me the extact same info that a Backup to Desktop does.  Anyone have any idea's?

Terry

Re: mySQL Database Dump
« Reply #1 on: November 05, 2003, 01:18:28 AM »
Searching brings up how to import afterwards, or export a database, but I want "everything" that is included in a "Backup to Desktop".  Still searching for idea's...

Terry

Re: mySQL Database Dump
« Reply #2 on: November 05, 2003, 01:59:12 AM »
Well, found an answer that seems to work, invoke the backup script S20mysql-dump-tables with ./S20mysql-dump-tables from the /etc/e-smith/events/pre-backup and it seems to give you the mysql.dump file in /home/e-smith/db/mysql.  Let's hope this works.

John Lewis

Re: mySQL Database Dump
« Reply #3 on: November 05, 2003, 11:16:52 PM »
an easier way is to tar up your database dir in /var/lib/msql and copy it offdisk somehow

tar -cvf /var/lib/mysql/[databasename] databasename.tar

then replace it on your new system, and restart mysql :

tar -xvf databasename.tar
service mysql restart

The backup to desktop does not backup mysql databases.

Hope this helps.

Paul Nesbit

Re: mySQL Database Dump
« Reply #4 on: November 06, 2003, 12:01:39 AM »
John Lewis wrote:
>
> The backup to desktop does not backup mysql databases.

The backup to desktop feature does backup mysql databases.

  http://www.e-smith.org/faq/#8q24

  Paul

John Lewis

Re: mySQL Database Dump
« Reply #5 on: November 06, 2003, 12:53:13 AM »
Interesting that 6.0b3 did NOT backup or restore my databases...  I had to do it manually.

Bug?

Terry

Re: mySQL Database Dump
« Reply #6 on: November 06, 2003, 12:59:31 AM »
Mine was from a 5.5 (which did backup mysql) to a 6.03 which I haven't checked to see if it included it or not.  Would be kind of dumb if it didn't, no?

Paul Nesbit

Re: mySQL Database Dump
« Reply #7 on: November 06, 2003, 01:21:50 AM »
John Lewis wrote:
>
> Interesting that 6.0b3 did NOT backup or restore my
> databases...  I had to do it manually.
>
> Bug?

Yes.   I suggest ensuring all 6.0 updates are applied, and if the behaviour you're reporting persists, report the problem to smebugs@mitel.com.

  Paul

Arne

Re: mySQL Database Dump
« Reply #8 on: November 21, 2003, 02:26:26 AM »
Restored one 5.6 from one PC to the other. The database tables that is "standard" from Mitel ie the horde database were resored. The database tabels that I had included myself were lost, so I had to transfer them manually. Don't know why this happened. hanks for the explanation above how to make a manual transfer !