How to sync after a crash

I had a major crash of D drive on my PC where my odrive folder was located. Fortunately I have a backup of files and folders on external drive so I copied that back to the odrive folder. But some of these files and folders are older than the ones in the Google Drive with which odrive was syncing. How do I make sure that:

  1. The older files and folders from external drive will not overwrite the newer on Google Drive?
  2. The missing files that are on Google Drive and not on external drive will be downloaded/copied to odrive?
    Thanks

Hi @mr108,
1. odrive’s behavior assumes that anything you put into the local odrive folder that differs from the remote data will be uploaded, even if the file is older. That means that if there are files that are older they will be uploaded.

2. When you setup a “sync to odrive” folder, the local and remote are “merged”. This means:

  • If the files on local and remote are the same, they are marked as “synced”, without any transfer needed.
  • If the files on remote do not exist on local, they will show-up as placeholder files, that can then be downloaded.
  • If the files on the local do not exist on the remote, they will be uploaded.
  • It the files on the local differ from the remote, they will be uploaded.

In your case, the files being older on local is the real concern. There isn’t a way to odrive to prevent local file upload in this scenario.

The two options I see:
1. (Easier, but time-consuming) - Since all of the data on the remote should be there, having been synced before the drive crashed, you can just download it from remote to local and skip using the local backup. This will be time consuming, of course.

2. (More Complex) - Create the “sync to odrive” folder with an empty local folder and expand all placeholder folders inside without downloading any files. This will create all of the files as placeholders with the remote timestamps. You could then create a script that compares the placeholder file dates with the local file dates in your backup and determine if the files are newer, older, or the same.

1 Like

One suggestion: following option 2, you can then use the open source WinMerge app to compare the content of the two folders and select the newer files. The Folder compare feature does exactly what you need, and you don’t have to make a script of your own.

2 Likes

Something to keep in mind is that you will be comparing “real” files with placeholder files, so the contents will be different, even if they are the same file.

I don’t recall if you can tweak WinMerge to compare just dates/sizes and ignoring the contents. If you can then this could definitely work.

Oh yeah, I was thinking about something less elaborate. Like, you download the whole folder from Google Drive, then use Winmerge to compare that with the existing backup.

1 Like