Tuesday, July 23, 2013

How to REALLY move your Google Drive folder WITHOUT re-syncing or "not your original Google Drive" error

I've read article after article which was just a copy/paste of the flawed (read... BROKEN) directions provided by Google on how to "Move your Google Drive Folder".

THEY DON'T WORK (unless you're one of very few lucky people in which case you should go grab some lottery tickets).

If you follow the directions, you'll get an error about the new folder not being the original. Umm, isn't that the point of MOVING your folder? By definition, the new one isn't the old one even if it has all the same contents.

The problem and solution both lie in 2 files which you will find in the folder %userprofile%\AppData\Local\Google\Drive (for Windows anyway, not sure about other operating systems though I suspect the file names will match).


Those files are:

  • snapshot.db
  • sync_config.db

I can't give detailed instructions because the "fix" required hex editing these files and those directions will vary a bit but I use UEStudio (fantastic text/hex editor with syntax highlighting) and it has an ASCII find/replace option which I used to change my old path to the new.

The entire process was:
  1. Stop Google Drive Sync (right-click and Quit)
  2. Move the entire Google Drive folder (default is in Documents and Settings)
  3. Open each of the two files and do a find/replace from the old path to the new.
  4. Start Google Drive
  5. Be done (NO SYNC REQUIRED)
Why Google refuses to provide the action in the GUI after something like a year is beyond me and clearly isn't not difficult (sure, I may possess above average intelligence...) but this took me all of 5 minutes to accomplish once I had been enlightened to the AppData files for Drive (by another rather crude if not erroneous article).

I really do hope this will help a significant number of people out there. If it helps you, PLEASE share this article using the following link and do it on all the Google Drive support boards so that others can find it and Google will see it also.

http://goo.gl/q9Ehgr <-- Share this article using this link please so I can do tracking to show Google

Related: Recent issue I had, Google wouldn't resolve and I figured out myself. "Google Drive Failure Comes to a Head ... Read More"

