Packaging a Database


Table of Contents   Previous Page  Next Page    

You can compress the database into a single file for easy transport to another user, or perhaps just for archival storage, using the Package option on the server utility window.  The option is not available within MemberTies because the server must be stopped before packaging a database.

A database package has the file extension, ".zdb".

Packaging a Database

A database package file is a specially formatted file. Do not open a package with any program other than the Server Utility's "Extract Database" command.  Using another program could corrupt the package and render it unusable.

1Start the server utility and click Package Database. If the server is currently running, you will be prompted to stop the server first.  Do not click OK if other users are using the system!  Have everyone logoff first.
2When the Browse for Folder window opens, choose the database folder you want to package, then click OK. 

       Note: The Browse window will open with the "database" folder selected by default. You will normally want to select a sub-folder (a specific database) rather than the root folder.  If you choose the root, you will be packaging EVERY database known to the server, including the "mysql" server database folder. If you include the "mysql" folder in the package, you are effectively including a copy of all existing users and passwords. This is important, because when you extract the contents of the package later, all users will be replaced by those in the package. This may or may not be what you want to do.

3After a database is selected, the Package Database window will display the selected database, and will provide a suggested name for the package.  The default name is the current month and day, followed by the database name. i.e., 1102_demo.zdb would be a package of the "demo" database backed up on 2 November.

       Verify or change the package name if you wish, then click OK to create the package.

4A message will appear indicating the success or failure of the package process.

Extracting a Database from a Package

A database package will be unloaded directly into the local server. If a database by the same name already exists, it will be overwritten without any prompting. If the database package includes the "mysql" server database, all existing users and passwords will be overwritten with the users in the package.

1Start the server utility and click Extract Database. If the server is currently running, you will be prompted to stop the server first.  Do not click OK if other users are using the system!  Have everyone logoff first.
2When the Select Database Package to Extract window opens, select the desired package file, then click Open.
3After a package is selected, the Extract Database window will display the selected package. At this point you may either View or Extract the contents of the package.
Click View Info to view the contents of the package in a system window. Note that you can move through this window using the SPACEBAR to page down, the ENTER key to move down a line at a time, or the Q key to quit/close the window.
Click Extract to load the package into the database server. Note that the extract process is not controlled by the server utility or by MemberTies. The system has no way to know what was in the package, or whether the extraction succeeded or failed.  Be careful extracting a database that already exists on your system -- it will be overwritten without any prompting.
4After the Extract command completes, you should login to the newly extracted database as the administrator and run the Check/Repair and Optimize table maintenance functions. See Maintaining Tables for details.