Skip to content

Problems with backing up latest version of files #20

@dunkmann00

Description

@dunkmann00

In order for Drive Backup to be more efficient/faster, it doesn't download all of the files from Google Drive over the network each time a backup is ran. If a prior backup can be found, the files in it can be used to populate the new backup directory. The only thing that must be taken into consideration is whether the local file from the prior backup is the most recent version. If it is, then it can be either moved or copied into the new backup, if it isn't, then the new version must be downloaded from Google Drive.

In #18, it was observed that the correct decision wasn't being made as far as which version of a file is the latest version. It was discovered that this has to do with the modified time for the backed up files having been changed. When Drive Backup downloads or manipulates a file it always makes sure the modified time for the local version is the time that Google Drive has for the file. This is how it determines when to download a new version. Since something is modifying the file outside of Drive Backup, the time is not correct and an incorrect decision is being made. Even though there is a newer version of the file on Google Drive, it is not getting downloaded.

While it is unclear what is causing this file modification problem in the issue linked, it does raise the concern that using the filesystem's modified times is not a foolproof approach and could cause silent problems. In the linked issue this problem was caught because the user was not backing up a lot of files and checked the backup to make sure it worked the way it should. If you are backing up thousands of files it would be much easier to not catch this issue until it is too late to do something about it.

I'm not entirely sure what I think would be the best way to address this. I'm also not sure how common of an issue this actually is. I'll probably give this some thought and then either add any ideas/thoughts to this issue or open up a PR with a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions