Backup and Restore

From Taridium

(Difference between revisions)
Jump to: navigation, search
(Database Restore)
Line 48: Line 48:
   [root@pbx ~]# mysql  
   [root@pbx ~]# mysql  
-
remove any existing ipbx database.
+
remove any existing ipbx database. Note this will erase any existing configuration!
   mysql> DROP DATABASE ipbx;
   mysql> DROP DATABASE ipbx;
Line 55: Line 55:
   mysql> SOURCE ipbx-backup-1228313758.sql;
   mysql> SOURCE ipbx-backup-1228313758.sql;
 +
 +
make sure that the ipbx database is up-to-date by running the safe updater with ipbx-config option
== Other Files ==
== Other Files ==

Revision as of 14:45, 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 on a regular basis.

Customers that have a direct Taridium maintenance contract do not need to backup files manually - this is provided on a bi-weekly basis.

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 as well. This applies especially to PSTN interface card configuration and other interconnection hardware.

Contents

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

On a clean install from scratch, always run ipbx-config with option 1 to configure DB users and permissions.

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. Note this will erase any existing configuration!

 mysql> DROP DATABASE ipbx;

load the backup file:

 mysql> SOURCE ipbx-backup-1228313758.sql;

make sure that the ipbx database is up-to-date by running the safe updater with ipbx-config option

Other Files

These files are usually not created on the system, but rather uploaded. It might still make sense to back them up, though.

Custom Prompts

Custom prompts are stored in /var/lib/asterisk/sounds/prompts/

Music On Hold

Music on hold is stored in /var/lib/asterisk/moh-native/[class name]

PSTN Interface Cards

Relevant configuration files are stored in:

 /etc/wanpipe/
 /etc/zaptel.conf
 /etc/sysconfig/zaptel
Personal tools
Namespaces
Variants
Actions
Toolbox