Restoring Billing from Backup
Important: Save the results of all operations described in this section (including logs, screenshots where relevant, and scripts' outputs). In case of any problems that call for support team assistance, support representatives will ask for Billing restore results.
-
Stop the Billing application by running these commands:
systemctl stop pba systemctl stop ssm
- Restore the Billing application.
-
If the Billing application was installed in Virtuozzo containers, restore the Container. Use this command:
vzrestore -d <node_name> -t <backup_tag> -s <node_name> -e <container_id>
where
<container_id>
is Billing's Container ID.If you do not know the backup tag, you can find it using the command:
vzrestore -l --desc
. - If the Billing application was installed using a virtualization solution other than Virtuozzo containers, restore the system using tools compatible with that virtualization solution.
- If the Billing application was installed on a physical server, restore a system using tools available for the host operating system.
- Restore the Billing database.
- Perform the restore:
- If the Billing database is inside Virtuozzo containers, restore the Container. Use the same command as above, for the Billing application.
If the Billing database is on a physical server, make sure that the Billing application is stopped before restoring. To restore the database, you need to drop the old database, create a new one, and restore the old database into the newly created one. To do that, use the following commands:
dropdb –Upostgres -i pba
createdb –Upostgres –EUTF8 –Opba pba
gunzip –c <db_backup_file> | psql –q -–set ON_ERROR_STOP=on –Upostgres pba
where
<db_backup_file>
is the name of file used for storing DB backup data.Example:
dropdb –Upostgres -i pba
createdb –Upostgres –EUTF8 –Opba pba
gunzip –c db_dump.gz | psql –q -–set ON_ERROR_STOP=on –Upostgres pba
Once the database restore is finished, run
configure.pl
on the Billing Application node:/usr/local/bm/tools/configure.pl
Finally, start the Billing application:
systemctl start pba
- Restore the Billing online store.
Perform the restore:
- If the online store was installed inside a Virtuozzo containers, restore this Container as described for Billing application.
- If the online store was installed using a virtualization solution other than Virtuozzo , restore the online store using tools compatible with that virtualization solution.
- If the online store was installed on a physical server, copy the backed up data of the store to the essential directory. The default directory of the store is
/usr/local/bm/templatestore
.
- Restore all of the resellers' stores in the same way as described for the provider's store.
-
Restore Billing customization.
Copy backed up customization data to the relevant directories. Default directories for customization are:
/usr/local/bm/conf/wnd
/usr/local/bm/customization
If customization was done by special request by your vendor representatives and you are not sure about the customization directories' location, contact support.
Note: If the Billing upgrade was successful but the customization appeared to be broken, it can be restored from backup without the need to restore all of Billing.