Jump to content

Secure method of backuping database?


crspyjohn

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated