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
Implemented backup based on changes recorded in NTFS USN journal #3184
Conversation
This pull request has been mentioned on Duplicati. There might be relevant details there: |
I think you can close the pull request and reopen it again if you don't want it to be merged at the moment. |
…atabase, and speed up various queries. This fixes duplicati#1283
The pull request is now in sync with the latest canary. |
… due to latest merge with master
…, and added a `using` directive. Added some additional logging to better diagnose issues with VSS/LVM snapshots.
…lass, as it crashes the Mono compiler for some reason.
Ok, all looks good. I added some logging that was not previously there, and made some minor fixes to the MD5 utility class: I did have one problem, namely that the Can you review/test my changes and then I will merge them into master, closing this PR in the progress? |
Kenneth,
Thanks for reviewing, and yes, I will test your changes right now. I know
about the refactoring. The issue was that I needed the Snapshot classes to
behave differently, namely, that they Enumeration method takes the list of
folders to enumerate, and not the constructor. This resulted in a big code
change, and that's when I realized that I can minimize new duplicate code
by refactoring. I'll try to keep things separate in the future.
Not related to USN, and regarding snapshots, by the way: this takes almost
5' on my PC, and in fact, it would be sufficient to use the VSS only for
files that cannot be backed up directly (because they are open). An
additional option "on demand" would be nice, where the snapshot service is
used only on a per-file basis (not per drive), whenever a file cannot be
accessed otherwise. I think that would further speed up things. That said,
USN already reduces backup time on my server from roughly 30 minutes to
about 2-3, and only a few seconds of this are for enumating files. It's
close to real-time.
- Daniel
ᐧ
…On Wed, May 9, 2018 at 10:54 AM, Kenneth Skovhede ***@***.***> wrote:
Ok, all looks good.
For future commits, it is much easier to review if refactoring and actual
changes are two different commits.
I added some logging that was not previously there, and made some minor
fixes to the MD5 utility class:
https://github.com/duplicati/duplicati/tree/feature/usn-support-update
I did have one problem, namely that the EnumerateRecords function crashes
the Mono compiler when it tries to build the enumeration class. This is
quite strange as enumerator methods are used in many places, but for some
reason this particular function is causing problems. It might be related to
the type being enumerated over is private. In any case, I rewrote the
function to use a manual instantiated IEnumerable<Record> (not as pretty,
but at least the compiler does not crash).
Can you review/test my changes and then I will merge them into master,
closing this PR in the progress?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#3184 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACLCbrU0safNKAEM7jRUvfZfzJpW9ovXks5twq6_gaJpZM4TchIz>
.
|
Ken, Your changes look good, too. I just made a minor change to the Enumerator (ensuring that Current is read-only, and ensuring that m_entryData is > sizeof(long). I think we are good to go. |
Not sure why the checks failed - this seems to be a n issue with AppVeyor / Travis rather than this commit... |
This pull request has been mentioned on Duplicati. There might be relevant details there: https://forum.duplicati.com/t/will-changed-files-use-macos-fsevents-service/5485/6 |
This pull request has been mentioned on Duplicati. There might be relevant details there: |
This pull request has been mentioned on Duplicati. There might be relevant details there: |
First implementation of NTFS USN journal optimization.
FilterHandler.EnumerateFilesAndFolders()
. That way, there is no risk of incorrectly interpreting the journal entries in complex rename / delete / re-create scenarios. Whenever a file / folder is "touched" in the journal, it will be fully scanned.ChangeJournalData
in the local database. This table also records a hash value for each fileset, representing the active source files and filter set. An initial full scan is re-triggered whenever the backup configuration is modified.TODO:
The USN journal records a limited amount of changes, and if backups are spaced too far apart, full scans are required as the data will be incomplete. This has the following implications: