View Single Post
  #1  
Old 04-24-2014, 11:55 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default MySQL Database Backup Script (With Compression)

I had the need to create this script to support compression and be flexible in times in which I would need it. It is pretty awesome and supports compression using 7-Zip and WinRar.

Look here for full info:

http://wiki.eqemulator.org/p?MySQL_DB_Backup_Script

What It Does
  • Specify specific database tables (Default will backup all) Example: tables="table1,table2,table3"
  • Specify a specific database (Default will use the database specified in the eqemu_config.xml) Example: database="dbname"
  • Specify a specific location for the Backup to go to (Default will go in the server folder, or wherever you run the script) Example: location="C:\Backups"
  • Specify compression, which will use 7-Zip or RAR to compress (If they are installed) Example: compress
  • ​7-Zip Install (Recommended Highest Compression) - http://www.7-zip.org/download.html

Arguments
Code:
C:\Server>perl DB_Dumper.pl
ERROR! Need arguments
######################################################
        loc="C:\File Location"  - File path location to backup...
        database="dbname"       - Manually specify databasename, default is database in eqemu_config.xml
        tables="table1,table2,table3"   - Manually specify tables, default is to dump all tables from database
        compress                - Compress Database with 7-ZIP, will fallback to WinRAR depending on what is installed (Must be installed to default program dir)...
        Example: perl DB_Dumper.pl loc="E:\Backups"
######################################################
Enjoy!
Reply With Quote