Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emphasize DANGER ACTIONS! #1913

Open
xiazeyu opened this issue Mar 25, 2023 · 15 comments
Open

Emphasize DANGER ACTIONS! #1913

xiazeyu opened this issue Mar 25, 2023 · 15 comments

Comments

@xiazeyu
Copy link

xiazeyu commented Mar 25, 2023

Intro

This project fucked up my Mac.

Way to reproduce

I use iTerm2 on M2 Pro MacBook Pro.

I found the app from Homebrew, says “Keep your Mac's application settings in sync”, and the project itself sounds like “backup”. I thought it can backup my configurations to cloud, so I followed the procedure:

  • brew install mackup
  • mackup backup
  • Failed, as the configuration file is missing, so the destination is missing.
  • Setup configuration
  • mackup backup
  • Wait a while
  • Failed. Python Exception, FileExist , related to iTerm2.
  • Retried. Failed again.

Then, bad things happened. Cause I followed exactly what the README says, and it failed. And it keep saying file exist at …/Mobile Documents/iCloud File/Mackup. I thought maybe something is wrong, (#382)

Naturally, I thought the file in my iCloud is a duplication of my existing file. So I rm -rf them and uninstalled mackup. And apps starting to throw weird errors like file corrupt. (Later found that my original file becomes an invalid symbol link.

During that process, I restart my computer, and so many initial setup just popes up.

After a heavy diagnose, I located the problem here.

Request

I know creating symbol links are cool, but can you please

  • Add some caution to notify people not to delete files in the cloud. Maybe in the first page of README instead of hiding it in Bullsh*t, what does it really do to my files. That’s really bullsh*t.
  • Notify people this is DANGER to delete files in the cloud when setup. I never thought this Python script can be that powerful to ruin my configurations.
  • Ask if to execute mackup uninstall when exception happens. Instead of just let Python throw exceptions, you can recover the state!
  • Ask if to execute mackup uninstall when uninstall. AFAIK, executing a command in homebrew is possible.

First Aid

Is there any log mechanism to let me see what exact files are still invalid symbol links?

Is there any log to see what applications are being mackup?

@xiazeyu xiazeyu changed the title Emphasis the danger! Emphasize DANGER ACTIONS! Mar 25, 2023
@joshmedeski
Copy link
Contributor

All helpful ideas @xiazeyu. Can you make a pull request on README.md with your suggestions? We'll want to make sure the language is friendly and concise. But I do agree that we could improve communicating the issues around deleting files and recommendations if anything goes wrong during the process.

@eclecticpassions
Copy link

eclecticpassions commented Mar 29, 2023

I am a newbie at using these types of terminal / command line apps and I'm quite worried about ruining my setup like @xiazeyu. Edit: I'm on Mac OS 10.15.7, Catalina.

I just want a backup of my app configs as I am getting a new mac soon. I think I have correctly configured a cfg file by typing vi ~/.mackup.cfg into terminal, then pasting this:
[storage] engine = file_system path = /Users/username/Documents/Mackup Then I exited by pressing esc + shift + ZZ.
Should I type mackup backup next?
And when I get my new computer, do I put all the folder from the mackup backup in the exact same location and type mackup restore?
Then what is the use of mackup uninstall? Sorry for the noob questions. I couldn't find answers in the discussions. Thanks so much!

@brandon-fryslie
Copy link

@eclecticpassions open a new issue, this is unrelated to the github issue. This application is dangerous for users who don't understand what they're doing.

@melalj
Copy link

melalj commented Oct 11, 2023

same issue here! since I updated to Mac OS Sonoma.
Settings for all apps are not persisted after the restart

@gmale
Copy link

gmale commented Feb 1, 2024

Strongly agree with the sentiments here. Conceptually, a user would expect a "backup to dropbox" to copy files there. Deleting local files and replacing them with symlinks is not only surprising, it introduces a non-zero risk of data loss. Ideally, a backup tool doesn't lose data.

It might be useful to follow the principle of least surprise here and make mackup backup just copy files whereas another command like mackup link follows the current behavior.

Alternatively, introducing an override that skips the delete and link steps might help.

mackup backup --safe

I'd be happy to write this if the maintainers feel it is helpful.

@Hammarang
Copy link

Strongly agree with the sentiments here. Conceptually, a user would expect a "backup to dropbox" to copy files there. Deleting local files and replacing them with symlinks is not only surprising, it introduces a non-zero risk of data loss. Ideally, a backup tool doesn't lose data.

It might be useful to follow the principle of least surprise here and make mackup backup just copy files whereas another command like mackup link follows the current behavior.

Alternatively, introducing an override that skips the delete and link steps might help.

mackup backup --safe

I'd be happy to write this if the maintainers feel it is helpful.

+1 on the suggestion above. This is what a backup should do.

@tylwright
Copy link

Agreed. This also destroyed my Mac's home dir. Thankfully, with a bit of rsync and Time Machine, I was able to recover. Backing up should never replace the source with a symlink or modify it in any way. I'm kinda shocked that this is the default behavior.

@ViaxCo
Copy link

ViaxCo commented Apr 25, 2024

I was wondering why my apps are misbehaving and this issue showed me what I did. After I got an error with iTerm2, I removed the backup with rm -rf and tried to do the backup again with the default Terminal app, which worked, but the original files were gone, and now my settings are not persisting in certain apps.
That's really messed up.

@maaraneasi
Copy link

maaraneasi commented May 17, 2024

I am on the same boat as those whose OS's were damaged by mackup.... Literally every application that has been symlinked to dropbox in order to be "backed up", now won't persist its data so basically reset on every startup.. This application is extremely dangerous to use in its default behaviour..... Now every time an app behaves weird, I need to check if mackup touched it and if so, I need to go through the exercise of unlinking the symlink and moving the data back manually....

@xiazeyu
Copy link
Author

xiazeyu commented May 17, 2024

Try sudo find ~/ -type l ! -exec [ -e {} ] \; -print to find broken symbolic links in macOS? - Ask Different.

I've done that once and that is helpful to let me know what is broken. But I've chosen to reinstall the system at last anyway.

@maaraneasi
Copy link

@xiazeyu I already uninstalled to get rid of mackup so I can't try... If nothing else, it was able to revert all the damage it has done....

@silveiralexf
Copy link

yeah... just removed the mackup folder while trying to recreate it with a different type of storage, only to find out I removed a ton of my configuration files due to links and changes to my system that were not clear...

the idea for mackup is great, but accidentally deleting your stuff while trying to take a backup is kind of a major turn-down :-(

@xiazeyu
Copy link
Author

xiazeyu commented May 28, 2024

working on it right now, trying to solve this, to some extent.

xiazeyu added a commit to xiazeyu/mackup that referenced this issue May 30, 2024
xiazeyu added a commit to xiazeyu/mackup that referenced this issue May 30, 2024
@xiazeyu
Copy link
Author

xiazeyu commented May 30, 2024

Opened a PR in #2028, but not sure if this program is still maintained, and will be versioned and published for it.

@joshmedeski Have a look :)

@joshmedeski
Copy link
Contributor

I'll leave it to @lra to provide feedback, I'm no longer involved in this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests