add roundcube db data to backup/restore

Version 1.46


BUG: please update to 1.46.2+ to get the fix for the following bug: ------------------------------------------------------------------------------------------ Include roundcube email account database info in the DA backups. Restore that data back into roundcube. With per email backup/restore functionality, we'd likely switch to use RoundCube as the default webmail client, but lack of command line backup/restore prevents us from doing so. Two new scripts: /usr/local/directadmin/scripts/backup_roundcube.php /usr/local/directadmin/scripts/restore_roundcube.php They will be called by DA during the bacukp/restore process. All variables are passed via environment (domain, username, xml_file) The backup creates an xml file in the backup: backup/ You can shut off the inclusion of the roundcube data by adding this option to the directadmin.conf: skip_roundcube_in_backups=1 The internal default is: skip_roundcube_in_backups=0 The restore will always restore the xml file if the xml file exists. The roundcube xml file falls under the "E-Mail Data" checkbox. It's contents include essentially everything you can see in Roundcube, contacts, contact groups, identities, and other miscellaneous settings. ================================================ Old Info, no longer applicable. There are 2 or 3 "showstopper" issues with us adding RoundCube data to the backups 1) Each update of roundcube changes major aspects of the database design. Often, entire tables are dropped, and converted into multiple new different tables. This makes knowing what data to grab quite difficult, as it moves around for each version, so we'd need to make new backup/restore code for every version of roundcube (where changes are made). (Addition: The table formats seemed to have stabilized recently, but we cannot predict the future) 2) The user_id values are unique to the database.. so an export one one sever with a specific uid value for an email may already be taken on the restore on the remote server. This needs DA basically a) know where to get the data (see #1 above) and also b) store all of the data in it's own format, while maintaining all of the proper rows/fields.. but without the uid number. c) Then the restore would then need to figure out a new id for the user, and reset all of the data in the correct place. Any new changes/updates to the database with another RoundCube version would break this functionality, and a new DA version would be needed to handle it. What would be nice (request to the RoundCube developers) would be a script where the email address is passed, which dumps all data (contacts, address books, identities, etc.) into a nice xml file, or something like that, where the only thing that is passed is the email address. And a similar restore script that can accept this backup file, and handle all of the uid inserts, regardless of what changes have been made to the DB. --------------------------------------------- Solution, if it gets implemented (no longer needed, now that we have the above scripts)

Interested to try DirectAdmin? Get a 30-day Free Trial!