-
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
Broken backup flow if there's a config error #347
Comments
Having the same issue, any hacks around this? |
Arguably, you should not be hacking around it. You should fix your config file to not have errors (in my case, I was attempting to back up files that no longer exist). I don't think this should silently succeed -- it probably indicates your backup isn't doing what you think it is. The details I added in the issue are sparse, but my intent is to make this error hard, so you must fix the config if you want to run a backup. |
What kind of issues will be detected by shallow-backup? I get the following errors: Error copying: /Users/zirkelc/.bash_profile
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.config/git
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.config/nvim/init.vim
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.config/tmux
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.config/zsh
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.pypirc
-> This may mean you have an error in your config. For example, what exactly does Maybe I'm misunderstanding something? |
Based on the details you provided, it sounds like the "error" here is that you have paths that don't exist on your machine in the config (they're populated by default). I'd suggest fixing this by editing the shallow backup config file to backup the files that do exist. The error message could probably be improved, but I haven't been able to prioritize it. |
I deleted the Here's the output: Current shallow-backup path: ~/shallow-backup
[?] Would you like to move this somewhere else?:
> No
Yes
Created directory: /Users/zirkelc/shallow-backup
Initializing new git repo...
Updating .gitignore file at /Users/zirkelc/shallow-backup/.gitignore with config from root-gitignore
WARNING: If you back up to a public remote, make sure no sensitive files are included by modifying the .gitignore.
[?] Would you like to set a remote URL for this git repo?:
> Yes
No
Enter URL:
https://github.com/zirkelc/shallow-backup.git
Setting remote URL to: https://github.com/zirkelc/shallow-backup.git...
Updating .gitignore file at /Users/zirkelc/shallow-backup/dotfiles/.gitignore with config from dotfiles-gitignore
[?] What would you like to do?:
> Back up all
Back up configs
Back up dotfiles
Back up fonts
Back up packages
Reinstall all
Reinstall configs
Reinstall dotfiles
Reinstall fonts
Reinstall packages
Add path to config
Remove path from config
Edit config
##########
# DOTFILES
##########
Directory already exists: /Users/zirkelc/shallow-backup/dotfiles
[?] Erase directory and make new back up?:
> Yes
No
Backing up dotfolders...
Backing up dotfiles...
Error copying: /Users/zirkelc/.bash_profile
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.config/git
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.config/nvim/init.vim
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.config/tmux
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.config/zsh
-> This may mean you have an error in your config.
Error copying: /Users/zirkelc/.pypirc
-> This may mean you have an error in your config.
##########
# PACKAGES
##########
Created directory: /Users/zirkelc/shallow-backup/packages
Backing up brew packages list...
Backing up gem packages list...
Backing up cargo packages list...
Backing up pip packages list...
An error occurred while running: $ pip list --format=freeze
Backing up pip3 packages list...
Backing up npm packages list...
Backing up VSCode packages list...
Backing up macports packages list...
An error occurred while running: $ port installed requested
Backing up System Applications packages list...
#######
# FONTS
#######
Created directory: /Users/zirkelc/shallow-backup/fonts
Copying '.otf' and '.ttf' fonts...
#########
# CONFIGS
#########
Created directory: /Users/zirkelc/shallow-backup/configs
Backing up configs...
Checking for separate git repo in dotfiles directory...
No nested dotfiles repo detected.
Adding pre-commit config file...
pre-commit installed at .git/hooks/pre-commit
No changes to commit... Is tehre another config to delete? |
If you delete the config file, https://github.com/alichtman/shallow-backup/blob/main/shallow_backup/config.py#L57-L103 If you want to change the specific paths that are backed up, you need to edit the config file (not delete it). Please see the documentation here: https://github.com/alichtman/shallow-backup#configuration
For some explanation on the defaults: In my opinion, this is the wrong place to store a global git config file. It should be under |
The text was updated successfully, but these errors were encountered: