Skip to content

Configuration options for dbbackup - #4190

Merged
SchrodingersGat merged 5 commits into
inventree:masterfrom
SchrodingersGat:dbbackup-settings
Jan 9, 2023
Merged

SchrodingersGat merged 5 commits into
inventree:masterfrom
SchrodingersGat:dbbackup-settings

Conversation

@SchrodingersGat

@SchrodingersGat SchrodingersGat commented Jan 9, 2023 •

Copy link
Copy Markdown
Member

Closes #4180

This PR adds some setup / configuration options for database backup.

Additionally, backup is no longer "forced" during the "invoke update" step. This allows the update step to be run without backup, in situations where the user might not want this, or where backup is misconfigured.

On some (lower end) systems the "backup" task can stall for a long period of time which can cause worker timeout.

Ref: #4179

@SchrodingersGat SchrodingersGat added the setup Relates to the InvenTree setup / installation process label Jan 9, 2023
@SchrodingersGat

Copy link
Copy Markdown
Member Author

@matmair due to the change to the invoke update step, (which no longer calls "backup" by default) does the installer script need to be adjusted?

@SchrodingersGat SchrodingersGat added this to the 0.10.0 milestone Jan 9, 2023

@matmair matmair left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would not recommend running migrations without a backup as that might destroy an instance permanently. You are the maintainer, if you think this is in the best intrest of the user/project I wont stand against it.

@matmair

matmair commented Jan 9, 2023

Copy link
Copy Markdown
Member

@matmair due to the change to the invoke update step, (which no longer calls "backup" by default) does the installer script need to be adjusted?

The installer just calls the invoke task so no changes required. Maybe a migration that adds the backup option for exsisting installs would be good. Or a warning that this default changed could be sent to all superusers.

@SchrodingersGat

Copy link
Copy Markdown
Member Author

I would not recommend running migrations without a backup as that might destroy an instance permanently. You are the maintainer, if you think this is in the best intrest of the user/project I wont stand against it.

fair, I have swapped it to be "on" by default, but users can override if they really want.

@SchrodingersGat
SchrodingersGat merged commit 385ed82 into inventree:master Jan 9, 2023
@SchrodingersGat
SchrodingersGat deleted the dbbackup-settings branch January 9, 2023 20:54
@MR-DOS

MR-DOS commented Jan 10, 2023

Copy link
Copy Markdown

Hi, the problem was not during "invoke update", but on regular startup of Inventree server. Updating went completely OK.
With these changes, I could theoretically start up the server with backups disabled with otherwise default settings. Then if I wanted to enable them, I would have to restart the server and run into the same deadlock issue again, have to decrease amount of background workers, start up the server, wait for it to get satisfied with creating backups, shut it down and restart again with full amount of bkg workers. Or am I mistaken?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

setup Relates to the InvenTree setup / installation process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inventree 0.9+ cannot be started on low-end servers due to infinite loop of restarting timeouting workers

3 participants