![]() |
There is no limit to the size it will process, if you get timeouts then you need to check php timeout settings and also mysql timeout settings.
That said, with a database that size, I would not rely on just this mod as a backup method. |
I have tried some other scripts like mysqldumper, and they are all timing out, probably mysql timeout.
I find it surprising that people are telling me I can log in to SSH, run a few commands (like five), and the server will make a perfect, fail-proof copy of the database. Are scripts limited from using the same kind of commands like 'wget' that work so reliably in SSH? It's starting to look like I'm just going to have to buy a book and learn the shell commands. |
Quote:
|
Back in 08ish I wrote a Perl script that not only backed up the database but also the physical files. I ran it via CRON but it could also be manually envoked. You can use the single line in the code below noting the mysqldump as Paul mentioned. The code below will give you an idea of what you need to read about (mysqldump switches) to get a proper backup.
#!/usr/bin/perl # System Backup #------ Variables ------ $backupdir = "/usr/local/DirectoryOfBackUpLocation"; # "." for current $other_dirs = "/usr/local/DirectoryToBeBackedUp1 /usr/local/DirectoryToBeBackedUp2"; #----------------------- print "Backup Initiated...\n"; @timenow = localtime(time); $newfilename = sprintf("%02d",$timenow[4]+1) . sprintf("%02d",$timenow[3]) . ($timenow[5] + 1900); print "Using Filename: $newfilename.sql \n"; print "Starting database backup... \n"; system "mysqldump -qce -r $newfilename.sql -u root DataBaseName"; print "Starting Compression... \n"; system "tar czf $backupdir/$newfilename.tar.gz $other_dirs $newfilename.sql"; unlink "$newfilename.sql" || print "Error: Cannot delete file specified: $newfilename - $_ \n"; print "Done. \n" I use Paul's modification on ALL my sites and am surprised it is not a default VB option. As backups are critical if you run a site. If I had any requests it would be to have an option to also include the physical files and auto purge backups X days old. |
What a life saver a good backup can be!
Thanks |
hi paul
someting wrong here It make a date folder in my backup folder... but its not wrinting the .sql files... and still getting the Backup Error : Could not write to destination file what i'm i doing wrong? thanks |
That would be a permissions error.
|
Quote:
|
This may sound silly, but to get it to just backup every day of the week and overwrite the previous weeks files so it doesn't keep growing, do I change the field Y-m-d and put a lower case letter "L" l in that field?
Thanks .. :) Regards, Doug |
Yep, that sounds about right.
|
All times are GMT. The time now is 05:43 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|