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

FR: Notifications for consistency check #1632

Closed
sudwhiwdh opened this issue Mar 8, 2023 · 12 comments · Fixed by #1940
Closed

FR: Notifications for consistency check #1632

sudwhiwdh opened this issue Mar 8, 2023 · 12 comments · Fixed by #1940
Labels
good first issue Simple change to start learning code base help wanted This issue is available, comment if you want to fix it type:enhancement Improvement of an existing function

Comments

@sudwhiwdh
Copy link

Requested Solution

Vorta displays the notification "Backup successful for [repository]" only after the data consistency check has been completed.

Alternatives

As an alternative, I could imagine Vorta sending out different notifications. First for the backup and separate notifications for the consistency check.

@sudwhiwdh sudwhiwdh added the type:enhancement Improvement of an existing function label Mar 8, 2023
@sudwhiwdh
Copy link
Author

I also wonder what happens technically when the Vorta notification is displayed that the backup is complete and I then remove the external drive before the consistency check has been completed.
Can this break something in my backup file?

@real-yfprojects
Copy link
Collaborator

real-yfprojects commented Mar 10, 2023

As an alternative, I could imagine Vorta sending out different notifications. First for the backup and separate notifications for the consistency check.

That would make more sense.

Can this break something in my backup file?

@ThomasWaldmann will have to tell you.

@real-yfprojects real-yfprojects added good first issue Simple change to start learning code base help wanted This issue is available, comment if you want to fix it labels Mar 10, 2023
@ThomasWaldmann
Copy link
Collaborator

ThomasWaldmann commented Mar 10, 2023

Define "consistency check" in terms of borg commands.

@real-yfprojects
Copy link
Collaborator

I think borg check is meant.

@ThomasWaldmann
Copy link
Collaborator

Usually it should be able to roll back ok.

But you never should unplug a disk with a mounted fs - and you can not umount it while it is in use.
So cleanly dealing with this on the operator side avoids mistakes.

@sudwhiwdh
Copy link
Author

sudwhiwdh commented Mar 10, 2023

That would makes more sense.

@real-yfprojects So one notification at the beginning of the backup, one at the end of the backup, one at the beginning of the consistency check, and one after the consistency check is complete?

The smallest interval for the validation of the repository data is currently once a week. At that point it would be four notifications, instead of the usual two for a normal backup without validation.

I wonder if this will be too many notifications and if this change would be an improvement.

Usually it should be able to roll back ok.

@ThomasWaldmann What exactly does "roll back" mean in this context?

@ThomasWaldmann
Copy link
Collaborator

@sudwhiwdh borg usually tries to work transaction based. So if you start from a valid repo state, it starts a transaction.

Then it works on that and either successfully completes it (finishes transaction) or gets interrupted somehow (crash, power failure, ...).

The next time it works with the repo, it will notice if there is an incomplete transaction and then roll back the repo files to that last valid state (== undo the not completed changes).

@real-yfprojects
Copy link
Collaborator

At that point it would be four notifications,

We could reduce it to three notifications by dropping backup completed when there is a consistency check. In case of an additional prune that would make 4 notifications. Or we move the completed notification to the end of all three operations as you suggested.

@sudwhiwdh
Copy link
Author

In case of an additional prune that would make 4 notifications.

There is also a notification for pruning?
I have enabled automatic pruning after each backup. I have not received a notification for this yet.

@real-yfprojects
Copy link
Collaborator

No but we might want to add it because of your FR.

@diivi
Copy link
Contributor

diivi commented Mar 23, 2023

@sudwhiwdh what would you prefer out of these two:

We could reduce it to three notifications by dropping backup completed when there is a consistency check. In case of an additional prune that would make 4 notifications. Or we move the completed notification to the end of all three operations as you suggested.

@sudwhiwdh
Copy link
Author

@diivi

I can say what would be important to me as a user in relation to my use case.

For me, it would be important to know when the backup starts and from when it is safe to unmount my external USB storage device again because the backup is completely finished. This includes any validations and pruning.

Especially if there are several steps, I think it would be transparent to name them and be able to see them, but this can be looked up in the repository tab at any time.

I would also find it overwhelming to receive a lot of notifications for a backup, because I am informed individually for each step that begins and ends.

TheLazron added a commit to TheLazron/vorta that referenced this issue Feb 21, 2024
m3nu added a commit to TheLazron/vorta that referenced this issue Apr 7, 2024
@m3nu m3nu closed this as completed in #1940 Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Simple change to start learning code base help wanted This issue is available, comment if you want to fix it type:enhancement Improvement of an existing function
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants