

PHP script to backup MySQL on Mega - PauloManrique
https://github.com/paulomanrique/MySQLBackupMegaCoNZ
This is a simple PHP script, that dumps a MySQL database in Gzip and upload it on Mega.co.nz service.<p>Since I&#x27;m new to open source, I&#x27;d like to hear your thoughts, improvements and stuff.
======
PauloManrique
This is a simple PHP script, that dumps a MySQL database in Gzip and upload it
on Mega.co.nz service.

Since I'm new to open source projects I'd like to hear your thoughts, what can
be improved, etc.

~~~
viraptor
So you copied code that reimplements RSA into your script... why not just call
something that's already available? (for example that pear package itself)

IV filled with 0s? Probably doesn't matter that much in this case, but... are
you sure?

$comando - that's not English.

Regarding usability of this script: there are two libraries hiding in that
file. One for RSA and one for interaction with mega service. Why not make them
separate and reusable?

Also there's no usage instruction. Which variables need to be filled in? Is
$master_key a global setting, or something used internally? Moving settings to
a separate file (just import config.php for example) would make this much more
clear.

Finally, you cannot just slap a new license on this code and put it in public
domain. Most of the code comes from [http://julien-marchand.fr/blog/using-the-
mega-api-with-php-e...](http://julien-marchand.fr/blog/using-the-mega-api-
with-php-examples/) and the RSA bits come from Pear package which is licensed
under the PHP license. If you keep them separate, you can put your own code in
public domain though.

But if it all works... good! You made the first step and that counts :)

~~~
PauloManrique
Thank you for your insight, I'll work on fixing this as soon as possible. :)

