[horde] Restore user backup from mysql databases

Michael J Rubinsky mrubinsk at horde.org
Thu Oct 17 13:11:37 UTC 2013


Quoting Srecko Bozic <srecko_bb at yahoo.com>:

> I need to restore backup database to single-user (eg,  
> calendar,address book), without touching the rest of the other user  
> base.
> Does anyone know how can we solve this problem?

This is a potentially fragile operation since there are relations  
between a number of these tables, but the basic data is stored as so:

For kronolith, it depends on the share driver you are using. The  
calendar shares are stored in either kronolith_shares or  
kronolith_sharesng. Permissions are in the matching *_groups and  
*_users tables. Look at the structure of the data to see what fields  
contain the user name. The problem here is that these tables are  
linked by the share_id, which may be different depending on how you  
insert the new data. Be very careful here. The event data is linked to  
the share_name from these tables and is stored in kronolith_events.

For turba, it's the same except, obviously, the data is in the  
turba_shares tables. The address entries are stored in the  
turba_objects table, again, linked by either the share name or the  
user name depending on if you are using shares for the sources or not.

Other data, like group memberships and application permissions, tag  
data, etc... would probably be better off being manually added back by  
the user. I personally wouldn't try this.

Be certain you take a full DB backup before attempting this.  
Personally, I always make sure I have backups of my personal data  
exported as vcard, ical etc...

> Here is list of tables in horde databases,
>
>
> content_schema_info              |
> | horde_activesync_cache           |
> | horde_activesync_device          |
> | horde_activesync_device_users    |
> | horde_activesync_mailmap         |
> | horde_activesync_map             |
> | horde_activesync_schema_info     |
> | horde_activesync_state           |
> | horde_alarm_schema_info          |
> | horde_alarms                     |
> | horde_auth_schema_info           |
> | horde_cache                      |
> | horde_cache_schema_info          |
> | horde_core_schema_info           |
> | horde_group_schema_info          |
> | horde_groups                     |
> | horde_groups_members             |
> | horde_histories                  |
> | horde_history_schema_info        |
> | horde_lock_schema_info           |
> | horde_locks                      |
> | horde_muvfs                      |
> | horde_perms                      |
> | horde_perms_schema_info          |
> | horde_prefs                      |
> | horde_prefs_schema_info          |
> | horde_sessionhandler             |
> | horde_sessionhandler_schema_info |
> | horde_signups                    |
> | horde_syncml_anchors             |
> | horde_syncml_map                 |
> | horde_syncml_schema_info         |
> | horde_token_schema_info          |
> | horde_tokens                     |
> | horde_users                      |
> | horde_vfs                        |
> | horde_vfs_schema_info            |
> | imp_schema_info                  |
> | imp_sentmail                     |
> | ingo_forwards                    |
> | ingo_lists                       |
> | ingo_rules                       |
> | ingo_schema_info                 |
> | ingo_shares                      |
> | ingo_shares_groups               |
> | ingo_shares_users                |
> | ingo_sharesng                    |
> | ingo_sharesng_groups             |
> | ingo_sharesng_users              |
> | ingo_spam                        |
> | ingo_vacations                   |
> | kronolith_events                 |
> | kronolith_events_geo             |
> | kronolith_events_mysqlgeo        |
> | kronolith_resources              |
> | kronolith_schema_info            |
> | kronolith_shares                 |
> | kronolith_shares_groups          |
> | kronolith_shares_users           |
> | kronolith_sharesng               |
> | kronolith_sharesng_groups        |
> | kronolith_sharesng_users         |
> | kronolith_storage                |
> | mnemo_memos                      |
> | mnemo_schema_info                |
> | mnemo_shares                     |
> | mnemo_shares_groups              |
> | mnemo_shares_users               |
> | mnemo_sharesng                   |
> | mnemo_sharesng_groups            |
> | mnemo_sharesng_users             |
> | nag_schema_info                  |
> | nag_shares                       |
> | nag_shares_groups                |
> | nag_shares_users                 |
> | nag_sharesng                     |
> | nag_sharesng_groups              |
> | nag_sharesng_users               |
> | nag_tasks                        |
> | rampage_objects                  |
> | rampage_tag_stats                |
> | rampage_tagged                   |
> | rampage_tags                     |
> | rampage_types                    |
> | rampage_user_tag_stats           |
> | rampage_users                    |
> | turba_objects                    |
> | turba_schema_info                |
> | turba_shares                     |
> | turba_shares_groups              |
> | turba_shares_users               |
> | turba_sharesng                   |
> | turba_sharesng_groups            |
> | turba_sharesng_users
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org


-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/horde/attachments/20131017/729b9650/attachment.bin>


More information about the horde mailing list