Procedure for migrating HostBill enterprise version onto new server / reinstalling enterprise version without data loss.
1. Login to your HostBill server as root. Proceed to HostBill includes directory:
cd /home/hostbill/public_html/includes/ |
2. Check database name to create dump of:
cat config.php | grep db_name |
Sample return: >$db_name = '1408513157';
3. Copy database name, create dump
mysqldump 1408513157 > /root/hbdump.sql |
4. If you have some customizations done already or modules uploaded, backup public_html folder
cd /home/hostbill/public_html/ cp includes/config.php includes/config.php.backup tar -zcvf /root/hostbill.publichtml.tgz --exclude='config.php' |
Note: Consider creating backups of /home/hostbill/attachments and /home/hostbill/downloads folders, if you use support plugin and downloads section in clientarea already |
5. Store /root/hbdump.sql and /root/hostbill.publichtml.tgz in secure place or upload it to your new HostBill install server
6. (Re)install HostBill enterprise using installation command you have received after purchasing HostBill.
Note: Make sure to start with clean centos install! |
7. On fresh install get new database name:
cd /home/hostbill/public_html cat includes/config.php | grep db_name |
Sample return: >$db_name = '1408513158';
8. Apply sql backup to new database
mysql 1408513158 < /root/hbdump.sql |
9. Apply public_html backup onto fresh install
tar -zxvf /root/hostbill.publichtml.tgz -C /home/hostbill/public_html/ |
10. From /home/hostbill/public_html/includes/config.php.backup copy value of $ccEncryptionHash and paste into config.php file:
cat /home/hostbill/public_html/includes/config.php.backup | grep ccEncryptionHash >> /home/hostbill/public_html/includes/config.php |
Final steps: