Backup and Restore

From Taridium

(Difference between revisions)
Jump to: navigation, search
(Database Backup)
Line 56: Line 56:
after the database has been restored, make sure that the ipbx database is up-to-date by running the safe updater with ipbx-config option '''6'''.
after the database has been restored, make sure that the ipbx database is up-to-date by running the safe updater with ipbx-config option '''6'''.
-
 
-
Phones will not yet have their configuration files available. To re-generate the configuration files first run ipbx-autoprov for the appropriate device types. (check [[Devices|Devices]] for details) then re-generate the files through the Administrator interface.
 
-
 
-
 
-
== Manual Database Backup ==
 
-
 
-
The ipbx database can also be backed-up manually using standard MySQL tools. This is recommended if you are planning to write your own backup script and require more control of backed up data.
 
-
 
-
'''Backing up the ipbx Database'''
 
-
 
-
  /usr/bin/mysqldump -B -Q --ignore-table=cdr -u root -pPASSWORD ipbx > backup-file.sql
 
-
 
-
In the example above the MySQL '''root password''' is set to '''PASSWORD''' and we're excluding the table '''cdr''' ([[CDR|CDR data]]). The '''cdr''' table, unless stored in a separate database can grow fairly large depending on your call volume and it might make sense to keep this data backed-up separately, directly on a different host or in a different backup file.
 
=== Device Configuration Files ===
=== Device Configuration Files ===
-
After a complete system restore (database restored) you can restore all device configuration files by clicking on '''System''' →  '''Devices''' → '''Generate Configurations'''. Make sure your devices are setup for [[Auto-provisioning|auto-provisioning]].
+
After a complete system restore (database restored) you can restore all device configuration files by clicking on '''System''' →  '''Devices''' → '''Generate Configurations'''. Make sure your devices are setup for [[Auto-provisioning|auto-provisioning]]. On the command line you can run '''ipbx-autoprov''' and select the used device types.
== Other Files ==
== Other Files ==
Line 93: Line 80:
   /etc/zaptel.conf
   /etc/zaptel.conf
   /etc/sysconfig/zaptel
   /etc/sysconfig/zaptel
 +
 +
== Manual Database Backup ==
 +
 +
The ipbx database can also be backed-up manually using standard MySQL tools. This is recommended if you are planning to write your own backup script and require more control of backed up data.
 +
 +
'''Backing up the ipbx Database'''
 +
 +
  /usr/bin/mysqldump -B -Q --ignore-table=cdr -u root -pPASSWORD ipbx > backup-file.sql
 +
 +
In the example above the MySQL '''root password''' is set to '''PASSWORD''' and we're excluding the table '''cdr''' ([[CDR|CDR data]]). The '''cdr''' table, unless stored in a separate database can grow fairly large depending on your call volume and it might make sense to keep this data backed-up separately, directly on a different host or in a different backup file.

Revision as of 12:47, 2 February 2010

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 on a regular schedule.

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

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.1.0-a Configuration                      
   (c) 2010 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;

after the database has been restored, make sure that the ipbx database is up-to-date by running the safe updater with ipbx-config option 6.

Device Configuration Files

After a complete system restore (database restored) you can restore all device configuration files by clicking on SystemDevicesGenerate Configurations. Make sure your devices are setup for auto-provisioning. On the command line you can run ipbx-autoprov and select the used device types.

Other Files

These files are usually not created on the system, but rather uploaded or created through customizations. 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

Manual Database Backup

The ipbx database can also be backed-up manually using standard MySQL tools. This is recommended if you are planning to write your own backup script and require more control of backed up data.

Backing up the ipbx Database

 /usr/bin/mysqldump -B -Q --ignore-table=cdr -u root -pPASSWORD ipbx > backup-file.sql

In the example above the MySQL root password is set to PASSWORD and we're excluding the table cdr (CDR data). The cdr table, unless stored in a separate database can grow fairly large depending on your call volume and it might make sense to keep this data backed-up separately, directly on a different host or in a different backup file.

Personal tools
Namespaces
Variants
Actions
Toolbox