-
Notifications
You must be signed in to change notification settings - Fork 13
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
File Sync not working #171
Comments
New info after I put logging to Verbose. I noticed that ion restart, the addon evaluates the 2400 files in the media folder on startup.
When it is done evaluating all files, it evaluates all backups. This process takes 20 minutes. Thanks again. |
I'm not sure I understand your comment about evaluating the Backup files. The File sync runs independently from the backups (unless you somehow have your backups stored in one of the File Sync directories). Could you share the relevant logs showing what you mean by evaluating the backup files, and something that takes 20 minutes? |
The once daily backup in the morning works fine. No issues there. The File Sync that runs 24 hours a day since there are no excluded times is the issue. The File Sync function runs through evaluating files continuously and it takes 20 minutes.
Any new file in the /media folder is not seen or uploaded during this 'Evaluating' phase. The uploads are delayed until the evaluation is completed. Once completed, the new files are uploaded. Then the process repeats.
Hope that makes sense. |
I caught the logs when the loop starts again. Hope this helps.
|
So I want to make sure I understand - From the logs I don't see anything misbehaving. |
I think that is the issue. The process to go over all the files takes over 20 minutes. Is there a way to look at modified dates? Thanks |
Yes but the only issue there is it assumes the files aren't manipulated on the OneDrive side. So for example if a file was changed / deleted in OneDrive and I'm skipping it locally because it wasn't modified since the last sync it will not be re-uploaded. I would need to think about the best way to approach this. I can also parallelize this check to improve performance. |
Could you check the last modified dates on both sides. I can't see a use case where a file would be modified (and the date stayed the same) on the Onedrive side. Save a lot of processing in not calculating hashes. I wish I could help propose code, but I haven't programmed in C# for 15 years. |
No.. modified date of the file when uploaded to OneDrive will be the timestamp it was uploaded not the original modified date of the file in Home Assistant.. |
Maybe I am completely wrong, but I can't picture a case where someone would modify a backup file on onedrive. Even if they did, would they want it overridden during the next sync. Could there be a setting to not check the hash and just check for the file's existence on onedrive? Thanks for your time and the program. |
Just a thought. If a new setting CheckHash is available, could a minor change to SyncFile() be made from:
to:
The reason this is a big issue for me is that I am using Frigate and it is generating many mp4 files from multiple cameras all day and it runs into GBs per day. Thanks for all your help. |
Hi, Appreciate the input. Few thoughts:
|
This issue is stale because it has been open for 30 days with no activity. |
Daily backups are working fine.
File Sync is not picking up on new files. If I restart the addon, the files upload to onedrive without error.
config:
Upon restart, the any new file is uploaded.
After restart, I created a new file in the same subdirectory (/media) as the file in the log. This file is called dr_06 2048.mp4
That file has not been uploaded and I waited over 10 minutes. The refreshed log has not changed.
Is the File Sync on a polling loop of > 10 minutes?
Is this a configuration issue?
Or something else?
Thanks for your help.
The text was updated successfully, but these errors were encountered: