Backup and Restore
From Taridium
Line 7: | Line 7: | ||
== Database Backup == | == Database Backup == | ||
+ | |||
+ | Login to your server via SSH and run the ipbx-config script from the server command line: | ||
[root@pbx ~]# ipbx-config | [root@pbx ~]# ipbx-config | ||
Line 33: | Line 35: | ||
Select option 2 to create a full database backup. Enter your MySQL root password (ususally empty/blank). A time-stamped backup will be created in /usr/local/ipbx/backup/ | Select option 2 to create a full database backup. Enter your MySQL root password (ususally empty/blank). A time-stamped backup will be created in /usr/local/ipbx/backup/ | ||
+ | |||
+ | Note that depending on your CDR deletion schedules this file can have a considerable size. | ||
+ | |||
+ | |||
+ | == Database Restore == | ||
+ | |||
+ | To restore your database, cd into the backup directory and use the mysql client to reload the datbase: | ||
+ | |||
+ | [root@pbx ~]# mysql | ||
+ | |||
+ | remove any existing ipbx database. | ||
+ | |||
+ | mysql> DROP DATABASE ipbx; | ||
+ | |||
+ | load the backup file: | ||
+ | |||
+ | mysql> SOURCE ipbx-backup-1228313758.sql; |
Revision as of 14:26, 3 December 2008
While there are a number of ways to backup a complete system using disk images etc. it might be more practical and safe to backup the ipbx configuration only.
Configuration data for ipbx is stored almost exclusively in the ipbx MySQL database. This includes all your phone configuration, dialplan etc.
Some additional configuration data is present in other files. This applies especially to PSTN interface card configuration and other interconnection hardware.
Database Backup
Login to your server via SSH and run the ipbx-config script from the server command line:
[root@pbx ~]# ipbx-config
************************************************************ ipbx 2.0.0-a Configuration (c) 2008 taridium, llc ************************************************************ Select Configuration Option: 1 <- Configure ipbx for the first time and use default configuration 2 <- Create full database backup 3 <- Fix file system permissions 4 <- Restore default ipbx database (will erase all settings) 5 <- Reset admin password 6 <- Upgrade ipbx database (safe mode) 0 <- Exit
please enter your choice:
Select option 2 to create a full database backup. Enter your MySQL root password (ususally empty/blank). A time-stamped backup will be created in /usr/local/ipbx/backup/
Note that depending on your CDR deletion schedules this file can have a considerable size.
Database Restore
To restore your database, cd into the backup directory and use the mysql client to reload the datbase:
[root@pbx ~]# mysql
remove any existing ipbx database.
mysql> DROP DATABASE ipbx;
load the backup file:
mysql> SOURCE ipbx-backup-1228313758.sql;