-
Notifications
You must be signed in to change notification settings - Fork 250
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
Could shallow-backup integrate with git for backup? #57
Comments
Is it possible? Absolutely. I think it's a great idea, and something that I explored doing while I was building this. In terms of functionality, here's some pseudocode (in a mix of python and bash): $ cd backup_dir
# Initialize git if not already initialized
if ".git/" does not exist in backup_dir:
git init
else:
git add .
git commit -m "Update shallow-backup"
git push origin master If you'd like to add this functionality, a PR would be welcomed! I could talk with you some more about how exactly to do this if you were interested.
I'm confused what you meant by this. Can you rephrase it? |
I was trying to make a comparison to make my case: between adding git
functionality and adding automatic package installation functionality. But
you already think it’s a great idea, so great!
|
Ahhh gotcha. The whole point of this is to make backups easy. The more you automate, the less there is to accidentally screw up. Totally behind that idea. |
I think this is a great idea as currently backing up to a git repository deletes all the files including the |
Just opened a separate issue for that bug: #68. (FOLLOW UP: This bug could not be reproduced. The .git and .gitignore files are currently maintained by shallow-backup.) Once that is done, this shouldn't be too much work to complete. |
Thanks @alichtman. Also, is there an option to exclude private files? For example I noticed that it also backs up my private and public ssh-keys which I don't want to backup in the case where I'm pushing the files to a github repository. If I'm not wrong, there can be two solutions for this
I believe the first one can be implemented and second one user can do it by themselves. |
It seems like it would be good to have reasonable defaults for preventing private information to be uploaded - the good thing is that Github already has software that removes private information from commits, but it would be better to never upload them. https://help.github.com/articles/removing-sensitive-data-from-a-repository/ |
I was imagining that these would be backed up in a private repo, so sensitive data could be backed up without worry, but this is a fair point. I think we should have an extra prompt for asking if the user wants to back up private data or not (like .ssh/) Let's have that default to not backing up sensitive files, with yes as the secondary answer. |
Follow up discussion in #71 |
It seems like it would be a great idea to make shallow-backup git aware and if you want it to back up to github.com or some other git remote repository when you run shallow-backup, then the backup is off-device, and it makes it easy to share.
Obviously, it's possible to do this manually, but it is also possible to reinstall all of the packages manually, and yet
$ pip install -r pip_list.txt
is already included in shallow-copy.The text was updated successfully, but these errors were encountered: