lra / mackup

Keep your application settings in sync (OS X/Linux)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Symlinks break after Dropbox update

pelmered opened this issue · comments

I just updated Dropbox to the new beta where they move the Dropbox folder to it's own Volume (this is for compatibility with MacOS 12.2.1+).
This caused all the symlinks to break.

The new path to the Dropbox folder is: /Users/<username>/Library/CloudStorage/Dropbox/

How can I fix this? I guess some kind of migration script would be good before this gets into the stable version of Dropbox.

For now, I recommend running the following steps:

  1. Backup all your mackup files!
  2. Run mackup uninstall to revert all your files (from the old Dropbox backup)3.
  3. Create a custom mackup storage config file ~/.mackup.cfg pointing to the new Dropbox folder.
[storage]
engine = file_system
path = Library/CloudStorage/Dropbox
directory = Mackup
  1. Run mackup backup to sync with the new folder (or mackup restore if all of your files are in the Dropbox folder).

Hope that helps. We'll have to plan for Dropbox's change to its folder position for storage, thanks for the heads up!

My Dropbox beta created a symlink from ~/Dropbox to /Users/<username>/Library/CloudStorage/Dropbox, and then I got a few requests from macked-up apps to access files inside that folder. Does this mean that mackup continues to work through this double-symlink setup? Do I still need to run the steps mentioned above?

Thanks @joshmedeski ! For me the correct cfg file was

[storage]
engine = file_system
path = Library/CloudStorage
directory = Dropbox/Mackup

I am sorry but the mackup uninstall not remove the symlinks like described. I created the cfg and tried to backup but the symlinks are not recreated to the new CloudStorage Folder. Any ideas how to remove or change all symlinks from the old DropBox location?

It's odd that mackup uninstall didn't work for you. Can you give us more details as to what happens when you run it?

It's odd that mackup uninstall didn't work for you. Can you give us more details as to what happens when you run it?

You need to stop all instance of iTerm2 first. Closing the window is not enough. Then after several tries suddenly the uninstall process runs without an error. But i used Warp as Terminal so that the command runs outside of an iTerm2 session

So if you change/upgrade the Dropbox app under MACOSX you have to uninstall mackup BEFORE. Otherwise the symbol links in all directories can't restored to the original state. It tries every time to find the files at the old linked pathes. It is a fuc... hand job to manually fix all the pathes. Still any apps like Cleanshot or TablePlus can't save new prefrenences even if the mackup ist installed and setup new to the new Dropbox Folder.

Still any apps like Cleanshot or TablePlus can't save new prefrenences even if the mackup ist installed and setup new to the new Dropbox Folder.

Same happened to me, I ended up removing all mackup-generated symlinks from ~/Library/Preferences and manually restoring the config to my programs, and now Tableplus and others correctly keep the settings. I will try a mackup backup in the future to see if something breaks

@Pimentoso you may want to try the workaround i found to work in #1890 - its probably not ideal but it might be enough - tricky given that the issue isn't technically in mackup's area of control

I am not in the Dropbox beta program. It seems like this change is now in the latest Dropbox update. I'm seeing similar errors to what others were mentioning previously. /Users/<username>/Library/CloudStorage/Dropbox/ is the new storage location.

Is @joshmedeski's comment on Sep 6 still a valid workaround?

It should still work, it's just explicitly setting the path to the Dropbox folder until we figure out how to create a permanent fix for everyone.

I created a discussion for coming up with a migration process for Dropbox users:
#1894

@joshmedeski I wanted to clarify that during the Dropbox upgrade, all the files and folders that were previously in ~/Dropbox have moved to /Users//Library/CloudStorage/Dropbox. Others mentioned on Nov 1 & 2 that mackup uninstall would not work because everything already moved. Is that true or do you think it will still work?

Thanks again for the help

@erickinsella I believe you are going to run into issues when running mackup uninstall if the original folder has moved.

@joshmedeski After taking a closer look I think I'm seeing the behavior described in 1890

shell or other command line based utilities appear to be OK, it does appear to be limited to "GUI" apps at a first glance

As andrewmy describes above, my Dropbox update also created the same symlink from ~/Dropbox to the new location.

My Dropbox beta created a symlink from ~/Dropbox to /Users//Library/CloudStorage/Dropbox, and then I got a few requests from macked-up apps to access files inside that folder

It appears some have tried the following:

Granting cfprefsd Full Disk Access allows apps to save preferences again, the symlinks are then replaced with regular files though as in #1854. But it doesn't keep them as symlinks in ~/Library/Preferences/ it reverts them to regular files.

Do you think this seems like a good workaround? Thanks again for the advice. Just trying to get unstuck.

@joshmedeski Trying the workaround in #1854 did not work for me. As you mentioned since the folder has already moved is my only choice to move back all my mackup-ed files manually?

I added some notes to #1894 to what I encountered during the dropbox upgrade process. I hope it's helpful.

For now, I recommend running the following steps:

  1. Backup all your mackup files!
  2. Run mackup uninstall to revert all your files (from the old Dropbox backup)3.
  3. Create a custom mackup storage config file ~/.mackup.cfg pointing to the new Dropbox folder.
[storage]
engine = file_system
path = Library/CloudStorage
directory = Dropbox

@joshmedeski can you update your snippet to point to Dropbox/Mackup as that would be the default I think. Or Dropbox/${your mackup folder in dropbox}? Your current snippet would blindly create folders all over ones Dropbox folder, which is not intended imo, and your snippet seems to get shared on the internet.

Good point, I updated it to point to a Mackup folder.

For me, this happened when I added a work dropbox, so it renamed my personal Dropbox to Dropbox-Personal.
If you don't want to update your config, I updated my Dropbox symlink in my home directory and everything works again.

Before:

$ cd ~
$ ls -al

Dropbox -> /Users/bleivian/Library/CloudStorage/Dropbox

Update symlink:

$ cd ~
$ rm Dropbox (make sure this is the symlink)
$ ln -s /Users/bleivian/Library/CloudStorage/Dropbox-Personal Dropbox

After:

$ cd ~
$ ls -al

Dropbox -> /Users/bleivian/Library/CloudStorage/Dropbox-Personal

Update: Might have spoken too soon as there are other symlinks (ex: Docker)

config.json -> /Users/bleivian/Library/CloudStorage/Dropbox/Mackup/.docker/config.json
daemon.json -> /Users/bleivian/Library/CloudStorage/Dropbox/Mackup/.docker/daemon.json