Backup Database [SOLVED]

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Backup Database [SOLVED]

Postby drmota » 08. October 2011 21:17

Hello,

I am using Linux Ubuntu 11.04 distro with Lampp installed on to it in the /opt/ directory. I haven't changed any defaults except for some httpd.conf.

I am scared of my computer dieing one day and the whole database disappearing, so I would like to back it up to an external harddrive.

For this to be possible I need to know where the data is located. I am assuming it is either in some kind of .txt or .sql file? But where is it?

When I find it, i'll be able to cron it onto the hardrive. But then when the computer dies and it gets deleted, is it enough to just add it into where it was before?

Thank you very much in advance :)
drmota
 
Posts: 2
Joined: 08. October 2011 21:11

Re: Backup Database

Postby Sharley » 08. October 2011 22:21

You can use phpMyAdmin to export your databases to an sql file and you may be able to Schedule the process from within phpMyAdmin.

How to back up most things built into XAMPP including databases:
http://www.apachefriends.org/en/faq-xam ... tml#backup

Or you could use many of the tools available like the MySQL's own command line mysqldump or even Webmin to do a useful job.

See also the XAMPP for Linux web page for 'What is where?':
http://www.apachefriends.org/en/xampp-linux.html#385

You may also find some helpful reading here:
http://www.apachefriends.org/en/faq-xampp-linux.html

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Backup Database

Postby JonB » 08. October 2011 22:52

@ OP

You can use phpMyAdmin - but its not a 'job' so you can't schedule it

you can use the MySQL command line tool mysqldump -
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

(that you can make a job for)

or You could learn about Webmin, the Unix/Linux system admin tool

http://www.webmin.com/rpm.html

Its has automated backups for MySQL databases built in (including FTP based)

AND FINALLY - NO -
I am assuming it is either in some kind of .txt or .sql file?


the data is really stored in the /opt/lampp/var/mysql folder in special files that are engine-specific (as in Inno db vs. MyISAM) The fiel types you mention are intermediate files used by MySQL to backup, re-instantiate, import or Create/Alter databases, Tabels, views, Inserts, triggers etc.

The ONLY correct way to store databases is with tools meant for the purpose -

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Backup Database

Postby drmota » 09. October 2011 11:51

thank you very much guys, works like perfect ;)
drmota
 
Posts: 2
Joined: 08. October 2011 21:11

Re: Backup Database

Postby Sharley » 09. October 2011 11:57

Thanks for the feed back. 8)

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 10 guests