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

Strengthen data preservation checks & update how bypass preservation is set #931

Merged
merged 3 commits into from
May 26, 2020

Conversation

abraunegg
Copy link
Owner

  • Strengthen bypass data preservation variable checks

* Strengthen bypass data preservation variable checks
* Add another warning message for locally modified files when performing --resync
@abraunegg
Copy link
Owner Author

abraunegg commented May 25, 2020

output when using --resync & locally modified file

./onedrive --confdir '~/.config/onedrive-personal/' --synchronize --verbose --resync
Using Config Dir: /home/alex/.config/onedrive-personal/
Configuration file successfully loaded
Deleting the saved status ...
Initializing the OneDrive API ...
Opening the item database ...
All operations will be performed in: /home/alex/OneDrivePersonal
Application version: v2.4.1-14-gf9c3ccc
Account Type: personal
Default Drive ID: 66d53be8a5056eca
Default Root ID: 66D53BE8A5056ECA!101
Remaining Free Space: 5368706448
Fetching details for OneDrive Root
OneDrive Root does not exist in the database. We need to add it.
Added OneDrive Root to the local database
Initializing the Synchronization Engine ...
Syncing changes from OneDrive ...
Applying changes of Path ID: 66D53BE8A5056ECA!101
Processing 6 OneDrive items to ensure consistent local state
The local item has a different modified time 2020-May-25 21:30:55Z remote is 2020-May-25 21:26:19Z
The local item has a different hash
Local item does not exist in local database - replacing with file from OneDrive - failed download?
The local item is out-of-sync with OneDrive, renaming to preserve existing file and prevent data loss due to --resync: corona_information -> corona_information-centos7full
Downloading file corona_information ... done.
Number of items from OneDrive to process: 1
Uploading differences of .
Processing root
The directory has not changed
Processing random_videos
The directory has not changed
Processing random_images
The directory has not changed
Processing random_files
The directory has not changed
Processing corona_information
The file has not changed
Uploading new items of .
Uploading new file ./corona_information-centos7full ... done.
Remaining free space on OneDrive: 5368703756
Applying changes of Path ID: 66D53BE8A5056ECA!101
Number of items from OneDrive to process: 2

* If a file is modified locally, and '--resync' is used, there is no way to tell if this file is a failed download or 'valid' thus potentially lead to a data loss scenario. In this case, and ONLY if --resync was issued, rename the local file for data preservation
@abraunegg abraunegg changed the title Strengthen bypass data preservation variable checks Strengthen data preservation checks & update how bypass preservation is set May 25, 2020
@abraunegg
Copy link
Owner Author

@norbusan
Not that I was able to trigger the issue as per #930 - however the code was trying to do a 'string' query rather than a 'bool' query which is now fixed. Also found an 'edge' case that makes sense which is now fixed - where if --resync is issued, and local file is 'newer' we should rename that file rather than have it overwritten just in case.

@abraunegg abraunegg requested a review from norbusan May 25, 2020 22:30
@abraunegg abraunegg added this to the v2.4.2 milestone May 25, 2020
@abraunegg abraunegg merged commit aee2052 into master May 26, 2020
@abraunegg abraunegg deleted the Issue-#930 branch May 26, 2020 07:04
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Giving up on sync after three attempts: Missing config value: bypass_data_preservation
2 participants