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

fix(docs): Update documentation backup-and-restore #15679

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

itskagee
Copy link

  • Fixed default database name.
  • Added default database user name.
    • Added the default value of DB_USERNAME to the default information comment.

- Fixed default database name.
- Added default database user name.
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 26, 2025
Copy link
Contributor

@mmomjian mmomjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, thank you for your PR.

  1. Regarding DB_DATABASE_NAME, this does not need to match the default immich database. Since we do a pg_dumpall, we want to connect to a default database that always exists - the postgres database is always there, so in that case the user will not have to edit the command.
  2. I don't really know if it's valuable to include the defaults here as they may change in the future, and thus will require editing in more and more places, however if we do want to keep it I would put it in code ticks instead of single quotes

@mmomjian
Copy link
Contributor

I guess it seems we should remove the --dbname directive:

https://www.postgresql.org/docs/7.1/app-pg-dumpall.html

@itskagee
Copy link
Author

Hi @mmomjian
Thanks for going through the PR!

After looking at your comments, I think I agree with both of them.

  • I have no experience with postgres, so when I saw that comment mentioning default values, I thought that both the database name and the username probably needed to be default.
    My bad.
    When I was restoring my database, I went ahead and changed the dbname to immich and it worked, so I thought maybe something was wrong with the documentation.
  • Yeah it'd probably be a hassle maintaining multiple pages when defaults eventually change.
    I can see the point of not adding another one to the list.
    Especially when looking up the current value is not that convoluted.

Regarding your most recent comment about removing the --dbname directive, this I think would be the best solution to the first problem, if it has no negative repercussions. Like I said, not too familiar with postgres, so don't wanna change something that breaks restore for folks haha.

But if it is valid, then please let me know and I can change the PR to reflect that.
Or if not, I'll just change the comment in the code to better reflect that the dbname doesn't need to be changed, so that someone like me doesn't get confused later on.

@mmomjian mmomjian requested a review from mertalev January 27, 2025 10:54
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