Data Backup & Migration
Freak-Flix provides several ways to ensure your library metadata, watch history, and configurations are preserved across different devices and installations. Whether you are moving to a new machine or simply want a safety copy of your curated library, use the following methods for backup and migration.
☁️ Automatic Cloud Synchronization
The primary method for data preservation in Freak-Flix is via your user account. When you are logged in, the application automatically synchronizes core data to the backend database (Cloudflare D1 or PostgreSQL, depending on your deployment).
What is Synced Automatically:
- User Profiles: Display names and preferences.
- Library Folders: The paths and provider IDs (OneDrive/Local) associated with your account.
- Watch History: Your progress across movies, TV shows, and anime.
- Metadata Overrides: Any custom tags or manual matches made to TMDB/StashDB.
To migrate to a new device (e.g., from Windows to Android), simply Login with the same credentials. Your library structure will populate automatically.
💾 Manual Data Export (Settings)
For users who prefer local backups or are using the app without a persistent cloud account, Freak-Flix offers a manual export tool located in Settings > Maintenance > Export Data.
Exporting your Configuration
This process generates a freakflix_backup.json file containing your local settings and library pointers.
- Navigate to Settings.
- Select Maintenance.
- Click Export Configuration.
- Save the JSON file to a secure location.
Restoring from a Backup
To restore your data on a fresh installation:
- Go to Settings > Maintenance > Import Configuration.
- Select your
freakflix_backup.jsonfile. - The app will restart and attempt to re-link your local and cloud media sources.
🚚 Library Path Migration
If you move your local media collection to a new drive or change the directory structure on OneDrive, you must update the library pointers to prevent "File Not Found" errors.
Updating Local Paths
If your local media has moved (e.g., from D:\Movies to E:\Media\Movies):
- Go to Settings > Library.
- Select the folder path you wish to update.
- Click Edit Path and browse to the new location.
- Run a Rescan to update the file pointers while preserving existing metadata.
OneDrive Migration
Since OneDrive content is tracked via provider_id (the unique ID assigned by Microsoft), moving files within your OneDrive usually does not break the link, provided the file ID remains the same. However, if you move files between different OneDrive accounts:
- Remove the old Library Folder in Freak-Flix.
- Add the new account/folder.
- The app will attempt to "Auto-Match" based on filenames to restore your watch history to the new items.
🛠️ Advanced: Manual Database Export (Developers)
If you are hosting your own backend (Hono/Netlify) and wish to perform a full database migration, you can interface directly with the storage layers.
Exporting from Cloudflare D1 (Hono Backend)
To export your user and library tables via the wrangler CLI:
npx wrangler d1 export <DATABASE_NAME> --remote --output ./backup.sql
Exporting from PostgreSQL (Netlify/Identity)
The user profiles are stored in the identity_users or app_users table. You can perform a standard SQL dump:
pg_dump -t identity_users -t app_users > freakflix_identity_backup.sql
⚠️ Important Considerations
- API Keys: Manual backups do not always include your TMDB or StashDB API keys for security reasons. You may need to re-enter these in the Settings menu after a restoration.
- Media Files: Freak-Flix does not backup your actual video files. It only backs up the metadata, tags, and organization structures. Ensure your actual .mp4, .mkv, or .avi files are backed up separately.
- Cross-Platform Paths: Note that local paths from Windows (e.g.,
C:\Videos) will not work on Android. When migrating across platforms, prioritize using OneDrive Cloud Streaming for a seamless experience.