This project has moved. For the latest updates, please go here.

Development Project of V2.0

(Updated 8 June 2012)

This page will be updated frequently during development period of V2.0

Hi, teams. As I am new to open source team work project management, I don't actually know how to divide the task to complete this tools of V2.0 (I'll try my best to work it out). Therefore, I'll just finish the basic framework and let all of us to purify, upgrade, refine or come out another new version of code to increase the stability and performance. You can always share your opinions, so that we'll have a better final outcome.

After some research and comparing the backup result made by MySQL Administrator, I have revised the code base from V1.0. Now the result (SQL Text File) produced by this version v2.0 alpha, is almost 99% same as result produced by MySQL Administrator.

However, I haven't figure out how to write BLOB value into SQL text file. Hopes one of us can fixed the problem.
There are a few more features suggested by other programmers which is listed at here: Under Development - New Features, Upgrades and Unsolve Bugs

However, before those features is completed. We should focus our attention on the primary part, which is Backup to & Restore from SQL Text File.
(Updated)

Hi, team.

We shall be able to start to develop Phase 1 and Phase 2 simultaneously.
You can start to use Source Control System to develop the tool. The project (V2.0) will be estimated to be completed in between July and August 2012.

Start: June 2012
Estimate Finish: Between July & August 2012

Download V2.0 alpha: MySqlBackupV2alpha.zip
This is not the latest anymore, download latest code at Source Code section.

