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

Copy configuration files #613

Open
lra opened this issue Aug 9, 2015 · 16 comments
Open

Copy configuration files #613

lra opened this issue Aug 9, 2015 · 16 comments
Labels

Comments

@lra
Copy link
Owner

lra commented Aug 9, 2015

Linking file does not work for all applications, and some users would prefer to actually "backup" their config files, instead of linking them.

Finally, the app store applications live in a container that's not working for application linking, a copy mode would allow us to support those apps.

We should be able to specify if the mode (link vs copy) in each application INI.

As it's gonna be complex to understand what's going on if mackup supports both linking and copying, this feature depends on mackup status #603

Finally, mackup should say goodbye to mackup backup and mackup restore and use more explicit actions, e.g. mackup link, mackup copy, ...

PR welcomed

@vitorgalvao
Copy link
Contributor

For MAS apps, it’ll likely also need to defaults read preferences to a file and restore them with defaults write. This is why I’ve been mentioning storing bundle IDs.

@lra
Copy link
Owner Author

lra commented Aug 9, 2015

You are right, I think this can come as a later feature, once this one is in: #615

@zanderzhng
Copy link
Contributor

we may add StickiesDatabase back with this feature. #412

@martin-liu
Copy link

When I tried mackup, I thought it will copy the config files.
So that when I try mackup backup and find it works, I just delete the backup folder and empty the trash.

Now all my config files LOST!!!

Why not you guys write this behavior to README? 😭

@zanderzhng
Copy link
Contributor

If your files were synced up with dropbox, you may recover them with it.

@lra
Copy link
Owner Author

lra commented Feb 11, 2016

@martin-liu it's explained: https://github.com/lra/mackup#bullsht-what-does-it-really-do-to-my-files
Feel free to propose a better explanation in a PR.
Also what @zanderzhng said, you can undelete files in dropbox.

@vitorgalvao
Copy link
Contributor

@lra To be fair, it doesn’t really explain it. It says mackup does ln. If you don’t know what ln is (and why would you, if you just want to backup your configurations) you don’t know what’s happening. It’s also the third point in a list of technical details (which a user won’t read if, again, all they want to do is backup configurations).

The only time link is even referenced in the README is in the word “linked”, five paragraphs into a long explanation most people won’t care about that says what you used to do (i.e. it doesn’t even mean that’s what mackup does).

@martin-liu
Copy link

@zanderzhng @lra , thanks for reply.
But my config files including ~/.emacs.d and have several hundred MB, it did not have time to sync to Dropbox.
While luckily, I have most of the configuration in my github 😃

@nlemoine
Copy link

👍 Totally agree with this topic, it would be awesome to have an copy/link choice.

@Vvkmnn
Copy link

Vvkmnn commented Oct 12, 2016

I use this tool across almost 3 machines. A feature like this would be awesome.

@mattmc3
Copy link

mattmc3 commented Dec 31, 2017

The copy feature has been requested numerous times over the years, and as I was looking at it, it seemed an easy task to leverage the .cfg files to create a simple rsync-based copy feature with a lite bash script. Thus, Rackup was born. https://github.com/mattmc3/rackup. Rackup leverages Mackup's configs to do an rsync based file copy backup instead of symlinking. Not trying to advertise per-se - it would be great to have this feature in Mackup itself, but for those who can't wait any longer, here's an alternative approach.

@vitorgalvao
Copy link
Contributor

@mattmc3 Copying alone isn’t enough for Mac App Store apps. They cache their settings.

@mattmc3
Copy link

mattmc3 commented Dec 31, 2017

@vitorgalvao - Maybe I'm missing what you're really saying, but I'm not sure how cached settings is that big of a deal. Time machine backups only work against the files written to disk as well. When the file is written, an rsync backup can get it. If it stays cached in memory, then nothing was going to pick it up anyway. Like I said, maybe I'm missing what you're getting at, but from my vantage point, it's not a big enough issue to architect something grandiose to cover it.

@vitorgalvao
Copy link
Contributor

@mattmc3 Due to the way settings are cached, if you copy the settings over in MAS (Mac App Store) apps, they aren’t read. So copying alone is ineffective. You need to at least do a defaults read {{app_bundle_id}}.

I do that in my own settings-saving script and it mostly works, but that means mackup’s .cfg files are not enough, as they do not contain the bundle ids.

@mattmc3
Copy link

mattmc3 commented Dec 31, 2017

@vitorgalvao - Good call out. Seems like we can solve this with a simple pre-backup script, which I'm going to need anyway to add other plugin scripts to settings that aren't in files like the list of Atom packages, a Brewfile, etc. To account for the issue you mention, before I make a Brewfile, I can brew install mas, which will add Mac App Store items to the Brewfile, and those contain the bundle ids. On restore, we can then loop through the Brewfile mas entries and run defaults read {{app_bundle_id}} from each of them. I've opened an issue in my repo.

@ashtonian
Copy link

just to be clear tunnelblick is one of the applications that needs this to function properly.

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

No branches or pull requests

8 participants