I have a database created in mysql iwant to create a backup utility for backing up the data on a routine base
mhupadhyay
0
Newbie Poster
Recommended Answers
Jump to PostThis is the code I use and run a cron job:
backup_tables('user','password','database'); /* backup the db OR just a table */ function backup_tables($user,$pass,$db) { $suffix = date("mdY-Hi"); #Execute the command to create backup sql file exec("mysqldump --user={$user} --password={$pass} --quick --add-drop-table --add-locks --extended-insert --lock-tables --all {$db} > ../db_backups/backup.sql"); …
All 2 Replies
smantscheff
265
Veteran Poster
simplypixie
123
Posting Pro in Training
debasisdas
commented:
agree
+13
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.