I ran into some annoying problems (e.g. could not delete files from trash) after having used our instance for around five years.
Even after a standard reinstall (move data and db dump to a new server) the problems persisted.
It’s not the data itself (backup checksums correct, no fs errors, new disks) so the problem must arise from the db.
The next db dump/import will very likely not yield other results so I’m looking for a route to only transfer users (with their credentials, calendars/todo lists and contacts) to a naked instance and scan the files afterwards.
How would I do this?
- Create users with matching names & passwords on the new instance
- Export every user’s calendar(s)/todolist(s) to an .ics file and reimport that file(s) logged into the new instance as the corresponding user
- Export every user’s address book(s) to an .vcf file and reimport that file(s) logged into the new instance as the corresponding user
And now?
I suppose the calendar shares will have to be recreated manually since the new instance has no knowledge of with whom a calendar has been shared with on the old instance. Same for the group folders.
Two and a half questions remain:
- How do I scan the data dir for files and assign them to the right user?
- Is scanning for files (& assigning them) in the
trash
and theversions
folders of that user possible too (or would going this route mean to loose trash and versions altogether)? - How can I keep the colours of the calendars (and individually coloured events)?
The best solution would be a possibility to purge just the files related stuff from the db (leaving users with their credentials, calendars and address books untouched) and recreate these entries through scanning.
Unfortunately I have little understanding of the db structure so I will refrain from poking around it’s intestines via PhpMyAdmin or sth.
The normal operation of our instance is fine even after five years; “only” the files related stuff is a PITA (did I mention the dumb Windows client, reup- or downloading tons of files even tough they have the same dates/times and unchanged content on the server and the client?).
I’d really like to have a broom to partially sweep the db and a wand to “restore order” afterwards.