Is there an open source script of some sort, or can how can I make something that takes a backup of a give MySQL Database and every day it daves a .gz of the database toa directory on my server, so it is backed up automatically every day....:cheesy:

Thanks for any Help! :p

mysqlhotcopy --user=user --password=password --alowold database foldertocopyto
for i in `find ./foldertocopyto -type f` ; do gzip $i `; done
#or you can do this
find ./foldertocopyto -type f | xargs gzip

Mysqlhotcopy comes with your mysql install/rpm/source you might need to run a locate to find the script

Okey, what do I do with that code....?

@ivirtua: thanks for your insightful post. I dont know what I would have done if i had not known that you had a forum, which looks as if you puked in the stylesheet.
Thank you, thank you for your ever clever commets and your commitment to the highest level of advice.
Please leave this thread and do not come back untill you can actually contribute to an itelligent discussion. Unfortunatly, you are probably a bot and this is a waste of my time, but at least i was able to see youre site and laugh my ass of.
Thanks

@ivirtua: thanks for your insightful post. I dont know what I would have done if i had not known that you had a forum, which looks as if you puked in the stylesheet.

I'm Sorry... I never asked for any comments on my forum...

Thank you, thank you for your ever clever commets and your commitment to the highest level of advice.

I posted the original topic for a response that would allow me to do a task in question... I am 16 years old, and I am learning; I haven't a clue what to do with that code you have just posted.. and all I asked is that if you could tell me what I cold do with it... If I could contribute to this toic I wouldnt be asking in the first place would I?

Has anyone else got ideas on how to get Daily Auto MySQL Backup saved to directory or to use the code posted above..?

Invirtua, when I checked the thread yesterday the only thing which was displayed was your sig, so it looked to me that you had just posted an invite to your forums, which by the way are a great resource on a number of interesting topics.
I am truly sorry for my remarks, they were unwarrented and uncalled for. There is no need for me to judge you or your work, and I feel terrible.
I hope this does not affect your additude twards daniweb or the open source communtiy in any way.

No problems! Dont worry it wont influence my view of this site or the open source community :)

Any suggestions for the SQL backup...? :p

are you on *nix? if you are then you can use the code from the command line and run the backup that way. you can also do a mysqldump, which is another command line tool.

I am really sorry but I havent a clue what your on about... simple terms for me please... I have Cpanel and MySQL and one database I want to make an auto daily backup of to a folder daily and i want the backup to be saved there automatically every day... I just need to know, in simple terms how to do that ;)

Sorry =P

--
How could I use the command line in Cpanel and run it every day for instance (if that makes sense =P)

ok, from cpanel go into phpmyadmin under the database section. then choose what db you want to backup and then at the top you can select export. when you do that, you will need to make sure all the tables have been selected int he left hand side. on the right side you want to check "add drop table" and "complete inserts". all you have to do now is select the save as file radio button and then press go. It is also a good idea to select .gz for compression as this file will be pretty big.

If you have ssh access you can run it from the command line, mysqlhotcopy or mysqldump. and even better, if you have access to a cron job you can automate this. You might want to talkt o you ISP as they might be able to help you out as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.