phpBMS

Backing Up your data

All your data is stored in a database. In my example it's MySQL. The databases are mostly located in /var/lib/mysql on Linux/Unix-Systems. Every database has its own directory with identical name of your database name. Look at your settings.php in the line mysql_database = ... to see whats your name and your directory. Simple way is to only backup this directory AND the files ibdata1, ib_logfile0 and ib_logfile1 in the directory above - the database root directory. Since innodb these 3 files are very important. Without them you cannot recover your data in the worst case. Don't forget to archive your php-files of your phpbms-installation too, and maybe your webserver configuration files.

other ways

There are a lot of other ways to create a backup. So there exists a tool called mysqlhotcopy. You can copy your database on the fly - without a database shutdown to a new database or to a location in your filesystem.

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

You also can use a plain text dump of your data. There is a command called mysqldump. It's possible to store all your data AND your table definitions of the database with SQL-statements. This file you can direct pipe into the database commandline client mysql oder load it with a SQL-statement or put it in any other way to the database (maybe tools like mysqladmin or phpMyAdmin).

Usage: mysqldump [OPTIONS] database [tables]

Please have a look to the mysql documentation http://www.mysql.com/products/backup/.

Copyright © 2010 Kreotek, LLC. All Rights reserved.