You may download and submit your codes through source control system by using TortoiseHg (guide: http://codeplex.codeplex.com/wikipage?title=Using%20TortoiseHG%20with%20CodePlex&referringTitle=Source%20control%20clients&ProjectName=codeplex)
or just post the files or codes at Discussion and Issue Tracker section.

Phase 1: Framework Design and Main Function(Backup to SQL Text File)

Task Description:
1. Design the framework of the tool.
2. Build the method of Backup/Restore MySQL database to/from SQL Text File
3. Find possible bugs and ensure the stability and performance of the method.

Involved teamates: (All) adriancs, asomarribasd, eaak79, jignesh2882, mpuneet123, muharremc, Rafael_Cacete, SamarRizvi, sky_01

Phase 2: Other Backup & Restore Methods
Below are the extended features that will come along with this tool. As all of us don't know each other's programming strength, its hard to determine whom shall be assigned to the following task. Therefore, we shall nominate ourself to complete the following part. Just edit this page and place your name under the related section that you wish to accomplish (or reply a comment below to self-nominate).

** This part (Task delegation and assignments) has moved to [Discussion] **

Feature List Available after V2.0 Accomplished.

(Teamates, you can always update this list by editing this page)
  • Able to backup & restore MySQL database to/from
    • SQL Text File
    • (not confirm) SqlLite
    • (not confirm) Microsoft Excel
    • (not confirm) CVS
  • Able to apply encryption during backup/restore process
  • Able to backup specific tables
  • Able to backup BLOB value as files
  • (not confirm) Able to use Progress Bar during backup or restore process
  • Can be used by C#, VB.NET and ASP.NET

Framework Structure for V2.0 (Update)

The main entry point for using this tool V2.0 is:

MySqlBackup.cs

By calling the methods in MySqlBackup.cs, then it will pass the job into these few sub-main class:
  • SqlTextFile.cs (phase 1)
  • BackupBLOB.cs (phase 1)
  • MsExcel.cs (will be done in phase 2)
  • CVS.cs (will be done in phase 2)
  • MsExcel.cs (will be done in phase 2)
  • more class (in phase 2)

Methods that are possible to be reuse by other sub-main class are put inside:
  • Methods.cs

And for the core encryption engine that will be used is located in:
  • XCrypt.cs

Predicted MySqlBackup Class

Might vary with Final Released version of V2.0

Constructors
____ Name Description
mtd.png MySqlBackup() Initializes a new instance of the MySqlBackup class.
mtd.png MySqlBackup(string) Initializes a new instance of the MySqlBackup class and MySqlConnection string.
mtd.png MySqlBackup(MySqlConnection) Initializes a new instance of the MySqlBackup class and MySqlConnection.
mtd.png MySqlBackup(MySqlCommand) Initializes a new instance of the MySqlBackup class and MySqlCommand.

Properties
____ Name Description
prop.png DatabaseName Gets the name of the database in current active connection which is also the target of backup and restore process.
prop.png Command Gets or sets the MySqlCommand used by this instance of the MySqlBackup.
prop.png Connection Gets or sets the MySqlConnection used by this instance of the MySqlBackup.
prop.png FileName Gets or sets the target file used by this instance of MySqlBackup. For export process, file refer to the data storage destination. For import process, file refer to the data source.
prop.png TableNames Gets or sets the list of table names in MySQL database that will be backup or exported.
prop.png max_allowed_packet Gets or sets the maximum length allowed by instance of MySqlConnection used by this instance of MySqlBackup for single sql execution. (Notes: User has to manually set the max_allowed_packet value at MySQL server and pass the value into this properties.
prop.png BackupRowsData Gets or sets a value indicating the rows in tables will be backup/exported or not.
prop.png EnableEncryption Gets or sets a value indicating the backup/exported values will be encrypted/decrypted or not.
prop.png EnableProgressInfo Gets or sets a value indicating the backup/export or restore/import process will show current processing location/point. Might espect slower performance.
prop.png TotalBytes Gets the total bytes that will be backup/exported or restore/import.
prop.png CurrentByte Gets the current position of byte during backup/export or restore/import process.
prop.png CurrentTable Gets the name of current processing table of backup/export or restore/import process.
prop.png CurrentRowInCurrentTable Gets the current processing rows in current processing table of backup/export or restore/import process.
prop.png TotalRowsInWholeDatabase Gets the total rows in whole database.
prop.png TotalTables Gets the total number of tables that will be backup/exported or restored/imported.
prop.png CurrentRowInWholeProcess Gets the current processing rows in whole database during the process of backup/export or restore/import.

Methods
____ Name Description
mtd.png ExportToSqlTextFile(string) Execute the backup process and save data into specific SQL Text File.
mtd.png ExportToSqlTextFile(string, string[]) Execute the backup process, backup specific tables and save data into specific SQL Text File.
mtd.png ImportFromSqlTextFile(string) Execute the restore process and retrieve data from specific SQL Text File.
mtd.png DecryptSqlFile(string, string) Decrypt an encrypted SQL Text File and save the data into new SQL Text File.
mtd.png ExportBlobAsFile(string, string, string, string, string) Export the BLOB value stored in MySQL database and save it as files at specific location.
mtd.png ExportToMsExcel(string) Execute the export process and save data into Microsoft Excel file.
mtd.png ImportFromMsExcel(string) Execute the import process and retrieve data from specific Microsoft Excel file.
mtd.png ExportToCSV(string) Execute the export process and save data into Comma Separated Value file.
mtd.png ImportFromCSV(string)
mtd.png ExportToSqlLite(string) Execute the export process and save data into SqlLite database.
mtd.png ImportFromSqlLite(string)
mtd.png MySqlBackup() Initializes a new instance of the MySqlBackup class.

Events
____ Name Description
evt.png BeginBackup Occur before the backup or export process starts.
evt.png EndBackup Occur after the backup or export process finished.
evt.png BeginRestore Occur before the restore or import process starts.
evt.png EndRestore Occur after the restore or import process finished.



Recommended Development Tools and Platforms

  • Visual Studio 2010
  • notepad++ (for viewing SQL Text File)
  • .NET Platform: .NET Framework 2.0

Other Notes

  • Teamates can utilise the Discussion and Issue Tracker section during the development.
  • Teamates are recommended to turn on Discussion Notification and Issue Tracker Notification during the development period.

Project's Source Control Clone URL Address

Clone URL: https://hg.codeplex.com/mysqlbackuprestore

Screenshot of TortoiseHg Cloning
clone.png

Good Luck!

Last edited Jun 7, 2012 at 6:21 PM by adriancs, version 42