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

make a back up of overwiritten file or folder #90

Open
QiangF opened this issue Jul 12, 2016 · 9 comments
Open

make a back up of overwiritten file or folder #90

QiangF opened this issue Jul 12, 2016 · 9 comments
Milestone

Comments

@QiangF
Copy link

QiangF commented Jul 12, 2016

Hello everyone,
When the force option is true, dotbot removes the original file. That could be risky. Will it be better if the original file or folder is renamed with a version suffix 1, 2, like emacs did for its backup files?
Thank you!

@petersandor
Copy link

I think this was requested before, see #12

@anishathalye
Copy link
Owner

I don't think there's any need to change the existing behavior for force. After all, it is called "force" 😛.

What would you think about having a separate backup: true option for this kind of behavior.

I didn't really like it back in #12, but I think enough people have been asking for this that we can add it.

@QiangF
Copy link
Author

QiangF commented Jul 13, 2016

The use cases are:
1 when you want to try another set of dotfiles (tens of files) on an old computer which are not manged by dot bot, and you don't have enough time to go through each of them, have a backup makes you worry free.
2 when you dist-upgrade to a new version of the os, some configuration may change, but most of them may still work, you can try the old dotfiles and let the problem to appear by themselves, only if you have a backup.

@anishathalye anishathalye added this to the 2.0 milestone Jul 13, 2016
@anishathalye
Copy link
Owner

Ok, let's make this happen. I like having a backup: true option, which specifies that files should be backed up and then removed and relinked.

Does anyone want to submit a PR for this?

@anishathalye anishathalye mentioned this issue Jul 13, 2016
@ibeex
Copy link

ibeex commented Feb 13, 2017

hi I added backup option it is backup: dir_name dir_name is name off sub directory inside dotfile dir in that directory backup off existing files is created. Also I added one more option. Adding non existing entries in config file, they will be added and recreated with link. code is here https://github.com/ibeex/dotbot

@ashkitten
Copy link

I don't think the backup location should have to be inside the dotfiles directory - it has nothing to do with your current dotfiles and probably shouldn't be synced to git

@ibeex
Copy link

ibeex commented Mar 28, 2017

@ashyon For most scenarios you are probably right. I was using principle better safe then sorry. I don't think there is to much overhead if backup dir is in dotfiles directory. If you don't need it in git, it can always go in .gitignore.

@anishathalye
Copy link
Owner

Closing due to age / inactivity. I've gone back and forth on the necessity of this feature, but I feel like if more people needed it, there would have been more activity on the relevant GitHub issues. ¯_(ツ)_/¯

@anishathalye anishathalye closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2024
@anishathalye anishathalye reopened this Dec 26, 2024
@anishathalye
Copy link
Owner

Oops I see that there is an open PR that implements this functionality (indicating more recent interest): #349

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

No branches or pull requests

5 participants