Closed (works as designed)
Project:
Backup and Migrate
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2008 at 03:21 UTC
Updated:
1 Nov 2013 at 20:53 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedI use PGP since many years for secure mailing and encrypted data storage. Currently I use cron with a script to email me a backup of the database to an external mailbox. It would be very helpful to manage this with the GnuPG API.
GnuPG is a free implementation of the OpenPGP standard and can be freely used, modified and distributed under the terms of the GNU General Public License.
Comment #2
yan commentedActually that's exactly what I am looking for.
Comment #3
Anonymous (not verified) commentedDependencies: cron, GnuPG (default install:
/usr/bin/gpg, default keyrings/public key:/home/username/.gnupg*1Filename:
backup_mysql.phpCron command:
php -q /home/username/etc/backup_mysql.php*2*1 You have to import at least one public key ($recipient) into your public keyring, e.g. with cPanel.
*2 A path outside your webroot.
Comment #4
namzezam commentedFor to make secure sending of the db backup by mail, how to to use the public key of (user=1) admin generated via gnupg_user from gnupg module and by which public key to encrypt the $file (by gnupg_encrypt or gnupg_exec?) before compressing $file in the function backup_migrate_file_compress which is in modules/backup_migrate/includes/files.inc ?
This should end up only with few lines of code but result in full testing with nice functionality for both modules: the gnupg and the backup_migrate.
Comment #5
namzezam commentedWhen considering for security issue to put in php.ini
disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
then the above solution are not relevant!!!
Instead we can use pecl.php.net/package/gnupg
For more please see these:
http://devzone.zend.com/article/3753-Using-GnuPG-with-PHP
http://www.php-editors.com/php_manual/ref.gnupg.html
Comment #6
ronan commentedI have added support for the AES encryption API (http://drupal.org/project/aes). I have also left open the interface to allow GPG API integration in the future. I did not implement that API as the release notes claim that decryption is not yet supported in that module and I do not want to allow people to create backups that they cannot restore.
I'm no crypto expert, so I'd love it of some of the smart people on this thread could take a look at the AES implementation and see if it is meaningful at all (it exports, it imports and in between the files look garbled, that's about all I can tell). And maybe give me a quick primer on GnuPG: how it works, how I would implement it, what are it's advantages, etc. I would like an encryption solution that does not depend on Backup and Migrate to decrypt (so that backups are not totally useless if your site isn't running). Are there standard tools/techniques to decrypt GnuPG encrypted files?
Also, to namzezam's concern about shell_exec, passthru etc. I agree in principle. I've tried to make this module not dependent on command line utilities and the like (how much shorter would this thing be if I could just use `sqldump | gzip > $file` and be done :)) but I'm willing to compromise that for advanced functionality like this. I figure the people who are most interested in encryption are savvy enough to modify php.ini and are smart enough to know the implications.
Comment #7
Anonymous (not verified) commentedThis solution is OpenPGP/GnuPG because I read in the module:
GnuPG or any other OpenPGP program/implementation. OpenPGP is the standard. I use PGP for Windows (PGP Desktop).
If you haven't installed an OpenPGP compliant product you can not decrypt the backup files and in this case you don't need the GnuPG API at all.
As long as the GnuPG module isn't implemented in Backup and Migrate I prefer the slim version 1.x of the module and the solution posted in comment #3. It works perfectly for me.
Comment #8
ronan commentedI think after 5 years I have to come to the conclusion that I don't have the bandwidth to add and maintain this task. It should be doable as a 3rd party module though so if anyone wants to step up to the plate I'd be happy to lend guidance.