Backups

From ISPWiki

Jump to: navigation, search

This module allows you to manage the backup copies to save your files from an accident loss, and set up replication of themysql base.

To make this module display in the navigation menu, go to the "Other Settings" section -> the Features module to enable "backup".

We would recommend using database replication for backups to prevent database suspension. You should set up creation of dumps from the replication server.

The following directories will be backed up:

[Path to the billing files]/etc
[Path to the billing files]/var/userconf
[Path to the billing files]/skins/userdata
[Path to the billing files]/addon

If you enable database dump, it will be into the billmgr.sql archive.

Files

Module «Backups»
  • Temporary directory - enter a local directory to store backup copies at.
  • Enable backup - select the check box to back up the billing files.
  • Storage - select the place to store the backups. This can be local or remote FTP or SFTP directory.
  • Directory - enter a path to the local directory or remote FTP server directory. If any of the remote servers are selected as a storage, the following fields will be displayed:
    • Server - domain name or IP-address of the remote FTP or SFTP server to store backup copies at.
    • Username - enter a username to access the FTP server.
    • Password - enter a password to access the FTP server.
  • Archiver - select a format to store the backups.
  • Period - select the backup period.
  • Start time (hh:mm) - select time to start a backup.
  • Daily archives - the number of daily backups stored.
  • Weekly archives - the number of weekly backups stored.
  • Monthly archives - the number of monthly backups stored.
  • Compression level - this feature allows to optimize size of the archive. The backup compression level range changes from 1 to 9, where 1 gives the lowest level and 9 gives the best compression.
  • Database dump - select the check box to create database dump. The billing system will be inaccessible while this process. System downtime depends on the size of your database.


Replication

Module «Backups»
  • IP-address - enter the IP-address of the server that will be replicated.
  • Username - enter a username to gain access to the remote mysql server.
  • Password - enter a password to gain access to the remote mysql server.

Replication

You can set new replication or use the existing one.

The master server's settings:

Specify the followings information in the mysqld section of the mysql my.cnf configuration file:

server-id = 1
log-bin = /var/lib/mysql/mysql-bin 
replicate-do-db = billmgr

and restart the mysql server.

On the replication server specify:

server-id = 2
relay-log = /var/lib/mysql/mysql-relay-bin
relay-log-index = /var/lib/mysql/mysql-relay-bin.index
replicate-do-db = billmgr

and restart the mysql server.


Fill out the "Replication" tab described above. Clicking OK will verify the settings, create database dump and set the replication. The billing system will be inaccessible while this process. System downtime depends on the size of your database.

Recovery

To recover BILLmanager from a backup copy, you need to have the billing system installed. Make sure it is up and running and remember the access data to mysql. You can view them in the billing configuration file.

Unzip the backup copy in to the directory containing the billing, normally it is /usr/local/ispmgr.

If the directory contains the billmgr.sql dump, upload it into the current billing database. If you use replication, specify access details to mysql in the configuration file.

Execute killall billmgr to restart the billing panel.

Check the web-interface. If one or several errors occur while trying to access the database, check the data specified in the configuration file.

Was this helpful? Yes | No
Views
Personal tools