UPDATE 2014-04-07: After researching other sync-app solutions, I've discovered one that seems to address the 3 most significant issues I've had with every other sync solution out there.
  1. Not having to re-download files that are already up-to-date (or at least REALLY close)
  2. Syncing folders that don't exist in the "Google Drive" folder OR syncing all the folders you want and NOT the ones you don't.
  3. Moving your "Google Drive" root folder (less significant in light of points #1 and #2) without having to redownload everything.
I've tried a good number of solutions and am on the verge of developing my own anyway because I think I can still make a more responsive and efficient client with plenty of options, but in the meantime, for my own purposes I am using SyncDocs. I have more than 140,000 files and roughly 70GB to manage right now (growing daily) for business purposes so Google Drive Sync didn't work for me. For starters it is a 32bit client and crashes during initial sync (or random re-downloads). This is a confirmed issue from a senior engineer on the Drive team that I've been in touch with.

If you're interested in a premium client that has real flexibility, a good UI, will allow you to seed with existing files, is fast, and efficient at syncing, please comment below. I'm considering a Kickstarter project to help make a final determination of whether I should move forward and how aggressively I should do so. If I move forward, I will be doing a proper beta program (REAL beta meaning I will actively engage to collect feedback, correct issues, update the client, etc..), provide multiple levels of backing which will dictate the level of support beyond beta, featureset, licensing (if I don't go perpetual), etc..

I will also use surveys to get a feel for what is most wanted, needed and what people might be interested in paying for.

Comment below to let me know your thoughts and interest.

UPDATE 2017-04-06: It's been nearly 4 years since my original post, 3 since my last update, and almost 1 since this topic was an issue for me. Somewhere along the way the Drive Sync client was given a registry-controlled feature to help the Sync client recognize existing files rather than ONLY recognizing files synced by the Drive Sync client. In recent history (I'm not sure, but I'd estimate 3 months ago) that feature has been turned on by default so now (in theory), you should just be able to point the client at a folder during setup, and it will merge the contents with Drive, identifying existing files when it's reasonable rather than creating duplicates.

tl;dr: This shouldn't be an issue anymore if you're on a current sync client and Google auto-updates them so you should be.

33 comments :

Scott said...

You can easily edit with the sqlite extension for Firefox...No need to hex edit.

Michael-Rainabba Richardson said...

Thanks for the tip. I'm sure many people would find that much easier.

Michael-Rainabba Richardson said...

That tool can be found at: https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/

Darren Miller said...

Scott or Michael - could you please give some simple step by step instructions on how to use SQLite to achieve the remapping. I, like hundreds of others, am currently experiencing the dreaded "not the original google drive folder" error and am hoping your solution will work. Looking forward to your further help on this ...

lilo said...

I wasn't able to edit the database. Opening snapshot.db with sqlite I found only one record with the current path and even though I changed nothing happened. In sync_config.db I couldn't find anything.
I'm sure I'm doing something wrong as I really have no idea how to edit a DB properly, and what I managed to do was just trying to follow the logic.

Where could I get a step to step guide on how to make this change? Thanks.

lilo said...

I also tried with the trial version of UEStudio and its ASCII find&replace tool. After managing to edit both files I got an sync error from GDrive though :(
I really wish there was a more complete guide for this, cause it's really a very useful piece of information you shared.

lilo said...

what happened to the comments here? This article could be such a unique resource in the internet but it still so incomplete if you don't know what to do. A feedback from the author would be much appreciated. Thanks.

Michael-Rainabba Richardson said...

I'm sorry but as with the Drive issue itself, Google has failed miserably by suggesting I convert to G+ comments then hiding all comments when I did. If anyone knows how to get comments to show again here (There are 7 before this one), please comment and let me know. I do see the comments and have been publishing, they just aren't showing.

lilo said...

I see them now :)
Any help on the issue though?

Paul Schwegler said...

I used UEStudio to search and replace file location strings (C:\Users\myusername\ to D:\). There were only a few instances in each db file, I thought that strange...and now google dive just crashes when starting...any ideas?

Jessica said...

+Michael I see all 8 comments. Are you able to give a more detailed instruction for Darren or Lilo?

Michael-Rainabba Richardson said...

Hopefully comments are showing up again. I tried switching to G+ comments and they all disappeared. I tried switching back and saw no change that day, but today I'm seeing them all AND it's still using G+ comments. I will see about adding some directions regarding SQLite but to be honest, I've just about abandoned Drive despite more than a year of integration and effort for my business. I had a production server with a share (just one of the shares) that is 40+GB just stop syncing with a "please disconnect your account" message and after more than 3 weeks in communication with Google "enterprise support", I've not made it any further than a Microsoft style, "format and reinstall" solution that would cause me to lose all data changes to the share since the last sync. How Google thinks that is acceptable is beyond me but I need reliability and apparently Google Drive just isn't there yet despite the claim of being an enterprise service. At one point, the Google rep actually told me this was a "known bug when syncing a large amount of files" and our files are easily 2MB+ with a total of 40GB. I can't imagine what would happen if someone actually paid the $800/mo for 16TB and started trying to use that with smaller files.

Brad Wood said...

Unfortunately, the UEStudio approach didn't work for me. It corrupted the database and Google Drive would not start with no messages in the logs. I also tried directly updating the SQLite databases with a SQLite client, but Google Drive still told me it couldn't find my folder even though the correct folder name showed up in the sync logs. I went through each column in each table of both databases, but only found the old path once in the config database. UEStudio showed more instance, but I don't know where they were since I couldn't find them in any tables. After wasting about 45 minutes on this, I just blew the folder away and re-downloaded as I only had about 300 MBs of data. I feel sorry for people trying to reconnect 40 or 50GBs of data!

Nhuy said...

I've been able to get Google Drive to find my original folder using sqlite-manager.

My error log:
====
2014-04-02 20:59:03,395 -0500 ERROR pid=3280 3320:LaunchThreads logging:1575 Root inode has changed. Old inode = 1970324837464218, new inode = 1407374883990330
2014-04-02 20:59:03,397 -0500 ERROR pid=3280 3320:LaunchThreads common.sync_app:1217 root folder missing or invalid.
===

After reading this post here and this post: http://bitforensics.blogspot.com/2012/12/google-drive-artifacts-explained.html

I open snapshot.db using SQlite manager
Then change snapshot.db >> mapping >> inode_number and
snapshot.db >> cloud_relations >> local_entry >> inode_number to the New Inode number in the log file. And voila, Google Drive sync again.

Try it if it works for you.

Michael-Rainabba Richardson said...

For anyone following this post, I've updated it. #googledrive

Jennifer Harlan said...

I would be interested in a kick start client if it also worked on Mac os.

Bill. said...

+1 for kickstart... Especially if multiple google accounts were in the offing. I'm about ready to give up on Google for cloud storage over the multiple user issue, as the university I attend uses Google for email/drive/etc., and I have a personal google account, but cannot sync both on the same system.

Roark Crawford said...

To relocate the Storage location WITHOUT having to re-sync from the web.
I googled and found 2 sites that allowed me to figure all this out. With these instructions it should not take you longer than 30 minutes.

Most the credit goes to these guys:
http://rainabba.blogspot.com/2013/07/how-to-really-move-your-google-drive.html
http://bitforensics.blogspot.com/2012/12/google-drive-artifacts-explained.html
http://www.blogger.com/profile/17499172888226675034 (He commented aboveabout the info in the second blog and gave a vague idea of what he did, back in April!)

Tip (this can make a HUGE difference in how long this takes you):
Try to have as few items in the root of the Google drive storage as possible. Each object in the main google drive (each file and each folder) will represent a field in a DB later and that field will need to be updated with a number to identify the new Google Drive folder.
(I was moving from the default drive sync folder on C:\user\username\etc to a folder on my F:Drive that just looks like F:\Google Drive)

Generally what you will be doing:
1.You will be moving everything from the old Google Drive folder to the new Google Drive folder

2. You will be deleting the old google drive folder

3. You will need to load an editor for SQLite DBs - SQLLite plugin for Firefox is by far the easiest and most basic-user accessible

4. You will edit the DBs in 2 stages
i. Changing the plain text location as listed in a field in the sys_config.db database from the old Google Drive folder location to the new Google Drive folder location (Basically when Google Drive reads the config, you are telling it where the sync folder is)
ii. Changing the inode_number for all the references to the old root folder to new inode_number that identifies a folder (Google uses the inode_number as an address or identifier for each folder. You are literally deleting everyplace the old folder address/identifier appears and replacing it with the new folder's address/identifier.)

5. You will need to launch Google drive after changing the plain text file location in the DB. It will fail, we need it to fail to get info from the logs about the new folder's inode_number

6 You identify the new folder's inode_number by opening the sync_log.log log file at %userprofile%\AppData\Local\Google\Drive after Google drive has failed to launch due to the plain text change made in the SQLite editor in the sys_config.db

7. Once you have the old inode_number of the old root folder (the original google drive folder) and the inode_number of the new root folder (your new home for the Google Drive folder), it is truly only a matter of finding all the appearances of the old inode_number and replacing them with the new inode_number in the snapshot.db

Camilo Buitrago-Hernández said...

Just tried it and it worked on a Mac after restoring all my hard drive from Time Machine. Thank you very much to everyone in this thread. I have a 340 GB folder. I don't even want to think what downloading it from scratch would have been. The steps I followed:

1. Using your Mac's TextEditor app, open the file sync_log.log located in the path directory Users/YourName/Library/Application Support/Google/Drive/ and look for a text string similar to Old inode = 56798083, new inode = 611793. The numbers in your machine will be different and may be longer or shorter. Write them down and close TextEditor.
In order to access the Library folder in your Mac, in the Go menu of Finder press the option key and click on the Library option it appears.

2. Download Firefox and install it (in case you don’t have it already).

3. Download SQlite manager, a Firefox extension, and install it (you can skip this step if you have some experience dealing with SQL editors. I had not, so this extension is the easiest choice). You can access the extension from the Tools menu in Firefox.

4. Using SQlite manager, open the sync_config.db file located in the path directory Users/YourName/Library/Application Support/Google/Drive/.

4.1 There is only one table in this database. Look for the local sync root path field and change it to the actual path directory of the folder containing your files and folders synced to Google Drive.
4.2 Ignore any error message SQlite manager shows about the data not changing or any other inconsistency.
Close the file sync_config.db in SQlite manager.

5. Using SQlite manager, open the snapshot.db file located in the path directory Users/YourName/Library/Application Support/Google/Drive/.

5.1 There is are six tables in this database. Only two of them must be manipulated.
5.2 First, open the local_entry table and search for the name of your old folder containing the data synced to Google Drive. Change it to the actual path directory you entered in step 4. Again, ignore any error message SQlite manager shows about the data not changing or any other inconsistency.
5.3 Second, open the mapping table, search for the old inode number you detected in step 1 and replace it with the new inode number you got in that same step. Ignore any error message SQlite manager shows about the data not changing or any other inconsistency.
5.4 Close the file snapshot.db in SQlite manager.

6. Run Google Drive app again and voila: It starts to sync as usual.

It is amazing Google has not been able to fix this issue after years of complains from users. Honestly, the only reason I am not switching to Dropbox is because I don't want to spend a lifetime uploading all my files again.

pmartensen said...

Camilo, I tried using your directions. I'm using SQLite Manager in FireFox, but I can't find the "local sync root path" field in the sync_config.db file or the name of the old folder in the snapshot.db file. Can you be more specific about how to find these?

Camilo Buitrago-Hernández said...

@pmartensen I found it through a simple search using the "Find" menu option. I posted a more nuanced description of the process I used in a Google forum: https://productforums.google.com/d/msg/drive/KyzWVscb7iE/Iqfb-wSifywJ

Good luck and be patient.

Philip Collins said...

Many thanks for this blog tip. Can't believe Google haven't automated this yet. I used Notepad++ with the Hex plugin to do the edit. Worked well!

Sławomir Skałecki said...

Believe me ppl! There's no need to do such things you do. Here's what i do ...
1. Install google drive.
2. login and point a directory and it starts syncing , but first it doesn't download content but a list of files.
3. When syncing filelist is complete it starts synchonizing content of files. Then i click pause.
4. Now I copy files from my archive (previous google drive directory) to a new GD dir.
5. When finished - click continue and GD starts to synchronize once more but.. it does not download but rather checks
file list with copied content. It works much faster and do not copy any big content from cloud.

greets!
skala

Dolce Gan said...

Sławomir Skałecki, your method worked! Thanks! Google Drives seems to recalculate the no. of files to sync. The total files to sync was reduced.
This gave me the confidence to copy the remainder of my old 7.78GB Google Drive folder.

My exact steps:
1. Disconnect my account in the preferences.
2. Rename my old folder to "Google Drive old" (keeps the original copy)
3. Create new folder named "Google Drive" at new hard disk location. (must be empty)
4. Sign In to Google Drive, go to Advanced and select your new Google Drive location. (use back "Google Drive" name for familiarity)
5. Do step 3 as mentioned above by Sławomir Skałecki. (pause right after your first recognisable file is being synced. Click on the Gdrive icon to view progress)
6. Copy all contents from the old folder to the new folder. Merge / replace / skip any of your files / folders Google Drive has initially copied in step 5. (I tend to overwrite them in case the pausing caused any files to be incomplete)
7. Watch as the Gdrive total no. of files to sync drops! Any other files not copied will be synced anyway too.

There you go! :)

You still need to copy your files in this mode but it should be much faster than re-downloading it.

Willjo said...

Hi All, Many thanks for the excellent information here!! Very helpful!

I have a question that is related to this issue regarding seeding. I have a small corporate environment and we have recently adopted the Google Apps for work platform. I am trying to roll out the Google drive folder sync app to users (about 12). The company data is owned and shared by me,.. initially I used a small "test set" of data - about 500MB - after installing the Google drive app on each client the "company data" folder downloaded and synced correctly - all good. Now I want to add the full set of data (about 17GB worth). At the moment it appears as if EACH client will go about downloading the full 17GB worth of data ( so 12 x 17GB data!!!). Is there a way for me to seed each client with the 17GB of data first and then have Google drive carry on as normal...? Specifically I want to take a portable USB drive to each client and copy a folder with 17GB of data into their Google drive folder (which is obviously identical to the master copy on my Google drive folder which I have now uploaded and shared with them).

re: the kickstarter project - I think any tool that made the job of moving and seeding Google drive would be a SMASH hit!! I wish I had the skill to code this - I think you would make a lot of money!!

Many thanks for any/all help & suggestions!!

All the best

Rob Nicholson said...

I think Google Drive has been updated since these posts and now seems to have a "compare" function. To move the folder I basically did this:

1. Disconnected my account from Google Drive
2. Moved the files from old to new location
3. Signed into Google Drive again and specified the new folder location under advanced settings

Google Drive went into a "Comparing" mode which finished as I was typing this post - 5,007 files and 8.02GB.

I'm guessing it was doing some kind of checksum with the files so that it only had to synchronise any files that really had changed. MD5 checksum maybe...

Thank goodness as I'm an experienced database programmer and the idea of editing the tables was going to be a fiddly and error prone operation :-)

That said, on my 100Mbit/s home link, 8.02GB wouldn't have taken that long to download.

Cheers, Rob.

Unknown said...

Resurrecting this thread. Just did a Win 10 install and am getting the message that my google drive folder is missing. It isn't, it's in exactly the same place it was before I updated to Win 10. I found a website with a solution that fixed my problem. Perhaps it will be of use to you. https://productforums.google.com/forum/#!topic/drive/R7Kf27mOVus

REGISCRUZBR said...

@Dolce Gan

Thanks, worked for me!!!
Great tip.

Chris Martin said...

@Rob Nicholson Thanks for the update. They have made it much easier now to sync to the new location of Google Drive.

dik said...

Looks like Google have improved their software. At any rate I moved my drive folder to another volume on the same disk very easily as follows:-
> sync current folder
> quit Google Drive
> move folder to new location. I also renamed it.
> start Google Drive
> A balloon briefly appears complaining that your Google Drive folder is missing.
> Once this balloon has disappeared click on the Google Drive icon in the Notifications area.
> Then click on the text "Error - Google Drive folder is missing".
> Press the "Locate..." button in the window which pops up and browse to the new location of your folder

I did this for several (family) users and each worked without any glitches. So I'm off now to buy those lottery tickets.

Unknown said...

It's true!... like dik said, seams like google fix it... at last!
I followed the dik's steps and worked without any problems.
I think that we all here must be gratefull with Rainabba and people like him that took the work of investigate and complaint google with solid arguments to give a solution for this problem to be solved trhee years later!
Cheers from Argentina :-)

zaphox said...

Another vote of approval for dik's solution... what a clever dik ;-) Thanks also to author of this article for all efforts.

Michael Richardson said...

I just updated this blog entry. In short, this should FINALLY be a non-issue with the latest drive sync client updates.

Post a Comment

Followers