Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup and Restore #4166

Merged
merged 49 commits into from
Mar 29, 2021
Merged

Backup and Restore #4166

merged 49 commits into from
Mar 29, 2021

Conversation

finnschiermer
Copy link
Contributor

@finnschiermer finnschiermer commented Dec 4, 2020

Backup and restore

Automatically create a backup before file format upgrades. Retain backups for 3 months.
Automatically restore if rolling back to before a file format upgrade for wich a backup is present.

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • 🚦 Check for sufficient file space first
  • 🚦 Report problems in a log file

@finnschiermer finnschiermer force-pushed the fsa/backup-restore branch 3 times, most recently from b3bd421 to b292188 Compare December 10, 2020 16:10
@finnschiermer finnschiermer changed the title WIP Backup and Restore Backup and Restore Dec 16, 2020
src/realm/backup_restore.cpp Outdated Show resolved Hide resolved
src/realm/backup_restore.cpp Outdated Show resolved Hide resolved
src/realm/backup_restore.cpp Outdated Show resolved Hide resolved
src/realm/db.cpp Outdated Show resolved Hide resolved
src/realm/db_options.hpp Outdated Show resolved Hide resolved
src/realm/backup_restore.cpp Outdated Show resolved Hide resolved
src/realm/backup_restore.cpp Show resolved Hide resolved
src/realm/backup_restore.cpp Show resolved Hide resolved
test/test_upgrade_database.cpp Outdated Show resolved Hide resolved
test/test_upgrade_database.cpp Show resolved Hide resolved
@jedelbo jedelbo requested a review from RedBeard0531 January 18, 2021 14:04
Base automatically changed from develop to breaking February 1, 2021 14:35
@jedelbo jedelbo removed their request for review February 5, 2021 14:54
@jedelbo
Copy link
Contributor

jedelbo commented Feb 5, 2021

@finnschiermer you can add me as reviewer when this is ready again.

@finnschiermer finnschiermer changed the base branch from breaking to master February 8, 2021 13:53
test/object-store/CMakeLists.txt Show resolved Hide resolved
@finnschiermer finnschiermer requested a review from jedelbo March 29, 2021 11:15
@finnschiermer finnschiermer merged commit aa4609c into master Mar 29, 2021
@finnschiermer finnschiermer deleted the fsa/backup-restore branch March 29, 2021 12:14
@sipersso
Copy link

What problem does this solve? Is it possible to catch/disable this behavior for local realms?

If I understand this correctly.

1: The user upgrades to a new version of the app that contains a realm file format upgrade.
2: The user adds data to the new database.
3: I release a new version that reverts the database version and the file format.
4: The user upgrades.

I assume that if this happens all data that the user added in step 2 will be lost?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants