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

chore(docs): Encode db dump in UTF-8 for windows #11787

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

thariq-shanavas
Copy link
Contributor

@thariq-shanavas thariq-shanavas commented Aug 14, 2024

Powershell does not use UTF-8 encoding by default, which makes database dumps incompatible between Windows and Linux. This PR makes Windows save the dump in UTF-8 format.

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_character_encoding?view=powershell-7.4

In general, Windows PowerShell uses the Unicode UTF-16LE encoding by default. However, the default encoding used by cmdlets in Windows PowerShell is not consistent.

Surprisingly, no changes were required to the command to restore the dump. Dumps encoded in UTF-8 using the updated command in this PR restores using the existing command provided in the docs on Windows and Linux.

I found out about this quirk when helping a user on discord migrate their instance from Windows to Linux here: https://discord.com/channels/979116623879368755/1268076684498960444

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 14, 2024
@jrasm91 jrasm91 merged commit fcec5f8 into immich-app:main Aug 14, 2024
23 checks passed
Yuvi-raj-P pushed a commit to Yuvi-raj-P/immich that referenced this pull request Aug 19, 2024
* Encode db dump in UTF-8 for windows

* Update backup-and-restore.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:documentation documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants