News: About Xoops MySQL Backups...Posted by: romuon 2004/4/8 6:35:41 9398 reads You started a Xoops that is a success ?
Then your database is fast growing.
Now you start to ask yourself how to administrate this DB... to prevent data loss.
Here is you reseach results that'll allow you to pass through phpMyAdmin limitation in large DB restore.
- Those GPL scripts are not xoops modules. We let devs their jobs to use it for preparing a xoops dbtoolbox... of course running out of xoops.
- We assume that xoops hosts will also enjoy to provide surch services.
[size=Medium]Backups and restore WebServer's MySQL DBs.[/size]
You have an Ftp account for your files but what about you DB ?
PhpMyAdmin can export DB contents but this is a manual way to do. Moreover, Your DB are too big to be restored with phpMyAdmin in less than 30" (Server sql session for a querry). in fact querrys are almost long to run with this method. INSERT querries writes the full table contents in one querry (this is the problem). This explain the sql timeout can be reached at a volume limit.
We seached a solution to resolve followin points :
- Automatic and schedduled backups,
- Get record by record INSERTs,
- be able to import datas before sql timeout.
DB_Backup, THE script
DBBackup is a php script by wolf (wolf at restkultur dot ch) that just fit our skills to sheddule backups :
- Backup multiple databases and servers with different users and passwords.
- Backups can be scheduled using cron (on UNIX systems) or AT (on Windows systems).
- Create daily, weekly and monthly snpashots of your database.
- Keep the daily, weekly and monthly backups for a user-specified time.
- Archive and compress the SQL files (*.tar.gz).
- Creates a detailed report of everything that has been done.
- Reports can be mailed to you or any other user- specified email-address, saved to disk or displayed in browser.
- Generated SQL files can be mailed to you or any other user-specified email-address.
- Generated SQL files can be uploaded by FTP to any user-specified FTP server.
- Choose to create SQL files for each table or one for each database
- No system calls, everything in 100% pure PHP.
Installation and configuration
unzip .tar.gz file,
Copy def_config.inc.php into config.inc.php and open it.
Feed blank configuration vars (servers, DBs, Users, passes and all other parameters)
Upload db_backup on your web
In your navigator, test script :
If you acces you server's cron jobs (ie in cPanel), you are able to scheddule a task to run the script periodically.
Details for this installation are avalable in INSTALL file.
Phenomenal ! This script is independant, it include all its ressources.
gzipped format, joined with mail support enable to regulary get on your desktop a copy of your DBs.
Generated SQLs uses record by record INSERTs. Then import timeout limit shouldn't be reached anymore. File is directly usable in phpMyAdmin (with gzip activated).
A Xoops independant script that should complete you web site setup.
BigDump, le script
This time, we thanks Alexey Ozerov (alexey at ozerov dot de) for this script that import big SQL dump files on hard limited sessions servers. Script Valid with IE 6.0 SP1, mozilla 1.x and Netscape 4.8.
Installation and configuration
One unique script. Modify setup vars ( DB connextion and gzip file URL) and upload it on your server.
This is a manual operation (We don't restore Dbs every days).
Post gziped sql Dump at devoted URL and run the script.
Simple, ths script is the excellent DB_Backup complement. No moer sql files cut to fit phpMyAdmin sessions that a so boring (and dagerous) as your DBs bocomes too big.
This news is friendly provided by romu<b> from
French Xoops Team : www.frxoops.org
Themes xoops team : www.xoops-themes.org and themes.xoops.org