Backup/Import system needs maintenance for PocketBase sync #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The export/import system doesn't account for recent PocketBase changes and sync behavior. Several gaps exist between what's backed up and what's needed to restore a full working state.
Issues Found
1. remoteId not cleared on import (critical sync bug)
remoteIdfields from original deviceSyncService.push()attempts to update PocketBase records with those IDsremoteIdandremoteImageFilenameon import, setisDirty=trueto push to current account2. User settings not backed up (data loss)
user_shopping_list)removed_ingredients)partner_favorites,partner_email)userSettings.jsonto the ZIP alongside dishes3. Dish created-at timestamps orphaned on import
PreferencesServicestoresdish_ca_<isar_id>keysmetadatafield on Dish or included separately in backup4. isFavorite flag loses meaning when logged in
isFavoriteexported from Isar but managed viaUserSettingsServiceAffected Code
lib/data/services/backup_service.dart(lines 255-266)lib/data/services/preferences_service.dart(dash_ca_* keys)lib/data/services/user_settings_service.dart(user settings keys)Recommendation
Start with Issue 1 (critical) to prevent sync corruption. Issues 2–3 are data loss but less common (affect offline/restore workflows).