Of course there is possibility of script timeout exceeding etc. (unless set accordingly) when using PHP for taking database backups/dumps. But ignoring these non-security related things what are all the security issues involved.
I read somewhere that since the backup needs to be created in the web space, there are risks of the file getting accessed from browser by other users. Can someone explain that in detail? Is there a momentary risk when the dump is created, before proper file permission is set? If so, how do apps like PhpMyAdmin take care of that? I read that they do something but I am not sure what and I found it quite painful to explore its code to locate the trick without knowing what exactly they do. So, if you guys could share the basic idea/technique to start with. Other than this what other security issues exist. It would be nice to see all the possibilities discussed here, so that newbie programmers are aware before running into trouble.
Of course it is better to use things like shell scripts but this may not serve the purpose always -
- User may not be a techie and be more comfortable with running a simple URL for backup.
- There may not be shell access available etc.
Thanks,
Sandeepan