I'm trying to backup and SQL database (for a copy of vBulletin), and need to restore it later.
I read through Kevin's tutorial on the subject, but am a bit confused: where exactly does it go when I save it? I couldn't figure it out. I probably sound like a moron to some of the more experienced people here, but I can handle that if I can figure out how this is done. :)
Also: is it safe, and reliable? Losing the posts/threads on the forum would be a disaster.
Chris, check out my articles on that very thing at http://www.webdevsites.com/articles/article13.php
hope it helps :)
easiest way is to go into phpmyadmin, and go to "dump"..check the check box saying "send" and it will send you a file which can recreate all tables and all data in them
i'd just like to add that sometimes phpmyadmin has a hard time accepting large dump files, in which case you'd have to upload and reload the db to the server via telnet
SitePoint Community Moderator
myONLYhost.com: when you want something MORE
This is what I use in crontab:
mysqldump --opt --user=oops --password=shouldntsay dbName > /path/filename.whatever
Hope it helps! :)
I recently had to switch from the phpMyAdmin method to the telnet method because my database became too big - it would time out when sending the dump due to PHP's Max Execution Time. My DB is about 3mb now I think - still pretty small but growing daily :)
I've never tried to use phpMyAdmin, since it wouldn't work anyway :)
My backup file is 30MB now and grow by 4-5MB each day!
Twtcommish if you use telnet then your mysqldump dbname > whatever.sql would end up in the directory you ran the command from so if you telnet in and you are in
/home/www/twtcommish for example the file would be copied to /home/www/twtcommish/whatever.sql
What's wrong with
shell> mysqldump database_name > c:\backups\dbdecember.sql
? That's the most logical no, or are there some drawbacks?
I'm honestly not getting this - I've tried the code here, and code like Kevin's, and it's simply not working. I'm getting the standard SQL error.
Where are you doing it from the shell prompt or the mysql prompt. You need to be at the shell prompt not in mysql itself. so once you telnet in you simply type
$>mysqldump -u username -p dbname > /pathto/textfiletoexportto