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

Backup #12

Closed
airondumael opened this issue Feb 9, 2015 · 6 comments
Closed

Backup #12

airondumael opened this issue Feb 9, 2015 · 6 comments

Comments

@airondumael
Copy link

It will be good if there is an option that will make dotbot backup the existing files and write over it.

@anishathalye
Copy link
Owner

Thanks for the suggestion!

Hmm, where should the backup file be backed up, ${file}.bak? What if that file exists already? We could back it up to ${file}.bak.${number}, but then that gets a bit ugly.

This seems to be a one-time thing per machine, and it should probably require user interaction (to merge information from old config files, etc) or at least alert the user. I'm not sure what's the best way of designing this feature. Maybe it's best to leave it up to the user, the way it is now?

@anishathalye
Copy link
Owner

I think this is best left to the user.

I'm going to go ahead and close it for now. Feel free to reopen it if you have any ideas.

@tukoz
Copy link

tukoz commented Mar 25, 2015

Voting for such a feature.
Existing dotfiles could be backed up in ~/.dotfiles-backup/, or ~/.dotfiles-backup/timestamp/ Allowing us to quickly set up our dotfiles, knowing we can easily check, merge and revert if needed.

@anishathalye anishathalye reopened this Mar 26, 2015
@anishathalye
Copy link
Owner

Hmm, I guess we can reopen this issue.

I still don't know what the best way of handling this is. Would every file go to the backup folder? What if there are name collisions? Should the backup folder mirror the directory hierarchy instead?

I think there's some stuff to figure out before this could be implemented.

And as of now, I still think it's best left to the user -- in the majority of cases that I can think of, this isn't something that needs to be handled multiple times, and so it's probably handled best on a case by case basis anyways.

@tukoz
Copy link

tukoz commented Mar 26, 2015

A KISS proposal

  • simply backup any replaced (aka deleted) dotfiles; eventually dropin directory hierarchy
  • local, ie in $HOME out of the dotfiles dir.
  • a backup-timestamp folder would avoid any filename collisions I can think of (unless server's a real mess :) Since it's a local folder

That only would add serenity, when eg in a hurry to deploy.

@anishathalye
Copy link
Owner

Let's leave this as-is for now.
I don't know if the hurry-to-deploy scenario happens often enough to warrant the additional complexity in the code.

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

3 participants