PDA

View Full Version : need halp for backup mysql


Computer
Sat 17th Jun '00, 7:08pm
Hi,
with phpmyadmin it works to make backupīs and restores opf the database in mysql, but only if the files are not to big, because most servers give not enough "cpu seconds".

I looking now for a script which can fix this problem, maybe starts twice ore three time to backup, restore the big files.

Next question, what is the exact comando to make a complet backup/restore of all .csv data via Telnet Access.

Thx
for help

UserName
Sun 18th Jun '00, 6:39am
I'm not sure exactly what you're trying to do, but there is a simple Cron MySQLdump backup script posted here:

http://vbulletin.com/forum/showthread.php?threadid=973

Hope that helps!

UserName
Sun 18th Jun '00, 7:08am
Sorry for posting twice in a row, I forgot to mention the following:

To backup your database using a dump from telnet, use this command:

mysqldump -u mysqlusername -p database_name > output_file_name.sql

That'll prompt you for your password and export the database into a script that you can use to recreate the database if there is a problem.

Here is how you can restore it:

mysql -u mysqlusername -p database_name < input_file_name.sql (which was previously output_file_name.sql)

If you are going to download the database, you should compress it (tar czvf filename.tgz filetocompress) and then uncompress it (tar xzvf filename.tgz) before using it.

I am not a linux, MySQL, or PHP expert, but these commands work for me and have allowed me to backup and move my databases, so I think they should work for you!