Create database backup before performing a database upgrade

RESOLVED FIXED in 1.0b7

Status

enhancement
RESOLVED FIXED
11 years ago
8 years ago

People

(Reporter: ssitter, Assigned: Fallen)

Tracking

unspecified
1.0b7
Bug Flags:
blocking-calendar1.0 +

Details

(Whiteboard: [not needed beta][no l10n impact])

Attachments

(1 attachment)

Reporter

Description

11 years ago
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).

Comment 2

11 years ago
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.

Comment 3

11 years ago
I meant to say I don't agree with Daniels post in the NG, we should have backups, even for nightly builds.
No longer blocks: 328603
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.
Flags: blocking-calendar1.0+
Whiteboard: [not needed beta][no l10n impact]
Posted patch Fix - v1 โ€” โ€” Splinter Review
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]
Duplicate of this bug: 576228
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: 8 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.