BILLmanager has a built-in function to create backups. By default, backups are not activated. Create and configure backups in Tools → Backup. The Settings button will open the current backup task form or if there is no such backup task, a new task will be launched automatically.
Create a new backup plan
Step 1. Storage type
The billing system supports Dropbox, or it can save backups to an FTP server or in a separate directory on the BILLmanager server:
Step 2. Storage settings
The storage configuration form may differ depending on a selected storage type. The local storage configuration:
Step 3. Scheduler
The billing system can launch backup tasks daily at the specified time or weekly on the specified days:
Restore BILLmanager from backup
Restore via interface
You can restore data in Tools → Backup configuration → select a backup→ click Restore button.
Also, the billing system can restore system objects. Clicking the Data button opens a list of available components:
- Files. It stores control panel configurations, user configurations, etc. To restore all data, select Files and click Details, then select F iles and click Restore. The billing system can restore system objects. Go to the file selection form → select Files → click View details.
- Database. It stores all accounts information, tariff plans, clients' expenses, etc. To restore data, select Database →click Details → select "<database server name>" → click Restore.
During the restore process:
- The data archive you want to restore will be copied from the storage to a temporary directory.
- The archive contents will be extracted into the temporary directory.
- Depending on a selected component, the selected files will be moved to a new location or database would be filled with data.
Restore via command line
Restoring files
Upload the backup file (archive) from the storage into a directory on the BILLmanager server and execute the following command:
tar -xz -C / -f <backup directory file>
To restore certain files from the archive:
tar -xz -C / -f <backup directory file> <file name>
To restore the whole data from the archive on FTP-server:
curl ftp://example.com/backup_2015-04-01_03-00-00/plan1-files-0.tgz | tar -xz -C / -f -
Restoring from database
Upload the backup file (archive) from the storage in the arbitrary directory on the BILLmanager server and execute the following command:
tar -xz --wildcards -O -f /path/to/archive/with/database'*.sql' | mysql -uroot -p billmgr
To restore the whole data from the archive on FTP-server:
curl ftp://example.com/backup_2015-04-01_03-00-00/database-billmgr-1.tgz | tar -xz --wildcards -O -f - '*.sql' | mysql -uroot -p billmgr