crspyjohn Posted May 24, 2013 Share Posted May 24, 2013 Could anyone help me figure out a way to securely backup a WHMCS database on a shared server? The automated one is unsecure and stops working after 20mbs~ 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Chris Posted May 24, 2013 Share Posted May 24, 2013 Hello, Are you using cPanel? If so, it has a backup utility built into it. Alternatively, you could just create a cronjob to do that. mysql -u$username -p$pass $db > /path/to/desiredbackupfolder/whmcs_db.`date "+%Y%m%d"`.sql 0 Quote Link to comment Share on other sites More sharing options...
bear Posted May 24, 2013 Share Posted May 24, 2013 Adding a pass into a cron is not a good idea. That shows up in various places, including any cron email generated. Get yourself a backup script (or turn the command above into one), stick it where no one can reach it externally, and cron that instead. As for it being secure on a shared server? Risky in general, and only as secure as the server and all accounts on it. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Chris Posted May 24, 2013 Share Posted May 24, 2013 Adding a pass into a cron is not a good idea. That shows up in various places, including any cron email generated. Disabling cron emails is simple, and only ones with access to the users crontab is the user, and root. If you didn't want to have a password in a cronjob, grab it from the configuration.php file. mysql -u$username -p`grep db_password /path/to/whmcs/configuration.php|awk -F"'" '{print $2}'` db_name > /path/to/desiredbackupfolder/whmcs_db.`date "+%Y%m%d"`.sql 0 Quote Link to comment Share on other sites More sharing options...
bear Posted May 24, 2013 Share Posted May 24, 2013 This should fix it. http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/CronJobs Note: If you do not wish to receive an email notifying you of a specific cron job, add the following line to the command: >/dev/null 2>&1 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.