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

Add option --copy-only #2012

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add option --copy-only #2012

wants to merge 4 commits into from

Conversation

dracorp
Copy link

@dracorp dracorp commented Apr 7, 2024

All submissions

Adding/updating Application X Support

  • This PR is only for one application
  • It has been added to the list of supported applications in the README
  • Changes have been added to the WIP section of the CHANGELOG
  • Syncing does not break the application
  • Syncing does not compete with any syncing functionality internal to the application
  • The configuration syncs the minimal set of data
  • No file specific to the local workstation is synced
  • No sensitive data is synced

Improving the Mackup codebase

  • My submission passes the tests
  • I have linted the code locally prior to submission
  • I have written new tests as applicable
  • I have added an explanation of what the changes do

@huyz
Copy link

huyz commented Apr 12, 2024

I find the name copy-only hard to understand. I had to look at the code changes to understand. I think preserve-source might be clearer.

Never mind, I changed my mind.

mackup/main.py Outdated
-f --force Force every question asked to be answered with "Yes".
-r --root Allow mackup to be run as superuser.
-n --dry-run Show steps without executing.
-c --copy-only Copy only files when backup.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idiomatic English would be more like: "Only copy files when backing up"

@huyz
Copy link

huyz commented Apr 12, 2024

I feel like this behavior should be the default. Unless I'm mistaken, the idea of symbolic links doesn't really work for many apps, e.g. Preferences file. As soon as an app rewrites the Preferences file, the symbolic link is broken.

I figure the default model should be copy/sync, possibly merge, but not symlinking, unless we can be assured that symlinks don't get deleted.

Am I understanding mackup right? I'm new to this app.

@martimlobao
Copy link

Would it be possible to enable this per-application as well? I just realized that iStat Menus also breaks using the symlinks created by Mackup, and so it would nice to be able to modify a .cfg file with a flag to have it only copy files instead.

Thanks @huyz for more Idiomatic English
@dracorp
Copy link
Author

dracorp commented Apr 16, 2024

I feel like this behavior should be the default. Unless I'm mistaken, the idea of symbolic links doesn't really work for many apps, e.g. Preferences file. As soon as an app rewrites the Preferences file, the symbolic link is broken.

I figure the default model should be copy/sync, possibly merge, but not symlinking, unless we can be assured that symlinks don't get deleted.

Am I understanding mackup right? I'm new to this app.

So, I've added a few apps to ignore, vim, iterm2 etc.

@huyz
Copy link

huyz commented Apr 16, 2024

Would it be possible to enable this per-application as well?

You mean make it part of the config file for each app? That sounds like a good idea.

@martimlobao
Copy link

You mean make it part of the config file for each app? That sounds like a good idea.

Yeah, unless I'm reading it wrong, this PR currently only provides a CLI flag, so it's all or nothing. Having the granularity to configure which apps use the copy/paste method instead of symlinks will probably address a lot of the issues some apps appear to be having with symlinks.

@huyz
Copy link

huyz commented Apr 16, 2024

So, I've added a few apps to ignore, vim, iterm2 etc.

@dracorp What do you mean there? I don't see any changes in the code that would do what @martimlobao is asking for.

@dracorp
Copy link
Author

dracorp commented Apr 16, 2024

@dracorp What do you mean there? I don't see any changes in the code that would do what @martimlobao is asking for.
It's not up to me anymore. I only cared about copying.

So, I've added a few apps to ignore, vim, iterm2 etc.
This is in my mackup configuration.

@victor-falcon
Copy link

IMO, the copy option should be by default, because right now Mackup is not working properly with a lot of apps :(. Maybe we can do that with a global flag in the config file if we don't want to modify the default behavior.

@dracorp
Copy link
Author

dracorp commented Oct 31, 2024

Is there any chance of someone completing this? I'm not that proficient in Python to impose anything.

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

Successfully merging this pull request may close these issues.

4 participants