Click to See Complete Forum and Search --> : backup mysql tables and data
ceanth
06-23-2003, 10:27 AM
Hi all, i am in the process of building a database but i wanted to know what is the best way of backing it up? Someone mentioned to me that i could use excel to make the tables and import to mysql, how would i do this? Also could this technque be applied to the actual data to be stored in the tables?
thanks
ceanth
Nevermore
06-23-2003, 11:01 AM
As far as I know, you will need some third-party software to convert excel files to mysql format and communicate with the server. That isn't going to be free!
To do it for free, you would be best of with some PHP code that goes through the database, and converts all of the entries to the PHP code which will add them to a new database. Then, you can just save this as a PHP file, and when you want to restore a backup, you just upload and run this file.
Some hosts do backup the database for you. If yours does, this is probably at no extra cost and a high quality backup. You should email them.
DaiWelsh
06-25-2003, 07:42 AM
It depends what access you have to the database. If you have direct access you can use a mysql gui or just mysqldump command to generate a backup file, if you have myphpadmin access that also allows you to export and download data and/or structure of one or more tables.
It should be possible to import data from excel, but there is nothing in particular to recommend this method over any other afaik and certainly when it comes to creating the table structure you will want to write the sql for it, not rely on a conversion from something like excel, or you will probably end up with all your fields of inappropriate types + no indexes etc.
HTH,
Dai