-
☆ A M B ☆
- 1,231 Posts
Hello,
I would like to ask if anyone here knows of any good scripts that can backup my files and databases on my hosting account. There’s no auto-function with my host to have my sites backedup and then saved in a zip in a separate folder. My host said I could create a script myself and run it but I’m unsure which would be the best way to do this so I thought I would ask on here since there’s some experts that could probably answer this for me. I don’t mind if there were 2 scripts, 1 for saving files and the other saving the DB if 1 script couldn’t do both. I can backup my site using my host’s backup system but this only allows me to download the files to my pc and I would prefer they were stored in a directory in my account, obviously out of the public html folder.
Any suggestions would be great. Thanks
-
☆ A M B ☆
- 1,231 Posts
Thanks Bunk, looks like just what I need.
Just tried it out... worked perfectly! Is there a way to have it run once a day automatically?
-
☆ A M B ☆
- 1,231 Posts
I’m using servers with Linux on them and in the control panel there’s a scheduled tasks area. According to the help it’s says to set up a command to run the script.
Not being very savvy with this could someone be kind enough to give me an idea of what to do? There’s one line where a command line is put in and here’s a copy of the instructions. As I have the backup script in my public_html folder I’m not sure how it would work.
Configure Scheduled Tasks
The command lines below will be run on the web server for you at the intervals you select. Please note that the path is absolute so if your script is called test.pl and is located in your public_html/ directory then the full path would be:-
/home/sites/rossco-designs.com/public_html/test.pl.
Programs that use excessive server resources may be banned. We take this opportunity to remind you that we do not allow permanent server processors to be run on our servers.
Common Problems
Please note the following common problems you may experience when setting up a scheduled task:
* Please make sure you enter a valid date for your tasks.
* The file permissions for the script are set correctly, 711 or 755.
* If the script involves code from a scripting language specify the path for the interpreter used e.g. for perl /usr/bin/perl and php is /usr/bin/php otherwise the shell will not know how to interpret the script.
* If the script being run is adapted from a cgi script be sure to make the necessary changes as the scheduled task is run by the shell statement such as #!/usr/bin/perl which is needed for cgi, and will be interpreted as a comment.
Thanks for the help.
-
☆ A M B ☆
- 1,231 Posts
Hey,
Has anyone had problems running this script at all? On one of my sites it works great but is only about 40mb in size but one size that has about 500mb of information, stops at the SQL backup line.
Is there limitations to this script?
-
☆ A M B ☆
- 1,231 Posts
Thanks Ganesh,
I just looked at the thread for the script and there’s an update... also looking at the config there’s a setting for the size of the backup.
Ross