مرکز آموزش
پشتیبانی > مرکز آموزش > General Support > How to Backup your Website Automatically with cPanel
How to Backup your Website Automatically with cPanel
| I released my Simple FTP Backup Script (v0.9b). This Perl script allows you to perform a backup of your files and MySQL databases as well and upload it to a remote FTP server (read this post for some FTP backup services).
Since the release of this backup script, I’ve made some small adjustments to some minor preference parameters you can now set. Click here to download the Simple FTP Backup Script v0.9c
How to a Schedule a Backup Task using cPanel
This tutorial has been written assuming you’ve already got a remote ftp storage. I will be using my BlueHost control panel (cPanel) so yours may look slightly different.
- Rename the backup script file name to “ftp-backup-script.pl” and upload it to your website account through FTP. Make sure you’re uploading it in a non-public folder if possible. If not, make sure to protect this directory so that nobody else invokes the script from a web browser. Personnally, I suggest you create a directory at the same level as /public_html
- Use your web browser to access cPanel (http://www.yourwebsite.com/cpanel).
- Click the Cron Jobs icon :

- On the next page, click the Standard button.
- Enter the command to run :
/usr/bin/perl /path/to/backup/script/ftp-backup-script.pl
- Scheduling the task like shown below would run the backup script once a day at 3 AM :

- Hit the Save Crontab button and you’re done!
If it doesn’t work, try the following :
- On the Crontab page, enter an email address where the cron output will be sent to. This might give you valuable information as to why the backup task didn’t run properly.
- Try setting the permissions on ftp-backup-script.pl to 0755
- Make sure the path to Perl is /usr/bin/perl. In case you don’t know, contact your web host’s support.
Stay tuned as I’ll show you how to schedule daily, weekly and yearly backup tasks.
|
افزودن به مورد علاقه ها
چاپ این مقاله
|
خوانده شده
Powered by WHMCompleteSolution