phpBMS

Backing Up phpBMS

phpBMS stores all of your business data(Clients, Sales Orders, Saved Searches, and other configuration data) in a database, for example, MySQL. Often the database is located in /var/lib/mysql on GNU/Linux and Unix-systems. For MySQL, each database is contained within files inside a directory named the same as your database. For example, if you store your phpBMS information in a database called 'biz' then the 'biz' database may be in /var/lib/mysql/biz.

A very simple, though not necessarily recommended, way of doing a database backup is to backup this directory AND the files ibdata1, ib_logfile0 and ib_logfile1 in the directory above - the database root directory.

If you are using innodb(as opposed to MyISAM) as your database engine these 3 files are very important. Without them you may not be able to recover your data. Don't forget to archive your php-files of your phpbms-installation too, and maybe your web server configuration files.

Other ways

If you have phpMyAdmin installed you can do a full export of your database to a text file.

There's also a tool called mysqlhotcopy that can copy your database on the fly - without a database shutdown - to a new database or to the file system.

Usage: /usr/bin/mysqlhotcopy db_name[./table_regex/] [new_db_name | directory]

You also can use a plain text dump of your data using mysqldump. This will store your data in SQL-statements or it can be directly pipep into mysql's command line client. It is also possible to import the resulting file on another system or databaes using mysqladmin or phpMyAdmin.

Usage: mysqldump [OPTIONS] database [tables]

For more information refer to MySQL documentation at http://www.mysql.com/products/backup/.

Copyright © 2010 Kreotek, LLC. All Rights reserved.