Closed Bug 438369 Opened 13 years ago Closed 10 years ago
Create database backup before performing a database upgrade
Sunbird should create a backup of the calendar database before performing a database upgrade. If something goes wrong during the upgrade the backup can be restored (either manually or automatically).
posted to the ml: <http://groups.google.com/group/mozilla.dev.apps.calendar/msg/3b8cc3436950f6c6>
I don't agree, seeing how much trouble there has been with broken profiles after updates we should have a backup for the calendar-data. This especially as system-restore on windows will lose it's function when bug 328603 has landed.
I meant to say I don't agree with Daniels post in the NG, we should have backups, even for nightly builds.
mozIStorageService has a method called backupDatabaseFile which can be used here.
OS: Windows XP → All
Hardware: x86 → All
I think we should make use of this. While Daniel is right, we should make sure our provider upgrades with transactions, often users want to try out a new version and then decide to downgrade, because their addons are not compatible. Right now we have to tell them, they need to export their data, then import back to an older profile. Telling them to just replace the database file would be quite nice. Since our performance with large calendars isn't that good right now its not much of an issue, but we should keep in mind, that if the user has a large calendar and keeps his profile for a few versions, then his profile folder might get quite large. I guess we could keep only the last version, but otoh hard drive space is cheap, so maybe its a non-issue.
Whiteboard: [not needed beta][no l10n impact]
This patch takes care. I tested this on linux and it didn't cause any problems, I hope that the backupDatabaseFile() method handles locked files gracefully.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #547957 - Flags: review?(mschroeder)
Whiteboard: [not needed beta][no l10n impact] → [not needed beta][no l10n impact][needs review]
Comment on attachment 547957 [details] [diff] [review] Fix - v1 Looks good code-wise. r=mschroeder
Attachment #547957 - Flags: review?(mschroeder) → review+
Whiteboard: [not needed beta][no l10n impact][needs review] → [not needed beta][no l10n impact]
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/67346373f6d1> -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Trunk
This bug was also pushed to comm-beta and comm-aurora, likely during the last merge.
Target Milestone: Trunk → 1.0b6
You need to log in before you can comment on or make changes to this bug.