Renaming folders on Linux

I just uploaded a ~300GB folder by copying it my Drive’s local folder.
Besides the fact that it took almost a full day just to parse and upload the folder structure and an extra 2.5 days to upload the rest which seems way too long, I had to rename the top level folder I had just uploaded, I did so in my file system.

I’m using Insync 1.3.12 on Ubuntu 14.04 and the app indicator icon just went in sync mode but nothing is going on. If I look at my Drive using a browser the folder has now disappeared from my Drive and all its files have been moved to Trash by Insync (it took ~1.5 hours just to delete). In the trash I see the folder with the old name, but in my Drive the new one hasn’t arrived yet.
(Thinking I could stop the command I restored the trashed folder with the old name from the web interface but no files were inside, I Ctrl+Zed my way out of that and it doesen’t seem to have started a whole new 3.5 day thread yet)

The only reason it could be taking so long I imagine, is that Insync, for some reason, deletes the files from Drive and re-uploads them to a folder with the new name. Which does not make sense to me since https://developers.google.com/drive/v2/reference/files/patch

Questions:
Where are my files?
Do I have to wait for 3.5 days before I use / can share my files with my team because it’s re-uploading everything?
(Although this started at 10:03AM and it’s now noon and sync indicator is still on but nothing seems to be happening)
If this is normal behavior do you think it’s reasonable?
If it’s not normal behavior what went wrong?

Would Insync do the inverse as well if I rename a folder in the web interface?, i.e. Would it re-download the whole folder and trash the original one in the local file system?

UPDATE: I tested on the same version of Insync in an Ubuntu 16.04 same user and rename seems to be properly implemented, I don’t understand…
UPDATE2: Scratch that, I cannot see indications of renaming of folders on web activity pane, only of files, but this is true for renaming from web OR local FS… I can see Insync indication of both folder and file name change though.
For what I understand a Folder is just a file with no extension so it should have a folder.title that can be patched using the link of the REST API v2/3 I mentioned earlier…
UPDATE3: I restored in the web interface the folder with the old name, renamed it with insync paused, once it was done (note: it takes a long time from the web interface also to modify stuff on a large folder) I released the kraken, I mean, I released the pausing of the sync, and allowed insync to rescan and check each file of the pretty large and intrincated tree struct. It took some time but way less than the whole re-upload thing.

CONCLUSION: If enough time passes the problem solves itself… Although I don’t think its a viable support policy for a tech company, there is really no excuse not to have this documented somewhere and easily accessible to users (which in this case are actually paying costumers).

Tagging our engineer @lpugoy and he will get back to you.

@Niccolo_Bonacchi: Apologies for not replying sooner. Please send your logs to support@insynchq.com for investigation: How to find the log files. It is not normal behavior though to delete a folder and re-upload or re-download it when it is renamed. Hopefully I can find some clues in the logs to what happened.

Had a similar - and terrible! - experience. Why do a simple renaming mess with everything?

In my case I actually swapped names of two folders, and decided that it didn’t make sense and swapped back. So I made A -> tmp, B -> A, tmp -> B; and later its reverse. It is pretty annoying.

Hi! If you haven’t, kindly send your log files to support@insynchq.com with the link to this post. Our engineer will take a look at it so we can prevent this from happening again. Sorry for the trouble! :frowning:

It is 2019 and this is still happening and there are several open and unsolved related issues.


I just lost a lot of data because of a similar problem…

Hi @Francio_Rodrigues

I’m really sorry for all the hassle and disruption that the data loss due that occurred due to this bug.

Please be assured that we’re on top of this. My colleague @miamoran has already replied to your email and will be communicating with you regarding this issue.

I am facing the issue today. Renamed a folder with my data and now it is neither in my local machine and google drive web version is also not showing the data.

HELP!!!

Hi @mechaprabal,

Can you let me know more about this? Were the files on My Drive or Team Drives?

In addition, can you let me know what OS ad Insync version you’re on?

Please send us an email over at support@insynchq.com

This is still happening on Ubuntu 18.04.5 LTS with insync 3.4.0.40973 in 2021.

This is very annoying. This should be mentioned upfront that renaming of directories will mess up the entire sync before trying to sell this software to people.

Hi @Vikash,

Renaming folders within the Insync setup should be picked up by the app - meaning: if you rename a folder locally, Insync syncs those changes to the cloud (and vice versa).

Could you please provide us with details on what happened through email? You can send the step-by-step to support@insynchq.com with the link to this post.

Please also attach your logs.db and out.txt files which can be found in ~/.config/Insync.

Is this case (renaming the TOP directory) still an issue currently (November 2021)? I want to rename my google drive top dir locally in Ubuntu Nautilus but my previous experience prevents me from doing so. I got deleted files in the past.
If so, how to do this via the insync app?

Hi @bagus,

Thank you for reaching out. Did you mean renaming the Base Folder (sync location) or renaming a synced parent folder within your Google Drive directory?

This terminology makes me confused. I think it should be “parent folder”, but after checking it by trying to add an account, it is “base folder”. So, what I meant is “base folder”. Is it safe to rename the base folder from Nautilus in Ubuntu?

@bagus Thank you for clarifying it for me!

I successfully renamed the Base Folder (ie sync location) via file manager but on a Windows 10 machine. I sought help from our Linux team to replicate the steps using Nautilus and I am waiting for their feedback :slight_smile: I’ll update you as soon as possible!

Hi @bagus! Looks like a possible Linux limitation; our engineer has confirmed that renaming the base folder resulted in a “base folder is missing” error. We are investigating this further, so I would suggest holding off on this step on your end to avoid any trouble!

1 Like

Any progress so far? waiting for a solution or update to rename the base folder in Linux without a problem.

Hi @bagus, thank you for following up!

Right now, we’re still investigating a more permanent fix when renaming base folders on Linux.

In the meantime, a suggested workaround would be to create an empty folder with that preferred name. For example, if your current Base Folder is “My Drive” and you want it to be “Google Drive files”, create an empty folder named “Google Drive files”.

In the app, use the “Change” feature to move your Base Folder from ~/My Drive to ~/Google Drive files. During this process, do not remove any files from the original folder.

Once Insync moves the files to the new location, the old folder gets automatically deleted. While this isn’t the ideal (since it involves more steps), it would prevent unwanted data loss or “base folder missing” prompts. Let me know your thoughts :slight_smile: